Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to correctly debug web applications on local IIS 7.5 with VS 2010 Beta2?

I'm sort of new to developing Asp.net webapplication projects while running them on a local IIS. Till now I used the 'Use Visual Studio Development Server' option. I'm using Visual Studio 2010 Beta 2.

Edit: less complex sample code

Following code sample:

        List<string> _list = new List<string>();
        _list.Add("asd");
        _list.Add("asd2");
        _list.Add("asd3");

Now I want to debug / step through some line of codes with _list.
While using 'Use Visual Studio Development Server' I can see the contents of _list in the quick watch.
If I select 'Use Local IIS Web server' and debug through the same piece of code, the quickwatch tries to display me the same values by showing me a spinning wheel for about 10 seconds with a resulting 'Function evalutation disabeld because a previous function evalution timed out. You must continue execution to reenable function evalution' message.

Afterwards I get a windows error dialog with 'Unhandeld win32 exception occured in w3wp.exe [844] The Just-In Time debugger was launched without necessary security permission..'

I do run Visual Studio 2010 Beta 2 as Administrator. I start debugging by pressing F5. It seems that I can't really debug this way. Do I somehow have to attach the VS debuggerto the IIS process? If yes, how to do so?

What am I doing wrong, and how to solve it?

And by the way, is that erroneous behaviour new in VS 2010? I've never expierencied that in VS 2008.

like image 459
citronas Avatar asked Feb 20 '10 22:02

citronas


People also ask

How do I debug a local IIS website?

To start debugging, select IIS Express (<Browser name>) or Local IIS (<Browser name>) in the toolbar, select Start Debugging from the Debug menu, or press F5. The debugger pauses at the breakpoints. If the debugger can't hit the breakpoints, see Troubleshoot debugging.

How do I debug a IIS process?

Right Click on Web Project → Properties → Start options → Use Custom Server → Base URL → Enter Site Address as Hosted in IIS. Hit F5 and you will be able to Debug your code.

How do I fix unable to start debugging on web server?

Open your project properties and make sure that the project is configured to connect to the correct Web server and launch URL. (Open Properties > Web > Servers or Properties > Debug depending on your project type.) If that does not work or you are debugging remotely, follow steps in Check your IIS Configuration.

How do I enable debugging in web config?

In the Web. config file, locate the compilation element. Debugging is enabled when the debug attribute in the compilation element is set to true. Change the debug attribute to false to disable debugging for that application.


2 Answers

Just-In-Time debugging is a feature that launches the Visual Studio debugger automatically when a program, running outside Visual Studio, encounters a fatal error.

  • One one hand it is an indication that your process is crashing due to some error.

Try disabling JIT Debugger. I have not used VS 2010 RC but process in VS2008 are as follows.

Tools -> Options -> Debugging -> Just-In-time and then uncheck the all just in time checks. Click okay.


Hope this helps

like image 176
Asad Avatar answered Sep 18 '22 19:09

Asad


I found the solution. After enabling Windows Authentification for my Website in the IIS it worked. Hope this helps anybody in the future.

like image 29
citronas Avatar answered Sep 19 '22 19:09

citronas