Connecting Tech Pros Worldwide Forums | Help | Site Map

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

ton
Guest
 
Posts: n/a
#1: Sep 18 '06
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




Sean Chambers
Guest
 
Posts: n/a
#2: Sep 18 '06

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


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:
Quote:
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
ton
Guest
 
Posts: n/a
#3: Sep 18 '06

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


thanx, it is simple and it works


"Sean Chambers" <dkode8@gmail.comschreef in bericht
news:1158593351.133943.74700@m73g2000cwd.googlegro ups.com...
Quote:
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:
Quote:
>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
>

Sean Chambers
Guest
 
Posts: n/a
#4: Sep 18 '06

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


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:
Quote:
thanx, it is simple and it works
>
>
"Sean Chambers" <dkode8@gmail.comschreef in bericht
news:1158593351.133943.74700@m73g2000cwd.googlegro ups.com...
Quote:
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:
Quote:
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
Closed Thread