1

I have created an ASP.NET MVC 5 application in Visual Studio 2013, which runs fine using the Visual Studio debugger. I now want to serve it locally using IIS 7 running on Windows 7.

So, I publish as Web Deploy in Visual Studio to a specified folder. Then, in IIS Manager, I Add Web Site, whose physical address is that of this folder. Finally, I click on Manage Web Site -> Start.

Should this work as it is, or is there something else I need to do? As it stands, when I type in localhost to my browser, I get an error HTTP Error 404. The requested resource is not found.

0

1 Answer 1

1

You also need to see what port did you assign to that site and if that port is opened for in/out - going traffic in your Windows Firewall. Would not hurt to verify is there is any other applications using same port for any reason.

Application pool need to be verified as well.

When you done you need to put either DNS entry for your site or add your site to host file on machines from where you desire to have access to your site.

Easier way would be just access site using IP but in any case Firewall is a place to start.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks for your comments. I used the default port 80, and I've checked that this is open in Windows Firewall and that no other applications are using this port. The reason I am asking is actually because there is another web site running on IIS, using this same directory as the physical location, and I am just trying to duplicate it to learn how it works. The existing version works fine when I go to localhost, whereas my version gives the above error. I can't seem to find any differences between the two web sites though!
have you added header in IIS and host entry in host file? Also you need to verify what pool has been assigned to your instance and compare it to working copy.
Oh, it seems that the application pool was set to a different version of .NET to the version I had compiled my ASP.NET application for. Updating that version seems to have fixed my problem. Thank you for your help :)
@Karnivaurus Accepting answer would be nice too, but it is up to you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.