Creating .aspx extension instead of .htm

Topics: Developer Forum
Apr 3, 2007 at 11:21 PM
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 asp.net. 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 asp.net application). If I can do this, could you point me in the right direction?

Thanks again,

Chris
Coordinator
Apr 4, 2007 at 1:41 AM
Edited Apr 4, 2007 at 1: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: http://blogs.msdn.com/sandcastle/archive/2006/11/22/supporting-custom-tags-in-sandcastle.aspx

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

This means all your HTML files in the application will get sent through the ASP.net 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\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll