Installing a ASP.Net MVC web application on IIS6
Getting ready to release Dovetail Agent Mobile I am working on what our installation story will look like. I want to keep things simple (for me) right now because it is currently tricky to support IIS6 and IIS7 using a Wix based windows installer. For the documentation I am compiling a list of operations to get what is essentially a ASP.Net MVC web application up and going on different web servers.
Later we may later add an installer that encapsulates this pain but right now it is just too darn hard to do this well usingWix. Do you hear me Microsoft?
Getting Down With The Basics
Install the .Net 3.5 Framework.
Copy web application files to a directory our your web server.
Create a Virtual Directory using Internet Information Services Manager that points to this directory.
ASP.Net needs to be enabled.
- Using Internet Information Services Manager click on Web Service Extensions.
- Make sure the ASP.NET v2.0 web service extension has a status of Allowed.
- If this web service extension is not present you need to register ASP.Net with IIS.
- Open Command Prompt (cmd.exe).
- Change directory:
- 32-bit: change directory to: %system root\Microsoft.Net\Framework\v2.0.50727\aspnet_isapi.dll
- 64-bit: change directory to: %system root\Microsoft.Net\Framework64\v2.0.50727\aspnet_isapi.dll
- Run “aspnet_regiis.exe –i”.
- If the web service extension is not allowed right click on it and select Allowed to enable ASP.Net.
Your virtual directory needs to specify ASP.Net as a Wildcard application map.
To get pretty URLs to work with IIS6 you need to add a wildcard application map which basically pushes all web requests through the ASP.Net application pipeline.
- Right click on your web application and click on view Properties
- Select the Virtual Directory tab and click on Configuration.
- Under “wildcard application maps” click on the Insert button.
- In the “Executable” text box enter a path the ASP.Net ISAPI dll.
- 32bit: “%system root%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll”
- 64bit: “%system root%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll”
- Make sure that the “Verify that file exists” is Unchecked.
- Click OK on all open dialogs to save these changes.
A Couple of Dovetail Mobile centric things
For Dovetail applications like Dovetail Mobile Agent that use the Dovetail SDK we recommend that you give the web application a dedicated Application Pool.
You will also need to edit the application configuration web.config file:
- To contain the desired database connection information.
- The URL to the Dovetail Seeker search web service.
Test out your Web Application
Just making sure everything works…