I have been using the embedded server that visual studio has to test my ASP.NET MVC 3 application and it has been working fine. I decided that I want to start using IIS on my local machine for my personal development environment as that is how the application is going to have to be deployed.
I installed IIS through the control panel on Windows 7 (so I am 开发者_C百科assume it is version 7/7.5) and enabled basically every option. I then open up the IIS Manager and added the website. I also added an entry in my hosts file so that the domain I gave the IIS Manager maps to 127.0.0.1.
I then started Visual Studio (as administrator) and opened up the solution. I changed the properties for a few of the references as mentioned in a "How to Web Deploy ASP.NET Applications" article (like System.Web.MVC, System.web.Routing, and a few others). I then went to the main project, right-clicked and clicked publish. I set everything in there for Web Deploy and published it. To double check I when to the folder that I set as the path for the website in IIS Manager and they was a folder called app as excepted (when publishing I gave it website/app so I was excepting that folder) and it had a number of different files.
Edited
At first I was getting a blank page. After restarting my server, I now get a page with the message:Error Summary HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.
It tells me the most likely issue is that directory browseing is not enable but I would have though that my application would be access from the url (sb.website.com/app). The only files that publish copied over into that folder is the Web.config and Global.asax (it also copied the folder Areas, bin, and Views). Is there some setting in IIS Manager I am missing something else that should be copied over in the publish?
Figured out the issue.
I had to do was run aspnet_regiis -i in command line.
to start - Add a test.html page in your solution just to exclude any extension issues. Try even adding it to your wwwroot folder as well and see if you can hit it from localhost/test.html
精彩评论