I'm trying to debug an ASP.NET application for my company internal portal on a remote IIS v7 server running on a Win 2008R2 server. The IIS server is on the same LAN as my development workstation.
The portal mostly works, however there is one function that doesn't work correctly when published to the remote server.
If I debug the application locally, using either the Visual Studio Development server or the local IISExpress server, the function works as expected, so it seems that I need to debug from the remote IIS server.
I have installed the Visual Studio 2010 Remote Debugger (msvsmon.exe, x64) on the remote server and have published my web app there. I'm running msvsmon on the remote server as an administrator.
On my local Win7 development machine, I have the portal solution open in VS 2010 from my local hard drive, I can connect to the Remote Debugger from Visual Studio using the Tools | Attach to Process menu and I have selected the w3wp.exe at the process to attach. The msvsmon app on the remote server shows that I have connected.
Back in Visual Studio on my local machine, I set a breakpoint on a Page_Load method (where I suspect my problem code is), however, my debug options to Start, Continue, Step Into, Step Over, etc are all disabled.
I'm apparently missing some step or concept here, but I'm at a loss as to what it is.
Related
I have recently deployed my ASP.NET Core application to my IIS8 server. However due to some issues, I have to remotely debug it.
I installed the Remote Debugger and managed to connect to the server and Attach a process.
However, I am unsure of what to attach from there. I have tried attaching all dotnet.exe and w3wp.exe processes but each time I do that, my breakpoint turns white and says that it won't hit.
I took a look at my Modules tab and for some reason, my symbols aren't loaded for my application dlls. I have made sure that the configuration is Debug and that the ASPNETCORE_ENVIRONMENT is Development.
Currently this is what I am doing:
Run the Remote debugger on the IIS server
Run the website on my local laptop
Attach a process in Visual Studio
I am trying to debug a ASP.NET application which runs on a IIS 7.5 in the local network (Windows 7 Ultimate). I am deploying via Web Publish (Debug). I installed the remote debugging tool for Visual Studio 2015 on the remote machine.
When I want to attach the remote debugger to the w3wp.exe process and have no breakpoint active, it looks like everything works since I also can see the connection in the Remote Debugger on the remote machine. But as soon I want to set a breakpoint I get:
a remote operation takes longer than expected
which will change to a
The network connection to MACHINENAME:4020 has been lost. Debugging will be aborted.
after a while. This happens also when I start attaching the debugger when there are already active breakpoints.
What I tried so far:
Set Ping enabled to false in IIS for this Application Pool
Enabled Emit debug Information in the Web Deploy Settings
Disabled all Firewalls for the remote and develop machine
I always get the above error when trying to connect to a SQL server 2000 database hosted on a "server" with Windows XP pro. The client pc (my working environment) is Windows 7.
Up to now I have developed my application using Visual Studio 2010 and Net framework 4.0.
All was working correctly. Then I have installed Visual Studio Express 2012 for Web and ASP.NET 4.5.
Now, when i try to connect via SqlConnection conConnection .Open() i get the Exception:
A connection was successfully established with the server,
but then an error occurred during the pre-login handshake.
(provider: TCP Provider, error: 0 -
An existing connection was forcibly closed by the remote host.)
Please note the second message, because I have found very little info on that: An existing connection was forcibly closed by the remote host.
I have yet unsuccessfully tried a myriad solutions, including:
Various connection strings (Encrypt=false; )
netsh WinSock Show Catalog > winsocks.txt (don't seem to spot any strange application here)
netsh Winsock reset on both client and server
Rebuilding the app from Visual Studio targeting Net 4.0 / Net 4.5
Use Visual Studio Development Server or Local IIS Web Server
IIS reset, restarting Client and Server pc variuos times
Checked the SQL Server 2000 properties, connections, logs, profiler...
What other could I try next without disinstalling Net 4.5 (and Visual Studio 2012)?
Important additional info
This same application is deployed in a production server (Windows 7, IIS 7.5, Net framework 4.0).
The application actually in production was compiled with Visual Studio 2010, net 4.0, and is connecting correctly with no errors (thankfully)!
So, the problem has arisen on my client machine after I have installed VS Express 2012 and Asp.net 4.5. (I have also tried to open and recompile the solution with VS2010, but I get the same exception).
EDIT
For testing purpose, I have deployed my application, compiled with VS 2012 / Net 4.0, to the "production" server (on which I have never installed Net 4.5 of course).
For this I have created a new Web Site, with Application pool set to Integrated pipeline and targeting Net Framework v4.0.30319.
Now, this test web site connect successfully to my test SQL Server database (SQL 2000) and also to my production server database (SQL7).
Clue:
the problem resides only on my client pc, and the culprit is Net 4.5?
EDIT 2
Connecting via Visual Studio 2010 or 2012 Server Explorer, Data Source: Microsoft SQL Server (SqlClient) gives the same Exception (only difference is that now is pre-login handshake timeout).
Instead Connecting from Microsoft SQL Server Management Studio 2008 works fine! (Server type: Database engine; Server name: myserver\SQL2000; Authentication: SQL Server Auth; Login: Password)
How can be that the connection from SQL Server Management Studio works fine?
Did you uninstall VS 2012 to "fix" this issue? Why can't you install .NET 4.5 on the server or copy the DLLs to the server per Marc Gravell's post at http://marcgravell.blogspot.co.nz/2012/09/iterator-blocks-missing-methods-and-net.html?
I am essentially having the same problem. ASP.NET Project that runs successfully on a Win 7 computer in visual studio 2010 but moved to a Windows 8 box running Visual Studio 2012. Project is converted by VS when running it throws the SQL server error message described above. SQL server is remote but both clients (Win 7 and Win 8) are local on the same network. One works and the other doesn't.
Comparing setup on both machines in IIS I found that there is a difference between the configuration of the Application Pool in use by the web application. The Identity property defaults to "ApplicationPoolIdentity" but if you change it to "NetworkService" then the problem is resolved. Hopefully this will help someone else as I have done an extensive search and found nothing that pointed to this.
I try to install remote debugger in my remote machine, and connect to it in my local computer, using visual studio 2012 for asp.net web application, windows8.
remote and local computers are not in the same network.
I installed the visual studio remote debugger in the remote machine and run it. it's instance name is:"SERVER-PC:4016"
In the local machine, I work on the project by ftp and in debug-attach to processor in qualifier field I enter the name in this format: external_ip:4016, and get an error:"The Microsoft Visual Studio Remote Debugging Monitor (MSVSMON.EXE) does not appear to be running on the remote computer.."
p.s. I installed a local user in remote and local machine with the same name and password and run the relevant programs from this user name.
any ideas to solve my problem?
thank you!
I have local my projects asp.net open in visual studio 2010. And also copy this project to IIS folder in remote hosting. Cause in hosting directory I don't have VS so I copy there remote debugger application. I connect from my Visual Studio to IIS process on hosting, but any of breakpoints not fire.
Why ?
I had the same issue when I connected using the Transport in the "Attach to Process" dialog set to "Remote (native only with no authentication)". I was able to connect to the IIS process (w3wp.exe for IIS6 on Win2K3), but no breakpoints were hit when I navigated within the web app.
To get it working, I changed the Transport to "Default". Then I ran into numerous issues with successfully connecting to the Visual Studio Remote Debugging Monitor. But once I resolved them all and was able to get the list of processes from the remote machine, I could connect to W3WP.exe and voila, my breakpoints started working and I was able to debug normally.
You don't provide much detail on your local and remote configuration, so this just a guess whether it might help.