Loading a web site to IIS - iis

A developer just send me a running website files from IIS directory. I want to know if I can run the website on my PC. The file contain "Default.aspx" file, which I assume is of some importance.
I want to know if it is possible to run the website on my PC, I have installed IIS and I placed the file in the wwwroot folder, but unfortunately I dont know how to proceed from here.
Can someone please point me to the right way to continue with this task.
Thanks in advance

First time use of IIS
Now that IIS is running on your system, it should have defaulted to running on port 80. You can test this out by going to http://localhost/
The file you have placed in the wwwroot directory Default.aspx is an ASP.NET application. You need to go to IIS and convert the directory it is stored into a web application.
Now when creating web applications, it is better to create them in another folder other than your wwwroot folder, and in the case of this tutorial it is easier. Move your Default.aspx into a folder named 'webapp', or something of the like.
To convert it into an application, do the following:
In the Server Manager, expand the
'Roles' item in the tree
Expand the 'Web Server (IIS)' item
Click on 'Internet Information Services (IIS) Manager
In the window on the right hand side, you will need to open up your server. In my case, my server is called WIN2008R2. Your server name will be located inside the 'Connections' pane. Expand your server in the tree
Expand the 'Sites' item
Expand your newly created site. There should only be one there, and the item will have a globe next to it
Now right click on your 'webapp' item which will have a folder next to it, and click 'Convert to Application'. Then leave all the properties the same in the window that comes up and click OK.
You have now created a new web application. By going to http://localhost/webapp you should see it working.

You need to configure IIS to host an ASP.NET website.
You can find information about configuring IIS here: http://msdn.microsoft.com/en-us/library/ms178477.aspx
Another option is using the Cassini web server (instead of IIS). You may find it easier to configure: http://ultidev.com/products/cassini/

Related

How to set up IIS 10 for MVC 5?

The title is purposely generic as I have no clue to formulate my question in any different way.
I have made an MVC 5 project using .NET 4.7.
My goal is to use IIS 10 to point to a domain so I can use that as a testing ground.
I have already edited my host-file to point my localhost ip to the domain I have in mind.
After that I have followed every step mentioned in the video below meticulously.
However I keep ending up on the 403.14 error page.
I have adjusted security to no avail, checked the app-pool to use the correct .net version... I'm all out off ideas.
https://www.youtube.com/watch?v=IwbKquNBNgQ
I hope someone here has some idea of things I have not thought of myself, so feel free to ask anything you think might make the change I need to make this work. I will edit this message (and title) as much as needed to keep up to date as possible.
EDIT: I have followed the full guide that I have marked as an answer. I had 3 differences.
Difference 1 was in Windows Features. I think I just plain didn't correctly mark all the needed features..
Difference 2 was in Security. I did not have IIS_IUSRS added, only IUSR
Difference 3 is one I have purposely keep a difference and that is Directory Browsing. Without this being enabled, it works for me.
I hope that if anyone ends up on this page in the future, the answer provided below will be as helpful as it has been to me.
make sure you enabled below iis features:
please follow the below steps to publish your MVC project in iis.
1)open the visual studio. Select your site and right-click on that-> Click publish.
2)in pick up publish target Select folder option and create choose destination where you want to publish the site. (make a new folder and publish a site in that folder) and then select publish.
3)open IIS manager.
4)expand the server name and right-click on sites and select add a new site.
5)enter the site name, physical path, and site binding details.
ip address: select your machine ip address.
port: 80
domain name: your domain name
6)make sure you enabled directory browsing in iis.
7) The application pool is running under application pool identity, a version is correct and using the integrated pipeline.
8)anonymous authentication is enabled.
9)iis_iusrs and iusr have full permission to access the site folder.
host file enry:
bind your machine IP dress with a hostname of the site.
after doing all the changes refresh the site in iis and browse.

Adding website to IIS

So, I did something and my localhost website gave me a 500 error. Couldn't figure it out so I figured I'll delete the website in IIS and then re-add it. Apparently that was a mistake. I can't see the added website locally anymore. I seem to recall having to add a permission or something to be able to view it in localhost but for the life of me I don't remember what setting that was and I can't find it online. Any ideas? My other local website still displays fine ... Using Windows 8 IIS 8.5
I'm simply going to Add Website > putting in the site name and changing the port number. I've left the IP address alone to All Unassigned (I just want to view in as localhost:24)
Adding website in IIS:
1. Right Click the Sites Folder image.
2. Add website.
3. Enter Site name.
4. On physical path textbo, Locate where do you want to store your website.
5.Assign a port.
then done.
After creating.
1. Select website created.
2. Open Directory Browsing.
3. On the right side click disable.
Make sure in application pool that your website has same framework set up.

How do I move an application from Default Web Site onto its own site?

I have an existing application under the "Default Web Site" that is functioning but want to move it as its own "Site". What is the best approach to this as the functioning site has a lot of configuration to it.
I've tried creating a new site and copy/pasting the folder contents(c:/inetpub/wwwroot/application) over but that does not work.
In theory, if I could simply drag the application out of the "Default Web Site" and drop it to the "Sites" folder, that would be nice...
Any help with this would be greatly appreciated! Thank you!
All you have to do in IIS.
Right Click on Sites --> Add web Site (Make up a name for it)
Just set the physical path to the location of the application (You don't even have to move the application)
If you have an old website you want to move to a different folder (like on a different hard drive w/ more memory), you can:
copy the folder to the website to the new location (making sure to reset all the file permissions b/c they are often not automatically copied),
open the site in IIS,
click "Basic settings" in the "Actions" panel on the right hand side of the screen,
change the "Physical path"
click ok
Do an app pool recycle afterwards to ensure everything takes effect

HTTP 403 Forbidden : This website requires you to log in

Using asp .net MVC 4.0 , razor , VS2010 , IIS5.2 , windows Server 2003
I have built an application which i want to publish in IIS. what i did is listed below:
Cleaned then built the solution.
right click on project file and clicked PUBLISH.
publish method : File System
Target Location : C:\Inetpub\wwwroot\testing
then publish.
Then i went to IIS and got my site in Default web sites. happy :). Then i did:
right clicked on testing(my app) and open properties.
In the tabdirectory everything goes fine.
in asp.nettab, i set asp .net version 4.0.30319
here is a little confusion, I set home/index as my default content page in documentstab
then I right click testing and clicked browse. And it shows :
Most likely causes:
This website requires you to log in.
This error(HTTP 403 Forbidden) means that this program was able to connect to
the website, but it does not have permission to view the webpage.
a short summury what i got as error message. This is my fist mvc application and first hosting. What is my fault here? what should i do now?
I had the similar issue. Please try the following:
A. Suggestion below from Microsoft Technet helped me:
The solution is to ensure that the Authenticated Users or \Users group (which usually contains DOMAIN\Users group) has Read & Execute, List Folder Contents and Read permissions on the /BIN folder below C:\inetpub\wwwroot\wss\VirtualDirectories{Sitename80}. Follow the steps listed below to grant the required permissions:
Open Windows Explorer and navigate to the /bin directory of
your web application
Right-click on the folder and click on Properties
Go to Security tab and click on Edit
Click on Add and add the local server group Authenticated
Users or < SERVER NAME >\Users (this usually contains
DOMAIN\Users group).
Select the Read & Execute, List Folder Contents and Read
permissions (if you are planning to add Everyone to the /bin folder,
grant Read permissions only)
Click OK to apply the new settings
NOTE: you may need to to it after every Publish, as permissions somehow may get reset.
B. In VS - set the default page for your website, or try navigating to specific page as opposed to simply opening the website with only the site name.
I know it sounds dumb, but that also was the problem for me
after publishing your webiste to IIS, navigate to http://myServer/mySite/somePage instead of http://myServer/MySite

Moving sharepoint installation to a different port / URL

We've installed Windows Search Server Express on one of our servers, which apparently runs on top of sharepoint.
Sharepoint was installed on port 80, where our "normal" intranet runs. When I disable the intranet and run the sharepoint site, everything works as intended. The intranet is linked in many places it would be a pain to move it, so I'm trying to move sharepoint to another "place" (hoping this is less of a pain), either a different port or as a virtual directory under the main site.
First, when I make any of these changes, it fails to get access to the intranet root. Not sure what it is looking for there, but ok, I give "Network service" (the acocunt the "Sharepoint 80" application pool is running under) access to the intranet root. This gets me one step further, I am stumped:
When I move the Sharepoint website to another port, it complains that it can't find default.aspx (there is none, but also it doesn't need it when running on port 80)
When I move it to a sub folder of the existing site, and try to open the global.asax in the browser, ti tells me that this extension is prohibited, even though the "Application configuration" is - as far as I understand - identical to that of the Sharepoint site, and allows GET, HEAD, POST, DEBUG for .asax.
Any suggestions?
Sharepoint sites should be able to run on any port- if you go into Sharepoint Central Admin and create or delete web applications without a problem.
Is it your intention to run heterogenously with Sharepoint and your regular site both on Port 80? I know that you can create a web application on 80 and then not have a root site collection ( Sharepoint applications consist of a Web Application that runs on a certain port and any number of Site Collections within that, each of which has it's own directory path and can contain lists, libraries, other Site Collections and so on ) just creating one on a different path, but I don't know for sure how that would work alongside an existing web site on the same port- it may not play nice. Again, you can create and delete site collections from the Sharepoint Central Admin page, which is linked from your Administrative Tools list on your server.I would try this first, as if it works it's an easy solution.
Is Windows Search Server Express related to Sharepoint's own search facilities? If it is you may find that it expects to run using some of the Shared Service Provider facilities, which even Sharepoint doesn't expect to be running on the same port as the sites it's providing services for.
An even better way would be to create another alias (cname) in your DNS for your server, just set a different host header for each web site.
for example, in DNS your machine might be named 'intranet'. Create an alias for that machine named 'sharepoint'
In IIS, create a new website for sharepoint, and set the host header for that site to 'sharepoint.domain.com', where domain.com is your domain.
Do the same for the intranet website, but set the host header to 'intranet.domain.com'
That way, your users don't have to use another port in the URL.
Thank you! I found the option in the sharepoint administration website.
I add this response to detail the steps I have taken - maybe they are useful for someone else.
In the sharepoint administration website (running flawlessly on another port), I chose "create or extend web applications", then "extend existing web application".
There, from the the drop down "Web application", "change web application" opens a popup with the web applications available. Search server was installed as "Sharepoint 80", so I selected that.
Then I selected "Create new IIS website", with a new name and a new port. All the other options looked fine to me as default.
Clicking OK, this creates a new web site in IIS, which was configured correctly. it doesn't work via the IP address of the server (http://192.x.x.x:8080), only using the server name - but that's ok with me :)
I still had to make some adjustments with the access rights, but the full crawl is running and I can find a few documents already. Yay!
This is much easier when you first backup your site and then create a new site from the central admin with a new port number and then restore the backup to it(overwrite)

Resources