Debugging a production asp.net application locally - asp.net

I made an asp.net application on my development box which was deployed on production.
I can see my application on production URL with public domain such as https://www.myapp.com ( sample).
Is it possible to debug the application by attaching the process using from my Visual studio development environment by following - Go to debug and then attach the process by selecting the browser displaying https://www.myapp.com ?
I tried it and its attaching the process but it does not hit the debug points in VS2010 . Can anyone please let me know if its possible to do this way ?
Thanks in Advance! Junni

It sounds like you are just debugging your browser. If you want to debug a remote machine you need a debug version of your code running on that machine and MSVSMON.EXE running on the remote machine. You would be best servered by reading http://msdn.microsoft.com/en-us/library/bt727f1t.aspx
then researching MSVSMON questions here.

Related

Asp.net Debugging Not Working

Asp.net Debugging not working
Hi,
I am trying to run and debug my asp.net application. But i am getting the below error :
Unable to start debugging on the web server.Could not start ASP.NET debugging. More information may be available by starting the project without debugging.
You can refer the screen shot as well from the above link.
These steps might help.
Restart the app and then try restarting IIS
If the web server is local, try attaching to the server process
If the web server is local, try attaching to the server process
If the web server is remote, make sure the remote debugger is running
for more info goto original MSDN Article

ASP.Net local debug on a Windows Server 2008 R2 Terminal Services Server

We have a Windows Server 2008 R2 box setup as a Terminal Server with Visual Studio 2012 installed on it for remote developers to be able to do development on our ASP.net systems.
We would like to be able to do debugging on out projects the same way we do when developing on our local machines using visual studios internal development server.
I am trying to start local debugging on an ASP.Net project (F5) in VS2012 - the project compiles - IE comes up with my localhost url and then it just spins with "connecting..." and the page never comes up.
Pulling up the same workspace on a local machine and debugging comes up just fine.
I've exhausted my google-fu on looking for solutions here and humbly ask you all for any insight.
Visual Studio works a little differently when you are debugging on a server. You don't really want to use VStudio to play/debug on a web server. You need to use the menu option "Debug", "Attach to process". There will be several processes running, so it might take a few tries to find the right process.
Be careful though. Because your break-points will actually freeze IIS for the entire server. It could be a pretty big inconvenience for everyone who is using IIS at the time.
If you are trying to debug the project from your IIS server, you need to verify if the account has Administrator rights, also if the project has been deployed with its source files, you can attach the process (maybe it is w3wp.exe) in Visual Studio and debug it.
Another way is to open the solution using Visual Studio and change in the web project's property the server: Use Visual Studio Development Server.
Let me know more info about your scenario to provide you more paths.
What I would do is attach to the IIS process on the server: http://msdn.microsoft.com/en-us/library/vstudio/3s68z0b3.aspx you can even do this off your machine.
make sure debug is enabled in web.config for that app and you've mounted the remote project. Add a break point, debug by attaching to the IIS app pool process & it'll trigger the break point.
I was able to Attach Process to the SPUCWorkerProcess.exe even though it's a farm solution and not a sandbox solution

Debug ASP.NET application hosted on shared server from my VS2010 IDE

i have web site and it is hosted on shared server ORCSWEB. now when i testing one page locally then i found it is running fine but when i test the same page putting our live site url then i found it is not working. so i want to test that from live site but from my own VS2010 IDE and want to set break point. i just do not know is it possible or not but i can not install any remote debugger there due to lack of access.
i visit this url for gudance http://www.codeproject.com/Articles/38132/Remote-IIS-Debugging-Debug-your-ASP-NET-Applicatio
but i could not help me. thanks
I'm not an Orcsweb customer, but you cannot do Remote Debugging unless the VS Remote Debugger service is running on the target machine. If I were a shared webhost then I wouldn't provide this service to my customers because it's a massive security liability.
Out of curiosity, why can't you fix it based on any exception reports generated right now?

Debugging ASP.NET in IIS 7

I have searched all the usual but come up empty. I must be doing something silly!
Simply I created a new project, ASP.NET Web App, and wish to use and debug it with the local install of IIS 7.5 on my Windows 7 x64 box.
According to what I have read it should be a simple process; my issue is that Visual Studio will not stop at breakpoints nor at errors etc.
I just don't get it:
Visual Studio is attaching to the w3p process for me automatically.
If I hover over the breakpoints it shows a message saying the same, that it is in the same w3p process.
I am in Administrator context. I manually ran it like so to be sure but in any case if you are an admin it runs like that anyway.
Some notes:
I do not wish to use IIS Express as I require native IIS 7.5 for my tasks, however it does debug in express - no surprise there.
As mentioned above, all this is being done locally.
The path of the virtual directory is pointed towards the project files, as set by Visual Studio 2010. It even set the Network Service as read on the folder structure.
When debugging from VS the web site runs fine, just debugging is the issue.
Maybe it is permissions? The Default App Pool is using the ApplicationPoolIdentity not Network Service... Should it be? I had assumed they we.re one and the same essentially. Although I changed this and no luck unless I didn't do something I should of
Keep in mind here that my issue is semi-unique in that I am not receiving error messages, not even in the event logs... For all intents and purposes it should be working fine, just it isn't.
VS and IIS, and all updates, are applied to date.
Note: I'm familiar with IIS7.5, I run my own public web hosting server. I just never tried to debug
Note: It is Visual Studio 2010 Ultimate
Thanks for your time.
Sigh!
I went back to basics... Uninstalled IISExpress and tested; It worked! Re-installed IISExpress; It worked!.
I guess installing IIS7 native after IISExpress did something screwy? I had ran the register ISS command on IIS7 when I installed it.
Right, so now I have both installed in tandem and they work fine. Thanks for all your help guys, appreciated.
you can try right-click on project in VS go to properties select web from left menu tab. Check if ASP.NET debugger is checked and also you can select Use Local IIS Server and give localhost url there (in project Url textbox) and then Say start debugging from VS and put breakpoints.
I had a similar issue the other day, I attached the debugger to the wrong w3p process, make sure you attach it to the one the app pool identity is running under.
I wanted to write it as comment by I don't think I can add pictures..
Are you sure you are running the same version of dll?
Is your breakpoint filled like this?
or hollow like this?
1st go to ,Program and Feature in control panel and then in that turn on or off windows features. and now check all check boxes(activate features) related to Internet Information server & windows service managers. once this is done run your visual studio as administrator and then attach to right w3p process.

Unable to start debugging on the web server. The COM+ registry database detected a system error

I'm trying to debug an ASP.NET webapp that's configured to "Use Local IIS Web Server" on WinXP. When I start the debugger, the compile succeeds, and then the following error is displayed in a dialog:
Unable to start debugging on the web
server. The COM+ registry database
detected a system error
The webapp never launches in my browser. How can I get rid of this message and debug this webapp?
I tried the usual stuff, and my exact scenario ended up being described a post in the MSDN forums. Its answer worked for me, despite my environment (VS2008, .NET 3.5) being more modern:
Here are the steps I followed (basically a summary of the link above -- "ASPNET" being significant because that's the user running the IIS instance on my development box):
Close VS
Shutdown IIS
Add ASPNET to the local Administrators group
Start IIS
Start VS and successfully debug ASP.NET webapp
Close VS
Shutdown IIS
Remove ASPNET from the local Administrators group
Start IIS
Start VS and continue debugging ASP.NET webapp without error
My development workstation's security settings/situation is regularly managed by our security folks here, so something must have upset my ASP.NET/IIS/etc environment.
I am using the Visual Studio 2002 and I had the same problem, with tha same Error Message. To solve it, I did only the first 5 steps of the solution recommended before.
I am starting in VS 2002 because I use it in my work. I have the basic concepts, but I never develop in this program language, so I am a begginer.
The most important point in this solution I believe it is understand that ASPNET is a user in the development machine, as Administrator, as "Name.LastName" or any other user that access the machine. When I search for ASPNET to add in the Administrators Group and found it, made a lot more sense because I don't know exactly how the .NET architecture works.
So, if you have the same problem, I here confirm this solution solved my problem, even when I reboot my machine:
Close VS
Shutdown IIS
Add ASPNET user of the Machine to the local Administrators group
Start IIS
Start VS and successfully debug ASP.NET webapp
Thanks for the solution!!

Resources