Slower is Faster
Slower is Faster

Reputation: 51

ASP.Net Server Debugging

I am having a problem with my application. The application works perfect on my development machine. It fails, without any errors on the live server. The page loads, but the code doesn't execute apparently.

I have been stuck on this for a while because I can't figure out how to get any information on the problem. There are no errors, so my custom errors settings in web.config are not helping.

I looked around online and I heard there was some remote debugging tool. The article was from .Net 1.0. I tried to follow it, but its not going to work because I am using a shared server. I do not have permissions to start the remote debugger on the server side.

I tried creating some output text files with variable contents, but the files are not being created either. They are created on my development machine, but never show up on the server, again with no error.

I have no idea how I'm supposed to figure out what is going on, because I'm not able to step through the code once it's on the live server.

Is there anyway to step through, or debug the code once I've published it? If I spent the extra money on a VPS, would that allow me to debug on the server side? I'm assuming I could just install Visual Studio on the VPS and step through the program. I've never used a VPS before.

Upvotes: 1

Views: 76

Answers (1)

Peter Hahndorf
Peter Hahndorf

Reputation: 11212

Unless you do something very special in your code, it is unlikely that it behaves differently on your server compared to your workstation.

It is more likely that the configuration on the server is not correct.

You are saying your

code doesn't execute

How do you know that? You should first confirm that your code is actually executing.

you are also saying:

it is now directing me to a page that says "Directory Not Found"

a web server it never looking for directories, it is looking for resources, check your iis http logs what substatus codes are you getting?, enable Failed Request Tracing and review the logs.

Using Process Monitor can also help determine what the web server is doing.

Start with a very simple page and see whether that executes fine.

What I'm saying is, first debug/fix the execution environment before trying to debug your code.

You would never install Visual Studio on a server, the default installation of a Windows Server doesn't even allow you to install it. Instead you can use remote debugging components on the server and use your local Visual Studio to debug remotely.

Upvotes: 1

Related Questions