Debugger For Visual Studio is not Working - asp.net

I am facing a very serious issue with visual studio debugger. My asp.net application is hosted on local IIS server. Yesterday i was debugging my code suddenly it stopped working. I verified w3wp process. It was same as IIS process. Then i tried to download symbols but i am not sure either they are all that i need. I tried attaching debugger on visual studio 10 and visual studio 12. Neither of them is working in this case. I tried to attach debugger of JavaScript but it is also not working.
Please Help.

Are you building full debugging symbols? If not then the debugger has no information to relate the source code to the in memory activity under the debugger. This is set in the project properties per configuration.
Also ensure the symbols are in the bin folder.
You can validate that VS is loading the right symbols with the Debug | Modules window.

I cleared temporary cache of .NET Framework. then i again deployed my application on IIS with different name and magically everything started working.

Related

ASP.Net Core 2 - IIS 502.5 Error

I am creating an ASP .Net Core (2.0) MVC application within Visual Studio 2017 which was working absolutely fine.
After turning off my computer yesterday and coming back to my application today, I now receive this browser error when I start the application in chrome without debugging.
Running dotnet run within the directory of the application, I can access the site just fine. It is just when I run it via Visual Studio/IIS Express I get this error.
HTTP Error 502.5 - Process Failure
The application builds and compiles just fine. I have also cleaned the solution.
Looking in the event logs I find:
Application 'MACHINE/WEBROOT/APPHOST/MYAPP' with
physical root 'C:\Users\Ben Hawkins\Desktop\Development Folder
\Dev\Website\Version_2\MYAPP\MYAPP\'
failed to start process with commandline 'C:\Program Files
(x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\Extensions\Microsoft\Web
Tools\ProjectSystem\VSIISExeLauncher.exe -argFile "C:\Users\Ben
Hawkins\AppData\Local\Temp\tmp3547.tmp"', ErrorCode = '0x80004005 :
0.
Within my output window in Visual Studio 2017 I recieve this message under
ASP NET CORE WebServer
Failed to initialize CoreCLR, HRESULT: 0x80131534
What I have tried:
Cleaning the solution, rebuilding etc
Restarting the computer
Trying to launch another application. (Same result)
Created a new application from scratch. Same result.
Repairing Visual Studio Community 2017. Same result.
Stopping/Closing IIS Express
My setup was working perfectly yesterday and suddenly is not.
Thank you for your time. I hope we can find a solution.
We finally found the issue! After logging on to the machine as a different user, we saw a warning that the main user had ignored initially. There was a 0 byte file in the root of the directory named "Program" with no file extension. It appears that this causes some sort of issue when VSIISExeLauncher.exe is invoked through Visual Studio. (Note it would work if executed from the command prompt). After deleting the file, everything worked!
We do not know how this file was placed there for certain, but suspect it was some sort of copy error when the user was pulling in files from his old hard drive.
I don't know if anyone else will come across this, but if so hopefully this helps!
Maybe you need install previous versions of .NET Core, isn't it? I installed here and it works now. I had only .NET Core 2.0 installed and I realized that applications with 1.1 stopped so when running. In Windows' event logs I've had the same error registered.
Try to change the IISExpress to IIS by creating new IIS profile and change the Lunch to IIS. It resolved my problem.
I have hit a very similar issue with ASP.net Core 2.0. I had copied my VS project to a new one, and I was getting this error message.
After doing some research, I was able to determine that the nlog.config file was not copied into the bin > Debug > net461 folder. Once I did this, I was able to run my application.
I found it by running dotnet run from the command line on my project where the csproj files live.
Had same issue yesterday (windows 10).
Solved it this way:
Update Microsoft.AspNetCore to latest (Nuget manager - 2.1.3)
Make sure the sdk also updated to latest version. if not, update it manually from Nuget console like this:
Install-Package Microsoft.NETCore.App -Version 2.1.3
Download and install latest ASP.NET Core/.NET Core: Runtime & Hosting Bundle
from here
Same problem with version 2.2. Reinstalling .NET Core SDK fixed the problem for us.
In my case, my project was setup as a website in IIS and the file "bin\IISSupport\VSIISExeLauncher.exe" was missing in the project's directory.
I simply selected "IIS" when debugging the project in Visual Studio 2019 and it generated the missing file. It also generated 2 text files (IISExeLauncherArgs.txt, pidfile.txt) in the IISSupport folder, made changes to my web.config file, and my project ran successfully.
After that I was able to access the local website that was setup in IIS without running it in Visual Studio.

IIS Express giving a compilation error, denies access to files

I am running Visual Studio 2015 on Windows 7. I have a solution with 2 startup projects, both running on IIS Express, and the .NET version is 4.5.2.
Whenever I start the solution for the first time, everything works as expected. However, when I stop the application, make some changes to the source code, and restart, I get this Compilation Error -532462766 screen on startup :
The detailed compiler output is filled with lines like this:
/R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\vs\268da2e1\665f7c6d\assembly\dl3\a9f1f009\c9360fff_0864d101\ServiceStack.Common.dll"
Going back to Visual Studio, and selecting "Clean Solution" gives me these unable to delete file messages (username and projectname removed).
The only way to get things working again, is to right-click IIS Express in the notification area, exit the process, then clean the solution in VS2015, and rebuild. Everything works again then, until the next time I need to change something in the source code (which happens quite a lot, being a software developer and all).
It seems IIS Express or Visual Studio, or my Windows user account is not allowed to delete files in IIS Express. I have tried running VS2015 and IIS Express in administrator mode, but no luck. What else can I try?

Visual Studio 2015 - Opening two projects in debug mode

I'm using Visual Studio Ultimate 2015 CTP (Version 14.0.22512.0 DP), and create two asp.net 5 vnext web applications.
When one is running, and I'm starting the second one with the context menu "Debug->Start new instance" option, the IIS Express crashes instantly (Internet Explorer opens firstly the second project, and then instantly closes both, Chrome simply display only that the page doesn't exist).
The only trace that I found is in the Event Viewer, a Warning from IIS Express:
The directory specified for caching compressed content C:\Users\Alek\AppData\Local\Temp\iisexpress\IIS Temporary Compressed Files\Clr4IntegratedAppPool is invalid. Static compression is being disabled.
Any suggestions how to fix this? It's hard to work on a multi-tier project when only one project can be run at a time.
When I created manually above folder, nothing is logged to the event viewer, but the IIS Express still crashes. On Visual Studio 2013 I can run two instances of two Web Applications withtout any problems
It should work if you set your solution to use multiple startup projects and add all the projects you need to debug
Really easy steps to follow here:
http://www.magnetismsolutions.com/blog/paulnieuwelaar/2015/04/07/debug-multiple-projects-at-the-same-time-in-visual-studio
Still not as easy as previous versions of visual studio
Maybe not a solution, but a workaround which I found - running two instances of Visual Studio 2015 allow to run two projects.

"An operation is not legal in the current state" error when trying to launch ASP.NET project in VS2013?

I have an ASP.NET web site created with WebMatrix 3. I do have the option in VS2013 checked to use the 64-bit version of IIS Express since I am running on 64-bit Windows 8.1. When I try to launch the project I get the error "An operation is not legal in the current state". Does anybody know how to fix this?
I got this same error "An operation is not legal in the current state" when running a project on Google Chrome, Stopping the project then closing all chrome instances fixed the problem.
I think it's related to visual studio not being able to attach to chrome instance for debugging.
Closing Chrome and restarting IIS (e.g. in IIS Manager) should solve the issue. It helped in my case.
Just had the same issue on VS (Visual Studio) 2017 this morning.
The steps that will resolve this are:
Stop project that runs in VS
Clean all IIS instances that VS temporarily created
Compile project and start that service again

Visual studio 2005 debugger won't stop at requested break points

I have debug=true both in the web.config and in the requested file but it still won't stop.
Thanks...
There might be several reasons:
There are changes to the assembly and the debugger didn't get updated - try cleaning the solution and the building it again
You are building in release mode - in this case you would get a warning message from the studio
The rest options depends on weather you are using local iis or the Visual Studio web server.

Resources