web.config文件,asp.net [英] web.config file,asp.net

查看:117
本文介绍了web.config文件,asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,在我的项目中,有几页引发了异常,会话过期后有几页引发了错误,并且它们仅在屏幕上可见,所以我希望我不想看到异常或错误或连接失败消息代替它们,我只想通过"WEB.CONFIG"文件隐藏这些内容时重定向到登录页面.我已经编写了全局asax代码,并且已经在webconfig文件下编写了"CUSTOM ERRON MODE ="ON" DEFAULT REDIRECT ="LOGIN PAGE",但首先会显示异常错误,然后再请求登录页面,这样就可以解决我的问题

sir in my project several pages are there which throws exception and some pages after session expires throws the error and they are simply visible on the screen so my wish is that i do not want to see the exception or error or connection failure message instead of them i want to redirect to login page when these things are happed through "WEB.CONFIG" file only.i have written in the global asax code and i have written under the webconfig file that "CUSTOM ERRON MODE="ON" DEFAULT REDIRECT="LOGIN PAGE" ,IT WORKS FINE BUT FIRST IT SHOWING THE EXCEPTION ERROR THEN IT REDIRECTS TO LOGIN PAGE SO GIVE ME SOLUTION

推荐答案

您好,

不用担心错误.一旦将其部署到服务器中,当前在开发环境中显示的错误将不再显示.
Hi there,

Don''t worry regarding the error. The error that is currently showing in the development environment, once you deploy it in a server, will not show anymore.


这篇关于web.config文件,asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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