问题
So I have an EC2 instance running, the URL NoWeatherSurprises.com I have the DNS pointing there, and I set up a new site in IIS 7 and pointed it to a folder. I used Visual Studios Web Developer 2010 express to publish to this folder. It now has the binaries and such.
However if I go to NoWeatherSurprises.com I get the welcome to IIS 7 screen. I'd expect to go to my application If I navigate to http://noweathersurprises.com/weather/ [weather was the folder I published to under wwwroot] I get a 403 forbidden. I have no idea why, I am guessing that it is trying to do a directory listing or something instead of launching my MVC Application.
So 2 problems in summary.
- It is not pointing the domain to the folder directly and I need to add /weather
- I am getting a 403 forbidden instead of the results of my home controller with the index action.
I am new to IIS 7, I had been using IIS 6 and had a lot less trouble setting it up, but I suspect that's my own fault and i am just missing something. Thanks in advance for any help
回答1:
What did you set your physical path to your website?
On the right hand side in IIS Manager there is 'Basic Settings' where you can see where its pointing.
After you've checked that, make sure the application pool for your website is for v4.0 of the framework. Again in the IIS Manager look under Application Pools, find your website and ensure the framework version is 4.0 (Integrated)
来源:https://stackoverflow.com/questions/10166528/403-forbidden-when-deploying-asp-net-4-0-mvc-3-site-to-iis-7