473,735 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

"Descriptio n: 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 2858
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<customError s> 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...Plea se 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

"Descriptio n: 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...Plea se 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
<customError s> tag within a "web.config " configuration
file located in the root directory of the current web
applicatio n. 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 -->

<configuratio n>
<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 "defaultRedirec t" attribute of the application's
<customErrors > configuration tag to point to a custom
error page URL.
<!-- Web.Config Configuration File -->

<configuratio n>
<system.web>
<customErrors mode="RemoteOnl y"
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...Plea se 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

"Descriptio n: 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
<customErro rs> 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 ApplicationErro r() or Page.Error to handle
errors. Again, you must include the pdb file from what I know. Here are
some examples:

Sub Application_Err or(ByVal sender As Object, ByVal e As EventArgs)
Dim ex As Exception = Server.GetLastE rror()
If TypeOf ex Is SqlClient.SqlEx ception Then
If CType(ex, SqlClient.SqlEx ception).Number = 17 Then
Server.ClearErr or()

ErrorReport.Red irectToError(Er rorReport.Error Codes.DatabaseM aintenance)
End If
Else
If UseGlobalErrorH andler Then
Dim errorText As String = CreateException String(ex)
SendCriticalErr orEmail(errorTe xt)
HttpContext.Cur rent.Trace.Warn ("An error occured",
errorText)
Server.ClearErr or()
ErrorReport.Red irectToError(Er rorReport.Error Codes.Unknown)
End If
End If
End Sub
Public Shared Function CreateException String(ByVal ex As Exception) As
String
Dim text As New System.Text.Str ingBuilder("")
Dim NL As String = System.Environm ent.NewLine
If Not TypeOf ex Is System.Web.Http UnhandledExcept ion Then
text.Append("An error has occured." + NL)
text.AppendForm at("Time: {0}{1}", Now.ToString, NL)
text.AppendForm at("Request type: {0}{1}",
HttpContext.Cur rent.Request.Ht tpMethod, NL)
text.AppendForm at("Url: {0}{1}",
HttpContext.Cur rent.Request.Ur l.ToString, NL)
text.AppendForm at("Referrer: {0}{1}",
HttpContext.Cur rent.Request.Ur lReferrer, NL)
text.AppendForm at("Current username: {0}{1}",
Security.GetCur rentUsername, NL)
text.AppendForm at("Current user ID: {0}{1}",
Security.GetCur rentUserID, NL)
text.AppendForm at("Current user type: {0}{1}",
Security.GetCur rentUserType, NL)
text.AppendForm at("Source: {0}{1}", ex.Source, NL)
text.AppendForm at("Message: {0}{1}", ex.Message, NL)
text.AppendForm at("Stack trace: {0}{1}", ex.StackTrace, NL)
End If
If Not IsNothing(ex.In nerException) Then
text.AppendForm at("=========== =============== =========={0}{1 }",
NL, CreateException String(ex.Inner Exception))
End If
Return text.ToString
End Function
"Yongsub Eric Shin" <ya***@yaric.co m> 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

"Descriptio n: 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:\WIND OWS\Microsoft.N ET\Framework\v1 .1.4322\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
2029
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 presents a simple program which uses two classes, System and Runtime. And he suggests using packages.html to find those two classes. He says "If you look at the packages.html file, you'll see a list of all the different class libraries that come with...
5
1694
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 FrontEnd and has been OK while me and the missus have been using the program ourselves. Now We want to be able to give the program to others who mainly do not have MS Access installed., or if they do, have no idea what it is
5
23301
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, how would I reference the following BoundField ("NTAccount") in the Sub dvDetail_PreRender sub? Any help would be appreciated... <asp:BoundField DataField="NTAccount" HeaderText="NT Account" />
3
2256
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 WHERE myDate = #05/21/2004# in ms-access interface, it works fine !
6
2809
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, I copied the web.config file from the source code folder into the inetpub\wwwroot folder b/c that is where the ASP engine was looking for it.
4
1345
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
2067
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 message from IE: "Cannot find server or DNS error." I set some break points and determined that the page was being loaded, but that the error page was being displayed anyway. Fortunately, I'm pretty obsessive about logging errors (both in my...
22
2353
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 to look like: <script language='JavaScript'> ...do something AJAX-y </script>
0
8964
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8786
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9466
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9201
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8202
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6049
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4564
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.