473,385 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Can you name aspx files with the .html extension?

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
16 3987
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
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
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
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
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
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
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
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
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
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
Hi TJoker,

|| MVP: Paint, Notepad, Solitaire

Big-time LOL :-))

Regards,
Fergus
Nov 20 '05 #12
Hi again, TJ,

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

Regards,
Fergus
Nov 20 '05 #13
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thomas | last post by:
I would like to use something like .x rather than .aspx for my asp.net projects. One reason is, I'd rather everyone not know what language/platform our projects are written in. (I like security AND...
11
by: Bruce W...1 | last post by:
Would the code-behind and all ASP.NET functionality still work if the ..aspx files had instead .htm extensions? I suppose it boils down to whether the page directives would still work. Thanks...
4
by: pawel | last post by:
Hi! I have an .aspx page which returns an image. This page takes some GET parameters, so URL looks like this: http://localhost/page.aspx?id=1234 Now, when the user click this link, I want that...
7
by: Shaul Feldman | last post by:
Hello, the question is how can I masquerade ASPX files behind HTML extension? Thank you in advance. -- With the best wishes, Shaul Feldman
4
by: Don Wash | last post by:
Hi All! I'm getting the following Error: No DLLs has been compiled yet and nothing in the \bin directory. So it is not the versioning problem or anything like that. And here are the...
6
by: Philipp Schmid [MSFT] | last post by:
I am trying to add a Generic Handler (ASHX) to my web site solution. In order to do that I have to specifiy an assembly name in the web.config file. But since 2.0 web sites are no longer...
24
by: John Rivers | last post by:
ASPX which means ASPX pages, the code-behind concept, User Controls, Web Controls etc. is very poorly designed and makes it extremely hard to develop professional quality web applications. ASPX...
3
by: stewdean | last post by:
Hi, Before I start I'm a neebie and I've spent the last day getting some basics on .net but come from a unix background. I currently have a site that needs to keep it's HTML file endings, I...
19
by: =?Utf-8?B?anZjb2FjaDIz?= | last post by:
I've got a global.aspx file that works in my dev environment (vs 2005). When i publish the site to a windows 2000 sp4 box running IIS, the global does not seem to fire. Since it's a test server,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.