I'm trying to debug a .NET site (local IIS) hosting the DLL I'm developing using VS 2017 Community Edition (on a Windows 7 Enterprise workstation).
When I try to attach to w3wp.exe linked to the application pool, I get an error saying :
Unable to attach to the process. An unknown error occurred in the Windows Web Service infrastructure (translation from french message).
The connection type is set to Default
The connection target is the local computer
I can see the w3wp.exe process in the list provided by VS and it is of type x64 (no mention of managed code).
Is there an option I'm missing to be able to debug a 64 bits .NET app ?
Any tips welcome
Thanks in advance
Related
I've written a Hello World console app in .Net Core 2.0 using VS 2017 and deployed the Debug build to a Raspberry Pi 3 running Windows 10 IoT. I can execute the app remotely via PowerShell and everything seems fine.
Having installed the Visual Studio 2017 Remote Debugging tools, I'm now trying to hook up the Remote Debugger so as I can step through my code on the Pi and I'm running into problems.
When I try to "Attach to process" from the Debug menu in Visual Studio and enter the IP and port number supplied by the IoT device portal I get the following error:
Unable to connect to the Microsoft Visual Studio Remote Debugger named '192.168.1.139:8116'. Connection request was rejected by the remote debugger. Ensure that the remote debugger is running in 'Windows Authentication' mode.
The following screenshot of the IoT Device Portal shows both the IP and Port for Remote Debug and the fact that my app (echo.exe) is running:
I've tried running the remote debugger both with and without the "Run as DefaultAccount" option checked, but this seems to make no difference.
I've also checked the firewall settings on my dev PC to ensure that it is not blocking traffic (I am connecting over the Private network)
Although the error message warns about Windows Authentication Mode, I can find no such setting for the remote debugger. Any help in getting the Remote Debugger attached and operational would be gratefully received.
You may need to select the connection type to "Remote" instead of "Default".
It works for me. You can have a try and feel free let me know if there is any problem.
One thing that I think it could help is when deploying the app to the Remote Machine and you are presented the ‘Remote Connections’ dialog you can choose there what type of authentication you want. One of the options is Windows Authentication. Try deploying and running the app like that and then the Remote Debugger should work.
In your VS Studio Project Properties -> Debug Tab -> Authentication Mode: Window Authentication
Why cant i debug my project on iis express server? i always get the following error :An error occurred attempting to determine the process id of dotnet.exe which is hosting your application. One or more error occured
error when running
I got tis error for 2 weeks now and have not been able to solve this. I have reinstalled visual studio multiple time, iis server and even reinstalled windows completely.
but still no change. Other solution like setting up the ssl certificat also dont work.
I use a dell precision 7510 with windows 10 enterprise with endpoint security (its a computer from work)
If anyone knows an answer
thx
I have my development environment as follow:-
Visual Studio 2012 Professional. version 11.0.50727.1
Windows Server 2012 R2.
asp.net mvc4 web application.
now since last week i am facing these problems:-
when i run my asp.net mvc web application inside visual studio, i will receive the following error, when i access my asp.net MVC home page:-
500 Internal Server Error
after many runs, the CPU will reaches 100% and my development machine will automatically get restarted. now i check with our system admins and they mentioned that the VM got restarted because of high CPU...
so i am not sure if the problem is within VS 2012 , or within the VM itself.. baring in mind that the VM host some test applications inside IIS,, and we can access these application without any problem. also i can open the sql managemnt studio and work with the DBs without any problem. so before asking to expand the DEV machine specifications to avoid high CPU , i want to make sure that the problem is not within Visual Studio itself ??
here is 2 screen from the server manager after the VM got restarted :-
now i am not sure how i can fix this?
Thanks
The 500 Server Error is the standard error report from IIS if an MVC application throws an unhandled exception. So your code inside your MVC application is faulting somehow.
If this occurs you would normally run your site in debug mode in Visual Studio to trap the exception and debug out the problem. I have not idea what your application actually does but I can speculate the following possible cause;
1) IIS receives your call.
2) The MVC code generates a high CPU load doing some faulty code.
3) The calling application times out its HTTP call, and calls again.
4) Another IIS Instance is created to deal with the new HTTP Call (depends on your IIS Setup)
5) The second IIS instance does the same as (2) but in a different thread, causing more resource consumption.
Eventually you get a 500 server error as one of your IIS instances times out or throws and exception. Your "helpful" sysadmin kills your VM.
The killing of the VM is entirely uneccessary - IIS has perfectly adequate safeguards against runaway IIS processes, including IIS Application Pool timeouts, automatic IIS Application Pool recycling, IIS Application Pool CPU Throttling, and IIS Application Pool maximum memory usage. All of these configuration options prevent the operating system from being destabilised by a runaway IIS application.
Without any insight into what your website does in the background we cannot go any further, but if you mod your question and give some of the MVC code its possible something might be spotted.
I had a similar error with Visual Studio 2013. The error turned out to be one my Addins. If you are using add-ins, try disabling the suspected plugin from the Tools --> Add-in Manager..., then restart Visual Studio. If you are using extensions try reviewing those as well from Tools --> Extensions and Updates...
You can optionally choose to run Visual Studio in Safe Mode which will essentially do the same thing but will disable all plugins. devenv.exe /SafeMode
Hope this helps.
I had some similar issue in Windows Server 2012 running Visual studio 2012.
Upgrade your Visual studio and Windows server both. It will solve the issue
I am having problem getting the MS Visual Studio Remote Debugger to connect to my local IE instance as it is running as a 64-bit rather than a 32-bit process.
Every time I try to run it currently in Visual Studio I get the
The 32-bit version of the Visual Studio Remote Debugging Monitor (MSVSMON.EXE) cannot be used to debug 64-bit processes or 64-bit dumps".
error.
Investigating a bit, I think I have narrowed it down to the web asp service being run as a x64 process rather than a x86 (which both Visual Studio, and the silver light application are running as). I confirmed it as running as a 64-bit process by trying to "attach" visual studio to the process when the application was running in the ASP.Net Development Server.
In short: Is there a setting I am missing somewhere to force Visual Studio to run the ASP.Net service as a 32-bit process? I have read about using a variable in the web.config application pool to use 32-bit (via the enable32BitAppOnWin64 config option), but it seems to only work in IIS, not ASP.net Dev server.
Any thoughts?
Edit For Clarity:
I am running Windows 7 64-bit, Visual Studio 2010 (which is running as a 32-bit process). Currently it is launching ASP.NET Development Server (not IIS) to host the back end web service. I am hoping I can simply "fix" this via a setting, but if not my backup would be to run IIS Express.
If I'm understanding you correctly you should do this:
IIS Manager/Application Pools-> choose the correct pool for your application/Advanced Settings/Enable 32-Bit Applications->set it to true !
I had problem like this in the past which cost me 1-2 days, hope this helps !
Check also Project/Properties/Build/Platform target->this should be Any CPU
I am writing a console application which uses a workflow service.
I tried to attach the visual studio to IIS process to debug my application in two visual studio console but it didn't work and after that when I try to do something with my service ( update the service, build the service, open the service in browser and etc) just in-time debugger pops up:
An unhandled Microsoft .net framework exception occurred in w3wp.exe[every time diffident number here]
P.S. I have a running service in IIS and before changing setup I didn't have any problem but now even after restarting I still have this problem.
Restart site in IIS and also restart app pool worked for me.
Follow below article for more information. I solved this issue by running visual studio as Administrator.
http://anishantha87.blogspot.com/2014/09/an-unhandled-microsoft-net-framework.html
Hope this will help!