468,309 Members | 1,201 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,309 developers. It's quick & easy.

avoiding "server error in '/'application" error page (VBNET, Website)

ton
Hi,
I've developed some webcontrols in VB, I'm using these in a website project
If the webcontrol is getting an error I ll get the message:
Server error in '/' application, and than more information.
This can occur, but I donot want to see this error page. In stead I want the
program to show a standard form where I can tell that bla vla bla and try
again later. In the ASP.NET configuration I can specify a URL in case of an
error. But I'll do not see this to be used.

Who can tell ?

thanx

ton

Sep 18 '06 #1
3 2700
In your web.config, set customErrors to ON:
<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom
error messages, "Off" to disable.
Add <errortags for each of the errors you want to handle.

"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users
not running
on the local Web server. This setting is recommended for
security purposes, so
that you do not display application detail information to
remote clients.
-->
<customErrors mode="on" />

ton wrote:
Hi,
I've developed some webcontrols in VB, I'm using these in a website project
If the webcontrol is getting an error I ll get the message:
Server error in '/' application, and than more information.
This can occur, but I donot want to see this error page. In stead I want the
program to show a standard form where I can tell that bla vla bla and try
again later. In the ASP.NET configuration I can specify a URL in case of an
error. But I'll do not see this to be used.

Who can tell ?

thanx

ton
Sep 18 '06 #2
ton
thanx, it is simple and it works
"Sean Chambers" <dk****@gmail.comschreef in bericht
news:11*********************@m73g2000cwd.googlegro ups.com...
In your web.config, set customErrors to ON:
<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom
error messages, "Off" to disable.
Add <errortags for each of the errors you want to handle.

"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users
not running
on the local Web server. This setting is recommended for
security purposes, so
that you do not display application detail information to
remote clients.
-->
<customErrors mode="on" />

ton wrote:
>Hi,
I've developed some webcontrols in VB, I'm using these in a website
project
If the webcontrol is getting an error I ll get the message:
Server error in '/' application, and than more information.
This can occur, but I donot want to see this error page. In stead I want
the
program to show a standard form where I can tell that bla vla bla and try
again later. In the ASP.NET configuration I can specify a URL in case of
an
error. But I'll do not see this to be used.

Who can tell ?

thanx

ton

Sep 18 '06 #3
You can even tell it to display an html page that you made like so:

<customErrors defaultRedirect="404.html" mode="On">
<error statusCode="404" redirect="404.html" />
</customErrors>

ton wrote:
thanx, it is simple and it works
"Sean Chambers" <dk****@gmail.comschreef in bericht
news:11*********************@m73g2000cwd.googlegro ups.com...
In your web.config, set customErrors to ON:
<!-- CUSTOM ERROR MESSAGES
Set customErrors mode="On" or "RemoteOnly" to enable custom
error messages, "Off" to disable.
Add <errortags for each of the errors you want to handle.

"On" Always display custom (friendly) messages.
"Off" Always display detailed ASP.NET error information.
"RemoteOnly" Display custom (friendly) messages only to users
not running
on the local Web server. This setting is recommended for
security purposes, so
that you do not display application detail information to
remote clients.
-->
<customErrors mode="on" />

ton wrote:
Hi,
I've developed some webcontrols in VB, I'm using these in a website
project
If the webcontrol is getting an error I ll get the message:
Server error in '/' application, and than more information.
This can occur, but I donot want to see this error page. In stead I want
the
program to show a standard form where I can tell that bla vla bla and try
again later. In the ASP.NET configuration I can specify a URL in case of
an
error. But I'll do not see this to be used.

Who can tell ?

thanx

ton
Sep 18 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Krishnamoorthy | last post: by
2 posts views Thread by news.microsoft.com | last post: by
5 posts views Thread by Bruce Schechter | last post: by
2 posts views Thread by Andy Chen | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.