changing the .aspx extension

G

Guest

Do anyone know how to change the .aspx extension to something else, say
..sssx, for all or part of a ASP.NET 2.0 site? I recall a Microsoft article
on this some time ago, but I cannot locate it.
 
T

tdavisjr

Spam said:
Isn't it easier just to remap the extensions in IIS?

Humm...I have never tried that method to see if that works. In addition
to remapping the extension in IIS, you would also have to make a
change to the machine.config file in the <httpHandlers> section. The
question is. There may be some issues. Like will you still be able to
us the Visual Studio Designer for web forms? I'm sure others can come
up with more. However, do you really think this is an easier solution.
It may seem that way, but you never know. If the poster want to give
this a try, then do so and report the findings. I'm curious to know if
this can be done or not.
 
G

Guest

I still recall a Microsoft article that addressed this some time ago. If
anyone knows the whereabouts of this article, I would appreciate its URL.
 
S

Steven Cheng[MSFT]

Hi Pb,

If you want to configure your custom file extension to be served as asp.net
page (proceesed by PageHandler....), you can locate the <httpHandlers>
configure element in machine.config(for asp.net 1.x) or the global
web.config(for asp.net 2.0) under the framework's config folder....

By default, the ".aspx" extension is configured there like:

<httpHandlers>
...................
<add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory" />
......................

If you want to add a new file extension , just add a new entry like:

<add verb="*" path="*.mspx" type="System.Web.UI.PageHandlerFactory" />


Also, do not forget to add the IIS extension mapping in the IIS virtual
directory setting(redirect to the aspnet_isapi dll...)

Here is a web article which mentions some of this:

#How ASP.NET Web Pages are Processed on the Web Server
http://aspnet.4guysfromrolla.com/articles/011404-1.aspx

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




--------------------
| Thread-Topic: changing the .aspx extension
| thread-index: AcYbtCvLFGvY8HQ6QO6TwoZraYEJyA==
| X-WBNR-Posting-Host: 64.253.156.46
| From: "=?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?="
<[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
| Subject: Re: changing the .aspx extension
| Date: Tue, 17 Jan 2006 14:20:06 -0800
| Lines: 28
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:371562
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Extending ASP.NET
| http://msdn.microsoft.com/asp.net/reference/extend/default.aspx
| --
| HTH,
| Phillip Williams
| http://www.societopia.net
| http://www.webswapp.com
|
|
| "pb" wrote:
|
| > I still recall a Microsoft article that addressed this some time ago.
If
| > anyone knows the whereabouts of this article, I would appreciate its
URL.
| >
| > "Spam Catcher" wrote:
| >
| > > @f14g2000cwb.googlegroups.com:
| > >
| > > > There are called ASP.NET Custom Handlers.
| > > >
| > >
| > >
| > > Isn't it easier just to remap the extensions in IIS?
| > >
| > > --
| > > Stan Kee ([email protected])
| > >
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,838
Latest member
KandiceChi

Latest Threads

Top