Debugging 500 Internal Server Errors [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Can someone tell me what are the best methods for debugging why a 500 error was thrown if it's not being stored in the logs? I have a website written in C# and am using SQL Server Management Studio.
The problem is that a user is sometimes getting 500 errors on logging into the site. I'm using Elmah to log errors in the database, and it usually works great, but it is not logging these errors in particular. I know this for a fact because I know what time the error occurred, and all the logs are timestamped.
Are there any other tools I could be using if error logs aren't showing these errors?
I apologize if this question is a duplicate, but I searched lots of other posts and didn't find a match.

IIS has several logs. Look for a folder called HTTPErr, probably in Windows\System32\logfiles. This can contain more data.
With a 500 error, it won't ever get to your code, most likely, so there's not a lot you can do really.

Related

WebApi2 Status Code 500 {"message":"An error has occurred."} With no Detail [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
i facing an Error in my webApi App and I've searched a lot but nothing works for me.
my application works fine on my local computer and even it works fine with IIS on my local PC. but when I deploy it on the server ( debug and release mode tested) it just give me Internal Error 500 with just
{"message":"An error has occurred."}
in response and no detail.
I tried almost everything. I turned off Custom Error mode I put this line in my Global.asax ( application _start method )
GlobalConfiguration.Configuration.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always;
I really don't know how can I get the error detail.
I would be very grateful if someone can help me.
I tried everything but just deleting the application pool and recreate that everything went right. I don't know what was the exact problem but it solved my problem

capture exceptions and write to log [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I would like to set up something for logging that will capture any exception or such that my projects might run into that I haven't been able to anticipate with say a try{} catch{}.
The project I'm working on has too many possible places where something can happen, and I need to be able to capture those instances and write them out to a log that I can read and be made aware of problems.
I've seen references to log4net, but I'm not familiar enough with it to know if it can log any uncaught exceptions, or other errors.
Thank you.
Use ELMAH for logging your errors, follow this link as to implement it in winforms.

Testing for C# vulnerabilities [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I'm a tester in a company that uses Java for all its (web)applications. One of the first things I do when testing a new feature or build is using a ridiculously large numbers on input fields.
If the programmer was sloppy, I get a stacktrace on the screen or in the log. For me this is a quick way to get a first impression about the quality.
But now my company has purchased a web application which is programmed in C#. My question is, can I use the same method as I do on Java apps? Are there other ways to quickly bring a C# app to its knees?
If a programmer converts text into a numeric value, and he did not validate the data nor catch any exceptions, an exception may appear to the end user. This is also true for C#.
However keep in mind you're just poking at the software this way. The programmer in question may have tried out "bad input" and wrapped the whole thing in a try { ... } catch {} block that just ignores the exception.
If the test fails (exception details appear) you can quickly conclude that the software has input validation flaws, but if no exception details appear, the quality of the product may be just as bad.

IE error message: "This website has been reported as unsafe" [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have written a site in C# asp.net and I am running it of IIS7.5.
Site works perfectly well with other browser than IE9 and IE10. In these browsers i get this error message:
http://imageshack.us/photo/my-images/16/unsafefilterss.png/
The site is http://filterss.net
I am kinda at a loss and I do not really know what I need to change in my programming to make this warning go away. Anyone has any experience with this error?
The obvious question is: "Have i programmed inn malicious software on my site?", No, i have not. Can my programming be exploited? well, yes i would think so, since there is no 100% safe way of coding.
Is there then any concrete reason for this message to appear? Anything that i can change in my code so that it will go away?
The only thing i can think of at the moment is that you have torrents in your meta keywords tag

Need emergency help with dw20.exe process? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
recently I have deployed asp.net application to production windows server 2008.
after 10-20 min, starts dw20.exe process (Microsoft.net error reporting shim), which takes almost all CPU available which cause to very slow response of my application.
No error no exception in Event Viewer.
I right clicked on the dw20.exe process and created the dump file to analyze what causing the issue.
Then I opened this file in WidDbg. run command .loadby sos mscorwks and get Unable to find module 'mscorwks'
It looks like I'm missing something or doing it wrong.
How to determine what cause an exception in application? how to analyze DMP file created?
Is it possible to stop this service?
Try adding ELMAH (http://code.google.com/p/elmah/) to the project so that you can grab the error info in an easier fashion.
When we get hit by rogue CPU, we use Sam Saffron's CPU analyzer to see what it is busy doing. Most times it turns out to be a bad regex (no, seriously; this bites too often for comfort).
The problem was that one of the method caused recursive loop.

Categories