1

I've got an asp.net MVC solution that worked perfectly in my localhost.

When i publish it in the server it gives me an error in the Create method during the GET call.

So i'd like to know why it gives me error and display the various step inside my method. I'd like to do some debug directly into my C# code and display it into the browser console.

I tried Debug.WriteLine(), Response.Write(), Trace ... but them didn't work.

Any helps?

Thanks

3
  • Server != Client: "debug directly into my C# code and display it into the browser console." Not possible. They are 2 different processes; 1 being the ASP.Net providing the MVC.Asp, another being your browser. Have you tried: Running in release mode on your local machine? Turn on tracing in IIS/Asp.Net? Commented Jul 3, 2014 at 9:47
  • You can try elmah (code.google.com/p/elmah) error logging facility to check the errors. Commented Jul 3, 2014 at 9:58
  • @Marvin Smith thanks for the reply, yes i tried he release mode but nothing happened. I'm trying to turn on tracing in iis and we will see Commented Jul 3, 2014 at 12:53

2 Answers 2

1

You can use a tool like DebugView to monitor System.Diagnostics.Debug or System.Diagnostics.Trace

Once downloaded you just have to unzip and execute it as administrator

DebugView is an application that lets you monitor debug output on your local system, or any computer on the network that you can reach via TCP/IP. It is capable of displaying both kernel-mode and Win32 debug output, so you don't need a debugger to catch the debug output your applications or device drivers generate, nor do you need to modify your applications or drivers to use non-standard debug output APIs.

Sign up to request clarification or add additional context in comments.

Comments

0

The error happens on the server side but browser console shows errors and messages of the client side so there is no way doing that.

To help solving the problem I would go to the page via localhost of the server (with remote desktop connection) so it may show you more information. Of course you can also wrap everything in the method with try-catch block and return the exception as a result or save the exception into database. Event viewer on the server or IIS logging could also be potentially helpful.

1 Comment

Thanks man I just did it and i found the problem...the data inside SQL Server don't merge with mine, fortunately SQL server is not my tasj and i'm going to check this problem to my collegue. Mark as right question for tell me how to start the way :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.