troubleshooting Question

Using Page.Trace.Write Commands

Avatar of Mariyam
Mariyam asked on
Microsoft IIS Web ServerASP.NET
4 Comments1 Solution251 ViewsLast Modified:
I have a VB.Net Asp.net web application developed in VS2010  in a Windows 7 environment with a SQL 2008 R2 backend.

I published it to my one of my test environments which is Windows Server 2008 running IIS 7.5 and converted the directory containing my files to an application in IIS.  The first page loads and allows me to insert text into the page text boxes but when I click on the submit button the data disappears as if the page is being reloaded instead of redirecting as instructed in the button_onclick event (server control).

In an effort to try to figure out why it's executing properly in dev but not in test I added some page.trace.write commands to find out if it's at least executing all of the lines of the _onClick code block but now the page.trace.write command appears to be causing an exception to be thrown.  What I mean by this is that before I added the Trace commands, the page executed with no exceptions but now is throwing an exception stating "Object reference not set to an instance of an object" (I had msgboxes that would display the exception information before but the app never threw an exception - I replaced them with the trace commands for deployment).  This message is rendered on line 130 as indicated in the Trace.axd file (in dev):

           130   Page.Trace.Write(ex.InnerException.ToString())

The line that throws the original exception causing  execution to branch to the Catch block is the Response.Redirect that is presently not happening in my test environment however when I attempt to examine the exception messages in dev  (Catch ex As Exception)  "ex" is "unable to evaluate" per the watch window.

My previous Page.Trace.Write commands do not cause any problems in or outside of the Try-Catch block and display properly in Trace.axd.  Most importantly, if I let execution continue after this exception is thrown, the page redirects and the application continues to execute properly all of the way to the end of the application.  Again this is in dev only, the default page just appears to reload instead of redirect in test.

I can delve into this a bit more on my own but would really appreciate it if someone could at least direct me to where I should concentrate the bulk of my effort.

TIA
-Mari
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros