你能说出扩展名为.html的aspx文件吗? [英] Can you name aspx files with the .html extension?

查看:74
本文介绍了你能说出扩展名为.html的aspx文件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让网络服务器处理一个html

文件作为aspx文件而不用aspx

扩展名命名。

Is there a way to get the webserver to process an html
file as a aspx file without naming it with the aspx
extension.

推荐答案

你好Rico,


这取决于是否对你的网络配置有一个axxess

网站。


IIS的工作方式,我想,其他服务器系统也是如此,文件的

扩展名决定了哪个处理器(dll)或者exe)处理

文件。例如,在我的系统上,* .aspx被定向到aspnet_isapi.dll。你需要将* .html的映射设置为相同的dll。


这个的缺点是< every> html文件将被处理为

aspx文件。这样可以正常工作,但它会强加aspx

处理器的开销,不得不弄清楚它并不总是处理aspx代码。


如果您有IIS文档,则主题是设置应用程序

Mappings。您可以使用扩展程序通过索引获取它作为关键字。


问候,

Fergus
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


未经测试:


编辑服务器上包含文件(或

整个网站)的虚拟目录的属性,并更改应用程序配置。


使用IIS,转到主目录选项卡,然后单击

应用程序部分中的配置。添加一个.html条目,其选项与.aspx

条目相同。


-

HTH,

- Tom Spink,überGeek


请回复新闻组,

所以所有人都可以受益

也许它是一款名为''惩罚用户''的游戏,

Rico Alexander" < RA ******** @ encoreusa.com>在留言中写道

news:0d **************************** @ phx.gbl ...

:有没有办法让网络服务器处理一个html

:文件作为aspx文件而不用aspx命名

:扩展名。
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.


有趣的是,我通过更改映射来完成你提到的内容

但它似乎没有把文件处理为aspx文件。我想知道

还有另外的安排。


***通过开发人员发送索引 http://www.developersdex.com ***

不要只是参加USENET ......获得奖励!
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!


这篇关于你能说出扩展名为.html的aspx文件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆