构建处理程序时,应为.ashx还是.axd? [英] When building a Handler, should it be .ashx or .axd?

查看:45
本文介绍了构建处理程序时,应为.ashx还是.axd?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

说我要建立一个继承自 IHttpHandler 的ASP.Net类,应该将其连接到以 .ashx 结尾的URL,还是应该使用 .axd 扩展名?

Say I'm building an ASP.Net class that inherits from IHttpHandler, should I wire this up to a URL ending in .ashx, or should I use the .axd extension?

只要没有命名冲突,这有关系吗?

Does it matter as long as there's no naming conflict?

推荐答案

嗯..ScottGu说没关系,但是.ashx稍好一点,因为与trace.axd等事物发生冲突的可能性较小.这就是为什么我脑海中浮现出.ashx可能更好的标记的原因.

Ahh.. ScottGu says it doesn't matter, but .ashx is slightly better because there's less chance of a conflict with things like trace.axd and others. That's why the flag went up in my head that .ashx might be better.

http://forums.asp.net/t/964074.aspx

这篇关于构建处理程序时,应为.ashx还是.axd?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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