views:

152

answers:

2

I want to be able to use the .html extension to render ASP pages.

I am using Windows CE 6 at the moment with the default web server, ASP is turned on.

My registry key looks like HKEY_LOCAL_MACHINE\COMM\HTTPD\ScriptMap with the following string key value pair added .html = \\Windows\\asp.dll. After doing this all my .html files gave a 403 error.

Update:

To get this working do the following: Add .html = \Windows\asp.dll (note single slashes) into HKEY_LOCAL_MACHINE\COMM\HTTPD\ScriptMap -> Double slashes are only required if you are adding via code.

If you get a 403 error then check your permissions to ensure scripts can be ran.

+1  A: 

You need to escape the backlashes. Use "\\Windows\\asp.dll" instead.

Emanuel
Thanks, I cannot check until Monday though... I hope it is something as silly as that!!
Chris
Good luck! I've noticed that the CE web server can be finicky about some of its registry settings.
Emanuel
@Emanuel - it turns out I already escape the backslashes but to no avail. Can you think of anything else it could be?
Chris
Since you're getting a 403, I'm guessing there may be a conflict with the permissions[http://msdn.microsoft.com/en-us/library/ms900420(v=MSDN.10).aspx] for the virtual path where the .html files "live".
Emanuel
This makes sense... I have gone through all my VROOTS and removed the P setting so that everything is allowed. I still get the forbidden error though. Thanks for all your help, I feel like I'm close...
Chris
After some fiddling I have it working. I'll update my question with the result but mark you as answered as you pointed me in the right direction. Thanks
Chris
+1  A: 

I don't want to be doing this through the comments so here are my thoughts:

  • Are you able to have a debug build that might print some additional information about the file association?
  • How are you changing the registry? Do you have a persistent registry? Are you building the image with the specified registry key?
  • After changing the registry key (in case you are not building the image with it and in case you do not have a persistent registry) - did you restart the server so it will read the registry settings again?
Shaihi
I am unable to do a debug build at the minute. I am changing the registry via a simple registry editor. The changes are permanent and I reboot the box after updating the registry to ensure the services have the new settings. FYI I was fiddling around and got it to the point where I was receiving 403 errors on all .html files... Updated question with more info. Thanks
Chris