472,958 Members | 2,452 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,958 software developers and data experts.

where can i find the lines of error in Runtime Error Page?

Hi. I'm just a beginner in ASP.Net.
I started writing codes and I keep on getting this Runtime
Error page, where it says

"Description: An application error occurred on the server.
The current custom error settings for this application
prevent the details of the application error from being
viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error
message to be viewable on remote machines, please create a
<customErrors> tag within a "web.config" configuration
file located in the root directory of the current web
application. This <customErrors> tag should then have
its "mode" attribute set to "Off"."

Where can i find the lines of the error???
Nov 18 '05 #1
7 2787
As mentioned in your error details, the CustomError tag is
in Web.Config File of your application.

Thanks,
-Shan

-----Original Message-----
Hi. I'm just a beginner in ASP.Net.
I started writing codes and I keep on getting this RuntimeError page, where it says

"Description: An application error occurred on the server.The current custom error settings for this application
prevent the details of the application error from being
viewed remotely (for security reasons). It could, however,be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error
message to be viewable on remote machines, please create a<customErrors> tag within a "web.config" configuration
file located in the root directory of the current web
application. This <customErrors> tag should then have
its "mode" attribute set to "Off"."

Where can i find the lines of the error???
.

Nov 18 '05 #2
Thanks, Shan
I looked at the Web.config file,
but the lines about customError says

<!-- 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.
-->
<customErrors mode="OFF" />

i tried "ON", "REMOTEONLY" and "OFF" all of them
but i still don't get the exact lines of error..

You know like in ASP, if you have a syntax error in the
code, the browser shows the exact line #, but ASP.net has
the functionality too??

Sorry for kinda naive question...Please bear with this new
guy..>.<
Thanks..
-----Original Message-----
As mentioned in your error details, the CustomError tag isin Web.Config File of your application.

Thanks,
-Shan

-----Original Message-----
Hi. I'm just a beginner in ASP.Net.
I started writing codes and I keep on getting this

Runtime
Error page, where it says

"Description: An application error occurred on the

server.
The current custom error settings for this application
prevent the details of the application error from being
viewed remotely (for security reasons). It could,

however,
be viewed by browsers running on the local server

machine.

Details: To enable the details of this specific error
message to be viewable on remote machines, please create

a
<customErrors> tag within a "web.config" configuration
file located in the root directory of the current web
application. This <customErrors> tag should then have
its "mode" attribute set to "Off"."

Where can i find the lines of the error???
.

.

Nov 18 '05 #3
If the CustomErrors Mode is "ON". It will display the
error message with the Stack Trace which will basically
tell you the line number and the code where its erroring..

Thanks,
-Shan
-----Original Message-----
Thanks, Shan
I looked at the Web.config file,
but the lines about customError says

<!-- 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 wantto handle.
-->
<customErrors mode="OFF" />

i tried "ON", "REMOTEONLY" and "OFF" all of them
but i still don't get the exact lines of error..

You know like in ASP, if you have a syntax error in the
code, the browser shows the exact line #, but ASP.net has
the functionality too??

Sorry for kinda naive question...Please bear with this newguy..>.<
Thanks..
-----Original Message-----
As mentioned in your error details, the CustomError tag

is
in Web.Config File of your application.

Thanks,
-Shan

-----Original Message-----
Hi. I'm just a beginner in ASP.Net.
I started writing codes and I keep on getting this

Runtime
Error page, where it says

"Description: An application error occurred on the

server.
The current custom error settings for this application
prevent the details of the application error from being
viewed remotely (for security reasons). It could,

however,
be viewed by browsers running on the local server

machine.

Details: To enable the details of this specific error
message to be viewable on remote machines, please
createa
<customErrors> tag within a "web.config" configuration
file located in the root directory of the current web
application. This <customErrors> tag should then have
its "mode" attribute set to "Off"."

Where can i find the lines of the error???
.

.

.

Nov 18 '05 #4
Thanks again, Shan
I've tried to set the mode to "ON"
but it still doesn't display the Stack Trace.
it only displays following msgs

Runtime Error
Description: An application error occurred on the server.
The current custom error settings for this application
prevent the details of the application error from being
viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error
message to be viewable on remote machines, please create a
<customErrors> tag within a "web.config" configuration
file located in the root directory of the current web
application. This <customErrors> tag should then have
its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be
replaced by a custom error page by modifying
the "defaultRedirect" attribute of the application's
<customErrors> configuration tag to point to a custom
error page URL.
<!-- Web.Config Configuration File -->

<configuration>
<system.web>
<customErrors mode="RemoteOnly"
defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
-----Original Message-----
If the CustomErrors Mode is "ON". It will display the
error message with the Stack Trace which will basically
tell you the line number and the code where its erroring..

Thanks,
-Shan
-----Original Message-----
Thanks, Shan
I looked at the Web.config file,
but the lines about customError says

<!-- 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.
-->
<customErrors mode="OFF" />

i tried "ON", "REMOTEONLY" and "OFF" all of them
but i still don't get the exact lines of error..

You know like in ASP, if you have a syntax error in the
code, the browser shows the exact line #, but ASP.net has
the functionality too??

Sorry for kinda naive question...Please bear with this

new
guy..>.<
Thanks..
-----Original Message-----
As mentioned in your error details, the CustomError tag

is
in Web.Config File of your application.

Thanks,
-Shan
-----Original Message-----
Hi. I'm just a beginner in ASP.Net.
I started writing codes and I keep on getting this
Runtime
Error page, where it says

"Description: An application error occurred on the
server.
The current custom error settings for this application
prevent the details of the application error from beingviewed remotely (for security reasons). It could,
however,
be viewed by browsers running on the local server
machine.

Details: To enable the details of this specific error
message to be viewable on remote machines, please

createa
<customErrors> tag within a "web.config" configuration
file located in the root directory of the current web
application. This <customErrors> tag should then have
its "mode" attribute set to "Off"."

Where can i find the lines of the error???
.

.

.

.

Nov 18 '05 #5
I think that the only way you can get the line number is to upload the pdb
file with your apps dll file. If you are using the release dll, you must
add pdb creation to your project settings. But if you do upload the pdb
file, make sure that you are handling all errors yourself (I don't think the
customerrors section is what you are looking for since an error just causes
a redirect to the error page and the stack is lost. What you should look
into is the Global.asax file at ApplicationError() or Page.Error to handle
errors. Again, you must include the pdb file from what I know. Here are
some examples:

Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
Dim ex As Exception = Server.GetLastError()
If TypeOf ex Is SqlClient.SqlException Then
If CType(ex, SqlClient.SqlException).Number = 17 Then
Server.ClearError()

ErrorReport.RedirectToError(ErrorReport.ErrorCodes .DatabaseMaintenance)
End If
Else
If UseGlobalErrorHandler Then
Dim errorText As String = CreateExceptionString(ex)
SendCriticalErrorEmail(errorText)
HttpContext.Current.Trace.Warn("An error occured",
errorText)
Server.ClearError()
ErrorReport.RedirectToError(ErrorReport.ErrorCodes .Unknown)
End If
End If
End Sub
Public Shared Function CreateExceptionString(ByVal ex As Exception) As
String
Dim text As New System.Text.StringBuilder("")
Dim NL As String = System.Environment.NewLine
If Not TypeOf ex Is System.Web.HttpUnhandledException Then
text.Append("An error has occured." + NL)
text.AppendFormat("Time: {0}{1}", Now.ToString, NL)
text.AppendFormat("Request type: {0}{1}",
HttpContext.Current.Request.HttpMethod, NL)
text.AppendFormat("Url: {0}{1}",
HttpContext.Current.Request.Url.ToString, NL)
text.AppendFormat("Referrer: {0}{1}",
HttpContext.Current.Request.UrlReferrer, NL)
text.AppendFormat("Current username: {0}{1}",
Security.GetCurrentUsername, NL)
text.AppendFormat("Current user ID: {0}{1}",
Security.GetCurrentUserID, NL)
text.AppendFormat("Current user type: {0}{1}",
Security.GetCurrentUserType, NL)
text.AppendFormat("Source: {0}{1}", ex.Source, NL)
text.AppendFormat("Message: {0}{1}", ex.Message, NL)
text.AppendFormat("Stack trace: {0}{1}", ex.StackTrace, NL)
End If
If Not IsNothing(ex.InnerException) Then
text.AppendFormat("=============================== ====={0}{1}",
NL, CreateExceptionString(ex.InnerException))
End If
Return text.ToString
End Function
"Yongsub Eric Shin" <ya***@yaric.com> wrote in message
news:0c****************************@phx.gbl...
Hi. I'm just a beginner in ASP.Net.
I started writing codes and I keep on getting this Runtime
Error page, where it says

"Description: An application error occurred on the server.
The current custom error settings for this application
prevent the details of the application error from being
viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error
message to be viewable on remote machines, please create a
<customErrors> tag within a "web.config" configuration
file located in the root directory of the current web
application. This <customErrors> tag should then have
its "mode" attribute set to "Off"."

Where can i find the lines of the error???

Nov 18 '05 #6
The setting you had originally:

<customErrors mode="Off" />

should give you the maximun feedback, including line numbers. I am not sure
about case sensitivity of attribute values (names are for sure) but I
wouln't write "OFF" if the documentation says "Off".

You may also want to have

<trust level="Full" originUrl="" />

while you don't want to be dealing with security yet. It you're not in the
server domain or your client machine has limited rights for some other
reason you may have similar problems.

If it still doesn't work you want to check your machine.config on the server
machine(C:\WINDOWS\Microsoft.NET\Framework\v1.1.43 22\CONFIG) to see if the
setting isn't sealed with an allowOverride="true".

This is also good reading if you can't get enough:
http://msdn.microsoft.com/library/de...l/THCMCh09.asp

Martin.
Nov 18 '05 #7
I discovered something just now that may help.

If your web.config file is found insuitable for some reason you may get this
deceptive error message that goes on about the customErrors setting.

I added a <processModel> tag and was urged to set customErrors to Off, which
is total bull-shit in this context. customErrors has been Off all the time,
I had never a problem with getting error information and it has nothing to
do with the problem. Removing the <processModel> tag made it work again.
Mind that I could hardly believe it and checked web.config for
well-formedness. It was well formed, the processModel element caused the
problem.

So if nothing seems to work, try starting with a clean web.config

Martin.
Nov 18 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: eBob.com | last post by:
Well I am now on page 84 of Bruce Eckel's "Thinking in Java". (... having made significant progress since the help you guys gave me in response to my last question about page 34.) Here he...
5
by: Bob Dydd | last post by:
Hi Everybody I have an Access 2000 MDB with the Usual FrontEnd/BackEnd Arrangement. The program depends on being able link to "Inbox" in Ms Outlook 2000. This is easy enough to do from the...
5
by: sck10 | last post by:
Hello, I am using the code below to set the values of a DetailsView template field using FindControl. My question is how would you find a control if its a Boundfield control? For example,...
3
by: Yannick | last post by:
Hi, I try to execute request on a ms-access database but I have a problem with date. the "myDate" field's format is "date/time" my request is: SELECT myCode, myStuff, myDATE FROM myTable ...
6
by: BookerW | last post by:
Ok interesting, on my local machine And i did not do a good job of keeping track of the exact order.... but on my local machine in which i have vis studio 2003 installed and IIS for win XP,...
4
by: MSDN | last post by:
Hello, Where can I find the following in 2.0 #region Web Form Designer generated code override protected void OnInit(EventArgs e) { InitializeComponent(); base.OnInit(e); }
2
by: Mike Hofer | last post by:
In my ASP.NET application, *one* page would not render in the application. All others would show up just fine, but when the user clicked the button to browse to this one page, I'd get a nasty error...
22
by: Christopher Nelson | last post by:
I have a little menu system which essentially takes HTML like: <div id='foo'></div> and retrieves foo.shtml from the server and inserts it inside the <div>. But sometimes I'd like foo.shtml...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.