开发者

Deploying MVC2 to IIS5 or 6

I have whatever version of IIS comes with 2003 I think. In the help > about it says

Internet Information Services (IIS)
Manager
Microsoft Corporation

This snap-in administers the Microsoft Internet Information Services (IIS)

Thats all.

I've installed .NET Framework 4.0 and MVC2 on the server.

Tried it and got a Directory Listing Denied Error.

I added the wildcard trick C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll in the executable and unchecked Verify Files.

Now I get a 404 - At some point in time I got a Server Error saying my app is targeting 4.0... Not sure where it went. I think that was the closest I have been.

If I g开发者_开发技巧et back to the point of having the server error where it complains about 4.0, how do I tell IIS to target 4.0?

Everything I have read says change it in the ASP.Net tab. But I don't have an ASP.Net tab!

Thanks in advance...

(Ive doing a IISReset after I make changes.)


Deploying to IIS 6 is a royal PITA. It took me two solid days to get it running.

These are the sites I found helpful:

http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx

http://www.codedigest.com/Articles/ASPNETMVC/216_Hosting_and_Deployment_of_an_ASPNET_MVC_Application_in_IIS6_and_IIS7.aspx

Some sites mention that you need to add a wildcard mapping. I do not think you need to any more.

Also be sure to enable Asp.Net 4.0 from the Web Services Extensions section of inetmgr.


you are sure the correct dotnet 4 is installed (32 / 64 bit) based on your OS? And secondly, can you confirm that the App Pool used for the Website you are testing does not also serve another Website / Virtual App which is anything other than dotnet 4.

Cheers


After completing a deployment of MVC2 compiled under .Net 4.0 to IIS6, here are some hints that may help:

Some of the expected config I had to do:

  • Config'd the web app to run under a new app pool, which I use for .Net 4.0 apps.
  • Config'd the web app to run under .Net 4.0
  • Config'd IIS Web Service Extensions to allow ASP.Net 4.0

The extras to get MVC2 running:

  • If the server is throwing a config error related to an invalid mvc config section, try setting the project reference to "copy local". If you didn't install MVC to your target server, you need to publish the System.Web.Mvc dll.
  • In your web application settings, under the directory tab > configuration, confirm the .mvc file extension is mapped to a handler. If not, map it to aspnet_isapi.dll as described in the Phil Haack link posted by rboraman above. (I actually mapped this to the aspnet_isapi.dll under my .Net 4.0 directory, but I believe the dlls are actually identical)
  • Add the wildcard mapping to the aspnet_isapi.dll
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜