Solved

Determining asp.net web page error details

Posted on 2014-09-18
11
237 Views
Last Modified: 2014-09-18
I have a simple form that returns feedback for a given user account.
Works great for me.  Gave it to someone else and it worked fine.  Third person sent over a screen shot of a
Server Error in '/...' application
Runtime error
An application error occurred on the server.  The current error settings...prevent you from viewing...for security reasons...

How can I determine what went wrong in the application?  I have try/catch blocks in the only places that something would throw an exception (or so I thought).  Is there a way to dump these errors to a file so I can review?
0
Comment
Question by:sirbounty
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 2
11 Comments
 
LVL 12

Accepted Solution

by:
Ramkisan Jagtap earned 500 total points
ID: 40330183
This is a uncaught exception so your try catch will not work here.
So you need to modify your web.config in order to view the error.
Update the CustomErros="Off" as below in web.config:

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
0
 
LVL 67

Author Comment

by:sirbounty
ID: 40330201
Ok, that gives me this:

Request timed out.
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

 Exception Details: System.Web.HttpException: Request timed out.

Source Error:
 An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:
[HttpException (0x80004005): Request timed out.]

 
The app runs a shelled powershell script, returning the results.  The built script works fine, so I don't know why the time-out.  Is there a place to adjust that?
0
 
LVL 67

Author Comment

by:sirbounty
ID: 40330248
I got the time out increased in the web.config, but it's still taking too long - the script runs fairly quick... Not sure why it's not returning the data in time.
0
Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 40330254
Please try debug the application and find where the application is returning that error.
Cant predict anything as there is no reference to code here.
0
 
LVL 67

Author Comment

by:sirbounty
ID: 40330402
Unfortunately it won't be easy to debug... I have vs on my workstation, but missing some of the powershell modules that would allow it to complete.
If I run the generated script on the server, it completes in 4-6 seconds.  Timeout is set to 180 seconds.
So I'm not sure how to proceed to test further.
I can post the code if you'd like, but it's really a basic text box, and a button.  Click the button and the powershell script is generated, launched, and stdout returned to be provided to a label.  That's it.  And it works with 'most' IDs.  This ID has about double the results that are normally returned, but it's not an impossible amount of data.  Maybe 40 lines of results, versus normal 20.  And like I said, the script is producing the output, so the only thing I could think of is maybe the label control has a limit of data that can be returned?
0
 
LVL 67

Author Comment

by:sirbounty
ID: 40330449
Nope, that doesn't seem to be it either - changed label1.text to response.write and it still times out...
0
 
LVL 67

Author Comment

by:sirbounty
ID: 40330486
It doesn't seem to be coming out of this, but I'm not sure what could be preventing the stdout from being received.  It nearly immediately completes when I fire it off outside the web app...
p.Start()
Do Until p.HasExited
  Threading.Thread.Sleep(750)
Loop
0
 
LVL 67

Author Comment

by:sirbounty
ID: 40330536
Increased timeout to 540, same results. :(
0
 
LVL 67

Author Comment

by:sirbounty
ID: 40330774
Is there nothing else that I can do to find out why it's timing out?
0
 
LVL 67

Author Comment

by:sirbounty
ID: 40330907
Weird - I took out the sleep loop and it completed... :\
0
 
LVL 67

Author Closing Comment

by:sirbounty
ID: 40330921
This wasn't the solution, but helped me get there - thanks!
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question