Debugging an issue on an asp.net production server - asp.net

I am attempting to debug an issue on asp.net production server. On production, when the hyperlink is clicked, it displays a pop-up window with a custom error message. There is no Try Catch Finally or any sort of error logging process currently on the server.
Given that my local version works perfectly fine, and that I am not allowed to access the production code files (being contractor), how should I go about debugging the error ?

Related

Server error when copying ASP.NET code to another host

Sorry for the simple question.
I have moved a site to a host by simply copying the code but even the first login page fails if I include the following :-
In Web.config file..if I add the following
or...
Aspx page..if I include a reference to a class file ( which does exist in the app_code directory )
Sign In <%If clsGeneral.str(Request("timeout")) = "t" Then Response.Write(" - YOUR SESSION EXPIRED")%>
I get the error...
Server Error in '/' Application.
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.
etc...
Copying an application from one host to another is only simple in the file copy. There are a number of issues that may arise from the application running on the "new" server. For example, is the server running the same version of IIS? Is IIS configured properly for this application? Etc ... to see what error the application is throwing, inspect the Application Log in the event viewer on the server. This will give you some hint as to what the issue is. Without that information, there's really no place you can start, except maybe turning off the custom error or error suppression to see the error details in the browser. But I would recommend that you inspect the Application event log on the server.

IIS 500 error on postback or upload on some computers

I run a website on IIS 8.5 and ASP.NET. I recently moved my website to a new server. Some users are getting an internal server error when trying to postback or upload on the site. As an example, when they try to reply in the forum (I use YetAnotherForum), they will get the error page.
I think I've narrowed it down to postbacks. Whenever there is a postback, they will get the error. This includes using ASP.NET buttons on the page.
My big problem is that the error is not logged anywhere. It is not in the event viewer, failed request logs, or even the server log. I have all application errors caught and logged in Global.asax, but the error never reaches the handler. The users just get the error on the screen and it doesn't seem to be recognized at all by the server. Here is a screenshot of the error:
Generic IIS Error
As you can see, it is a very generic IIS error.
I am still maintaining a test site on my old server. I sent one person that was getting the error to the test site to see if he got the error. He did not - he only gets the error on the new site on the new server. I'm guessing it must be some setting I am missing.
Only a select few users are getting the error. The ones I have talked to are using Windows 10. They have tried all of the different browsers (IE, Firefox, and Chrome), and none of them work. I also have Windows 10, but I do not get the error.
Any chance someone has seen this error and knows the fix?

Debugging a vb.net web site project - "Breakpoint will not currently be hit. No symbols have been loaded for this document"

I recently received a vb asp.net web site project that I want to debug. The site uses .Net 4 so I've created a new site within IIS and created an app pool. The site runs locally as I want so now I need to debug it.
I'm running VS2010 so I attached this to the W3WP.exe process associated with my newly created app pool, so far so good. Problem is that when I insert a break point into any of the .aspx.vb pages I get the message "Breakpoint will not currently be hit. No symbols have been loaded for this document" appearing next to the break point.
In order to try and get VS2010 to link up with the site in IIS I manually inserted an error using notepad into one of the .aspx.vb pages. This upsets the page nicely in internet explorer but it is not causing VS2010 to debug the page.
I did not originally write this site and I can't talk to the original developer to understand the intricacies. I've done some research on this problem and have found a number of people discussing this error, but each person has previously been able to debug their page and it stops for no reason, my case is different as I'm only able to debug the page by attaching VS to the IIS process.
Any pointers would be greatly received.
Insert the breakpoint in the debugging mode. You may be inserting the breakpoint before debugging. While debugging the application, open the Script explorer(which comes as Script documents in the Script explorer) which shows all currently running pages. Select the one from them which you want to debug and try to insert a debug point there.

ASP will not run unless logged into console

I am moving an existing ASP application from IIS5 on Win2003 to IIS7 on Win2008.
After going over all the install notes and setting up ASP to run, everything worked fine while I was logged into the console.
As soon as I log off the console, no ASP application will run. I get a 500 error even though normal .htm pages will render from the site fine.
I tried a simple page with only a response.write " Hell " and it fails with a 500 error. I set up Failed Request error logging and it just says 500 error as soon as it calls the ASP script.
How can this be solved?
Solution
Tweaked a setting in IIS:
Internet Information Services (IIS) Manager ->
Default Web Site ->
Error Pages properties
select Detail errors
Reset to Detailed errors only and now everything works
Out of the blue Google Search:
Classic ASP on IIS7: refusing to send errors to browser on 500 Internal Server Error
Does this help you ?

500 - Internal server error for ASPX page

I have created one test.aspx and my local machine it is working fine. Once I upload the same to server the page is not working. It's showing
500 - Internal server error. There is a problem with the resource you
are looking for, and it cannot be displayed.
It is impossible to help you without getting more info about the IIS configuration on your local machine and the server.
However, here's a quick stab of some things you should look at:
Check if Asp.net is installed on the server.
Make sure your app is targeting the proper .Net version that is on the server.
Check if all the assemblies your code is using are deployed correctly on the IIS server.
Add some exception handling and error logging to your code.
In particular, I'd venture to make a wild guess that your page is using some code that requires the IIS7 integrated pipeline and your server is either running IIS6 or is running IIS7 in classic mode. Though this is a stab in the dark and could turn out to be completely wrong. :-)
500 server errors are as useful as saying 'something broke'. They are the result of literally any exception you code throws plus anything else IIS croaks on. From your error msg, it sounds like an IIS config issue but it could still be your code. attaching a debugger to it would eliminate that possibility.
If you haven't looked at the server event log you can see if it registered anything.
There are a number of things that you can do to try to get a better, more specific exception. One way I try to diagnose them is to connect a remote debugger so I can see what's going on. If you have access to do so, I'd go that route.
You will need admin access to the server to install the Visual Studio remote debugging client (I'm assuming this is a .net app).
Another thing that can help are try/catch blocks and logging to a file or the event log--but have have to change your app most likely to implement that.
You have probably forgotten to upload the associated .dll. Have you tried right clicking on the project and using the publish feature?
If you are using IE, then you also need to turn off the "Show friendly error messages" option in Tools - Options - Advanced settings so that you get more details.
You may also need to change the web.config file so that error message details are shown, see the CustomErrors tag.

Resources