tags:

views:

59

answers:

3

Running the code on my local box is running just fine. As soon as I load the code on my server it is having issues. I can't see the issues because my UI code is calling a webservice via jquery and the webservice is calling into the .cs file that is having an issues. The webservice just returns a failure to the jquery.

Any ideas or help is greatly appreciated.

A: 

In short, you will need to add lots of logging in the area of code which is behaving oddly to give you clues as to what is happening on the server.

If the webservice is running on ASP.NET, you can use the built-in logging by enabling trace in your Web.config, and then logging likethis : HttpContext.Current.Trace.Write("hello");. All of the HTTP queries and your custom logging can then be viewed by going to http://host/Trace.axd

If not on ASP.NET you can either use a library like log4net or roll your own.

Yoshi
+4  A: 

Use the Remote Debugging tools to attach to the W3WP process on the server.

Yuriy Faktorovich
This very risky SLoret, and Yuriy. This will require a bunch of privileges, including the member who is debugging to be a member of Administrator's group. It would require DCOM privilges, and above all while you are debugging the web application, all the other pages running under the same application pool will appear "hung" simply because you will be debugging and debugging an application disables timeout. See my comment for further details. Yoshi's comment is also a much more feasible option.
Rahul Soni
@Rahul he wasn't specific if the server was production or development. I'd hope he is talking about a development server.
Yuriy Faktorovich
Yes @Yuriy, I added my comment nevertheless almost as a kind of disclaimer, because remote debugging is way too demanding and harmful too, if you aren't aware of the complications that may happen because of this.
Rahul Soni
A: 

Although you could use Yuriy's approach, i wouldn't recommend it since debugging any process as such in production will ensure than none of your other pages will execute during that time since you would have hit the breakpoint.

Add Debug statements inside your Web Service... something like System.Diagnostics.Debug.WriteLine("write more information here");

Run DebugView on the Production server.

http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx

Hope this helps, Rahul

Rahul Soni