即使customErrors mode =" Off"获取默认错误页面 [英] getting a default error page even though customErrors mode="Off"

查看:116
本文介绍了即使customErrors mode =" Off"获取默认错误页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个工作网站。我将所有文件复制到inetpub / wwwroot中的新文件夹,然后将该文件夹设置为IIS中的虚拟目录。我尝试从新文件夹访问该网站,我得到一个默认的错误页面。这是我想要查看的aspx页面。


如果我输入一个假的页面名称,它会给出一个不存在的假名称的不同错误,这对我来说意味着它正在查看我要查看的页面但是给出的是错误并显示默认的错误页面:

<跨度类= codeLink 的onclick =模糊(此,this.parentNode.parentNode,的getChildren(本),TRUE); >展开 <跨度类= codeDivider > | <跨度类= codeLink 的onclick = 全选(本); >选择 <跨度类= codeDivider > | <跨度类= codeLink的onclick = 自动换行(在此);>裹 <跨度类= codeDivider> | 行号
解决方案
是IIS中设置如果发生错误,将用户重定向到默认错误页面?


虚拟目录是否允许ASPX页面运行?


到Frinavale:IIS确实重定向到def某些HTTP错误的ault页面:403; 14是Forbidden - Directory Listing Denied,500是Internal Server Error,501是Not Implemented,502是Bad Gateway。在这种情况下,我不认为我得到任何这些错误。你知道我怎么肯定吗?


到Plater:是的,据我所知,aspx页面可以在虚拟目录中运行。我让orignal网站在同一台机器上的虚拟目录中运行良好。这里唯一的区别是我将文件复制到一个不同的虚拟目录。


我需要有2个副本,以便我可以更改一个并且仍然可以使用原始文件查看。所以现在我只想在相同的机器上获得同一网站的2份副本。也许有更好的方法来做到这一点,而不是把第二个放在不同的虚拟目录中?


I have a working website. I copied all the files to a new folder in inetpub/wwwroot and then set that folder as a Virtual Directory in IIS. I try going to that site from the new folder and i am getting a default error page. It is an aspx page that I am trying to view.

If I put in a fake page name it gives a different error about that fake name not existing, which means to me that it is seeing the page I want to view but is giving an error and displaying the default error page:

Expand|Select|Wrap|Line Numbers

解决方案

Is your IIS set up to redirect the user to the default error page if an error occurs?


Do virtual directories allow ASPX pages to run?


to Frinavale: IIS does redirect to default page for certain HTTP errors: 403;14 is "Forbidden - Directory Listing Denied", 500 is "Internal Server Error", 501 is "Not Implemented", 502 is "Bad Gateway". I don''t think I am getting any of those errors in this case. Do you know how I can be sure?

to Plater: Yes, as far as I know, aspx pages can be run in virtual directories. I have the orignal website working just fine in a virtual directory on the same machine. The only difference here is that I copied the files into a different virtual directory.

I need to have 2 copies so that I can make changes to one and still have the original available to be viewed. So right now I am just trying to get 2 copies of the same website working on the same machine. Maybe there is a better way to do it than put the second one in a different virtual directory?


这篇关于即使customErrors mode =&quot; Off&quot;获取默认错误页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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