4

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.

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
Chris
  • 26,744
  • 48
  • 193
  • 345
  • Just a few suggestions: Did you do a debug build and open the relevant debug zones? it might shed some new light. Are you able to render asp pages that have other file extensions? Maybe there is a specific problem with the `.html` extension. – Shaihi Apr 06 '10 at 11:56
  • `.asp` pages render file but I cannot get it to render as any other page, even with an arbitrary extensions. – Chris Apr 06 '10 at 12:45
  • You lost me with the subkey<->key/pair: the article specifically says that there should be a key called `ScriptMap` under `[HKEY_LOCAL_MACHINE\COMM\HTTPD]` and that the mappings are values under that key. This seems to be what you are doing in the update. I fail to understand what you did before. Anyway, I am out of ideas for now. – Shaihi Apr 06 '10 at 15:03

2 Answers2

1

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

pyrachi
  • 800
  • 6
  • 15
  • Thanks, I cannot check until Monday though... I hope it is something as silly as that!! – Chris Apr 03 '10 at 11:42
  • Good luck! I've noticed that the CE web server can be finicky about some of its registry settings. – pyrachi Apr 03 '10 at 12:18
  • @Emanuel - it turns out I already escape the backslashes but to no avail. Can you think of anything else it could be? – Chris Apr 06 '10 at 08:05
  • 1
    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". – pyrachi Apr 06 '10 at 21:02
  • 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 Apr 09 '10 at 11:07
  • 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 Apr 09 '10 at 13:28
1

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
  • 3,952
  • 4
  • 27
  • 47
  • 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 Apr 06 '10 at 14:41