Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > avoiding "server error in '/'application" error page (VBNET, Website)

Reply
Thread Tools

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

 
 
ton
Guest
Posts: n/a
 
      09-18-2006
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



 
Reply With Quote
 
 
 
 
Sean Chambers
Guest
Posts: n/a
 
      09-18-2006
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 <error> tags 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


 
Reply With Quote
 
 
 
 
ton
Guest
Posts: n/a
 
      09-18-2006
thanx, it is simple and it works


"Sean Chambers" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed) 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 <error> tags 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

>



 
Reply With Quote
 
Sean Chambers
Guest
Posts: n/a
 
      09-18-2006
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" <(E-Mail Removed)> schreef in bericht
> news:(E-Mail Removed) 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 <error> tags 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

> >


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Avoiding login page egsdar ASP .Net 7 04-13-2009 07:27 AM
Forms Authentication No Cache AND avoiding Web Page Has Expired Ms checkraiser@community.nospam ASP .Net 5 08-29-2008 10:10 AM
Question on avoiding page faults benben C++ 3 06-30-2005 03:45 AM
Avoiding bad <SCRIPT SRC=> hanging the page Pascal Damian Javascript 14 08-12-2004 05:22 PM
Avoiding Page numbers & Page URL JESS@hotmail.com ASP General 3 01-04-2004 09:05 PM



Advertisments