web.config文件,asp.net

编程入门 行业动态 更新时间:2024-10-14 16:27:40
本文介绍了web.config文件,asp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

先生,在我的项目中,有几页引发了异常,会话过期后有几页引发了错误,并且它们仅在屏幕上可见,所以我希望我不想看到异常或错误或连接失败消息代替它们,我只想通过"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

本文发布于:2023-11-02 00:21:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550830.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   config   web   asp   net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!