开发者

Test for default document request?

Is ther开发者_运维百科e a way to programmatically know when someone is using the Default Document feature of IIS to access my page (that is, the name of my .ASPX isn't in their URL anywhere)?


The only way I can think of is check the URL (to see if it's requesting http://localhost/virtual/ instead of http://localhost/virtual/default.aspx) and consider that the default document...

Not a feature for MVC or if you have url rewriting... and I don't know if an IIS feature for this either, unless for some reason it was added as a module and available via IIS 7...


I don't think there's a way to do this. If the default document feature is used, IIS just puts the document name into the URL before passing it to ASP.NET.

What are you trying to accomplish with this? You can turn default documents off if you like.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜