This project has moved and is read-only. For the latest updates, please go here.

Creating .aspx extension instead of .htm

Topics: Developer Forum
Apr 4, 2007 at 12:21 AM
Eric, first, thanks for your hard work.

My question(s) is(are):

1) I need to incorporate the output into an existing, secure application, which is written in I've tried changing the directory name and file extension values in the config file, so that the resulting files are .aspx files, not .htm files. I keep getting XslTransform errors when I do this. Can I do this? If so, could you please tell me where I need to make the changes?

2) If I can generate .aspx pages, is there any way to automatically insert a bit of code at the top of each page as they are generated (this, again, is because I need the resulting .aspx pages to inherit from a specific base page in the application). If I can do this, could you point me in the right direction?

Thanks again,

Apr 4, 2007 at 2:41 AM
Edited Apr 4, 2007 at 2:46 AM
In both cases, I think you will have to modify the standard Sandcastle transformation files. There are dependencies on the extension in the table of content generation for sure. There may be a few other places too. Inserting additional information in the pages does require modifing the transformation files. There's information on the Sandcastle blog on how to go about adding custom tags and such:

Apr 4, 2007 at 5:34 PM
We ended up taking the easy route: change the server setting for HTML files so that they are handled by instead.

This means all your HTML files in the application will get sent through the mangler, but you probably don't have any plain old static pages to begin with, so what's to lose?

You would change the IIS server config for the virtual directory.
Change the virtual dir's Configuration settings - you should see a list of file extension to application mappings.
Change .htm to use c:\windows\\framework\v2.0.50727\aspnet_isapi.dll