WebMatrix on IIS6

Running WebMatrix 3.0 on a local machine is OOTB functionality. But you want to move the application to an IIS server like a Windows 2003 / IIS 6 combination.

You need to do some configuration to get it running.

1. Make Sure you first install DotNET 4.0 to use WebMatrix 3.0 on a Windows 2003 server.

2. Create a new Virtual Directory on the IIS to copy the Razor application to.


3. Add the ISAPI Filter for the .cshtml extension.

1. open IIS

2. right click on my web site and choose properties

3. click on Home directory tab

4. click on Configuration button

5. click on “Insert..” button

6. write .cshtml and / or .vbhtml as extension and c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll as path


4. Test the MS SQL CE Database connections (should work out of the box?). If not then check the settings in the Web.config file. See if you have these settings correct :

<font color="#333333">    <system.data>

Test the Default.cshtml to see if you get a response in the Browser.

Getting Errors ? See here for some obvious mistakes :

If needed, Adjust the variable paths, in the pages to point to your new Virtual directory on IIS.

Make use of the “~/” dynamic pointer. And add to each URL in the pages, the extension .cshtml in the code.

Test the SQLCE database connection. It you get an error like this :

Access to the database file is not allowed. [ 1914,File name = C:\Inetpub\wwwroot\App_Data\test.sdf,SeCreateFile ]

Check the permission on the folder ~\App_Data\ where the .sdf file resides, and change it the read/write.

Test the External Database connections if you have them as well. If you get errors, you need to check the Web.Config to see if you have the correct data source settings in there.

Next I will write a post on how to get it to run on a Windows 8r2 / IIS 7 combination. Takes a bit more steps and understanding Winking smile

Enjoy !!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: