asp.net自定义错误页面和不带扩展名的文件 [英] asp.net custom error page and file without extension

查看:84
本文介绍了asp.net自定义错误页面和不带扩展名的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取IIS 7以返回我的自定义错误页面以获取不带扩展名的文件?我可以将其用于带有扩展名的文件,但是当未指定扩展名时,我将获得通用页面.

How can i get IIS 7 to return my custom error pages for file without extension? I got it working for file with extension, but when the extension is not specified, i get the generic page.

推荐答案

尝试

Try adding a wildcard application extension that maps to the aspnet_isapi.dll.

没有该映射,请求将永远不会到达aspnet dll进行处理,并且将返回默认的IIS 404页面.

Without that mapping, requests will never hit the aspnet dll for processing and the default IIS 404 page will be returned.

这篇关于asp.net自定义错误页面和不带扩展名的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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