By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,883 Members | 1,265 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,883 IT Pros & Developers. It's quick & easy.

Can you name aspx files with the .html extension?

P: n/a
Is there a way to get the webserver to process an html
file as a aspx file without naming it with the aspx
extension.
Nov 20 '05 #1
Share this Question
Share on Google+
16 Replies


P: n/a
Hi Rico,

It depends on whether to have axxess to the configuration of your web
site.

The way IIS works, and, I imagine, other server systems too, is that the
extension of the file determines which processor (dll or exe) handles the
file. On my system, for instance, *.aspx is directed to aspnet_isapi.dll. You
would need to set the mapping for *.html to the same dll.

The downside of this is that <every> html file would be processed as an
aspx file. This would work ok but it would impose the overhead of the aspx
processor having to figure out that it's not always dealing with aspx code.

If you have the IIS documentation the topic is "Setting Application
Mappings". You can get it via the index using "extension" as the keyword.

Regards,
Fergus
Nov 20 '05 #2

P: n/a
Untested:

Edit the properties of the virtual directory containing the file (or the
entire website) on the server and change the application configuration.

Using IIS, go to the Home Directory tab, and click Configuration in the
Application section. Add a .html entry, with the same options as the .aspx
entry.

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

"Maybe it's a game called 'Punish the User'"
"Rico Alexander" <ra********@encoreusa.com> wrote in message
news:0d****************************@phx.gbl...
: Is there a way to get the webserver to process an html
: file as a aspx file without naming it with the aspx
: extension.
Nov 20 '05 #3

P: n/a
Funny thing is that I did what you mentioned by changing the mappings
but it didn't seem to process the file as an aspx file. I wonder is
there an additional settting.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #4

P: n/a
If that's the case, then it'll be the actual extension just dismissing the
..html file as a non executable webpage. There's nothing you can do about
that unfortunately.

May I ask why you wish to do this?

--
HTH,
-- Tom Spink, Über Geek

Please respond to the newsgroup,
so all can benefit

"Maybe it's a game called 'Punish the User'"
"Rico Alexander" <ra******@ucla.edu> wrote in message
news:Ot**************@TK2MSFTNGP11.phx.gbl...
: Funny thing is that I did what you mentioned by changing the mappings
: but it didn't seem to process the file as an aspx file. I wonder is
: there an additional settting.
:
:
:
: *** Sent via Developersdex http://www.developersdex.com ***
: Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #5

P: n/a
Hi Rico,

You could have mentioned that you've tried remapping. Two peope have
wasted their time investigating for you and writing about something you
already know.

Regards,
Fergus
Nov 20 '05 #6

P: n/a
Hi again,

Second thoughts
..
moan, moan ... unless you mean you've tried it because I mentioned it.
In which case I apologise.

Sorry, I know of no other settings. Just to point out the obvious - you
have to do it on a per-application basis.

Regards,
Fergus
Nov 20 '05 #7

P: n/a
I'm converting a site to asp.net and don't want to have to rename all
the files and the links to match the aspx extension, but it's not that
big a deal. Would be nice though to hide the technology behind a site
by using the standard htm extensions which everyone is used to.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #8

P: n/a
No, you're right, I should have been more descriptive of what steps I've
already taken. I'm kind of new to the forum and the setup. Thanks for
your help.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #9

P: n/a
Hi Rico,

No worries, and welcome to the group. I'm just very tired tonight. I
shouldn't have snapped at you.

Regards,
Fergus
Nov 20 '05 #10

P: n/a
After changing the IIS mapping, you have to change the ASP.NET configuration
and tell it to process the HTML extension using the same handler as the ASPX
extension. This is done in the machine.config file, look a the file and you
should be able to figure out how to do it.

--
TJoker, MCSD.NET
MVP: Paint, Notepad, Solitaire

****************************************
"Rico Alexander" <ra******@ucla.edu> wrote in message
news:Ot**************@TK2MSFTNGP11.phx.gbl...
Funny thing is that I did what you mentioned by changing the mappings
but it didn't seem to process the file as an aspx file. I wonder is
there an additional settting.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #11

P: n/a
Hi TJoker,

|| MVP: Paint, Notepad, Solitaire

Big-time LOL :-))

Regards,
Fergus
Nov 20 '05 #12

P: n/a
Hi again, TJ,

Can I have permission to borrow this joke for a while, please?

Regards,
Fergus
Nov 20 '05 #13

P: n/a
Hello,

"Fergus Cooney" <fi******@tesco.net> schrieb:
Can I have permission to borrow this joke for a while,
please?


ROFLM*O

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #14

P: n/a
There are plenty other bug-free products out there :) You can be a Command
Prompt MVP, but feel free to reuse the joke. It's all about reusability here
!

cheers

--
TJoker, MCSD.NET
MVP: Paint, Notepad, Solitaire

****************************************
"Fergus Cooney" <fi******@tesco.net> wrote in message
news:uR**************@TK2MSFTNGP12.phx.gbl...
Hi again, TJ,

Can I have permission to borrow this joke for a while, please?

Regards,
Fergus

Nov 20 '05 #15

P: n/a
Hi TJ,

Thanks. Re-use that's the spirit.

I like the sound of Command Prompt MVP, but I'm not <that> good.

Cheers,
Fergus
MVP [Windows Start button, Shutdown dialogue]
Nov 20 '05 #16

P: n/a
Cor
Fergus,
That is the most honourable I think, all dificult things in the Microsoft
software are still done by Command Prompt.
:-)
Cor
Nov 20 '05 #17

This discussion thread is closed

Replies have been disabled for this discussion.