"Attach to Process" using VS Web Developer Express 2010, any other options? - c#

Looks like "Attach to Process" using VS Web Developer Express 2010 option to debug code not available when it is deployed in IIS. IIS and VS Express 2010 in same server.
After I published on IIS website (local), I want to debug in VSWD express 2010.
What are alternatives or workarounds for this?

If you are looking to debug your application with something other then Visual Studio, you have a few options. The first is Fiddler2 (http://fiddler2.com/) which allows you to view all traffic between the client browser and the host server. Another option is to start logging everything. This is especially useful for applications where you need to keep an audit trail of user actions.

Related

Can't debug my asp.net web app developped on visual studio 2015 and hosted on IIS

I am a telecom engineer, I have studied a little bit of coding but I am not a professional, I have to develop a c# asp.net app for my company and I have some issues with debugging my app with Visual Studio 2015. I hosted my app on IIS (not IIS Express, even if I don't understand the difference), when I hit debug (with Firefox, Google Chrome...) a message of error displays where it is written:
unable to start debugging on the web server the remote server returned an error 400
I have litterally tried everything, can you please help me and give me solutions that I will understand (I am no professional), if you need a screen shot or something please let me know.
Clarifications/details (based on comments, etc.), and since "just use localhost/foo" sounds too magical:
if you're debugging on a remote web server (not your own PC), you'll have to setup the remote machine to allow such. This may or may not be feasible (not your server, etc. etc.).
Hence Visual Studio provides local debugging (Express or local IIS)
What is IIS Express?
When I want to start a project I can eather store it on IIS or IIS Express
Sure, but you'll have to know how to set things up (see links)
When I use IIS, and click on debug, I have error 400 and the browser doesnt open But When I use IIS Express and click on debug, it debugs, the browser opens and I have a 500.52 error
Set debug=true. It should give you error/exception detail(s) (also in link above)
So I am storing my project on IIS (inetpub\wwwroot...) and when I design and write my code I just press start without debug and the browser opens with my app appearing
Same as above, that just means IIS is running your app just like any other ASP.Net app. It does not automatically mean you can attach to it and debug.
While you can certainly develop that way (using /wwwroot), you'll be better off deving in your own directory, using VS/IIS Express, and publish to IIS (as simple as file system copy). You'll also learn what publish means (compiling), what in all your code is "published"/needed in live/production. If you kept deving in IIS the way you are, you'll likely not know the difference.
IIS admin is a bigger topic (multiple apps, multiple sites, and associated configuration).

How to debug external code with IIS (not IIS Express)

I have a number of IIS 8.5 sites in development, that all need to run simultaneously in my development environment, to simulate a distributed system.
These sites use various NuGet packages, with PDB files available, that I want to step into for debugging. In particular I'm using some of the Microsoft Katana libraries and have downloaded the source code, matching the NuGet packages.
My problem:
When using IIS Express, I can open the Katana source code I want to debug in Visual Studio 2013 (eg OAuthBearerAuthenticationHandler.cs), set a breakpoint, then when running the site, the breakpoint will be hit.
But when I switch to using IIS (in the Visual Studio properties pages), the same breakpoint is just ignored.
I've only used Katana as an example. The general problem seems to be that when using IIS only C# source-code in the Visual Studio solution is debugged, but when IIS Express is being used, any matching source-code you have, can be debugged.
Is it possible to make IIS debug these external files in the same way that IIS Express does?
Visual Studio is running as administrator.

Visual Studio 2012 Performance Profiler not pointing to the application

I'm testing the performance of my C# application on Visual Studio 2012.
I used the Release build mode and opened the Performance Wizard on my application, but the performance Hot Paths is pointing to the System dlls (atidxx32.dll) but not to the code of my application.
Are they any specific steps that I need to do so that the profiler will look into the performance of my web application and not the system?
I did some researches and found that the Web configurations of my ASP.NET web application are set to use Visual Studio Development Server and not IIS Express.
I changed the configuration and all went very well, the Sampling mode of the performance profiler is now profiling my application properly.
Go to Proprieties of the web application project / Web / Servers, tick Use IIS Express.

How to make Web Application project a standalone with IIS Express and SQL Server Express?

How can I make Web Application project a standalone desktop application with IIS Express and SQL Server Express?
With "standalone" I mean clicking on an exe-file start my application (e.g. start.aspx in my browser). The whole application consists of lots of aspx-files which run in a browser.
NOW: I have my Web Application project running fine when pressing F5 in Visual Studio 2010.
MY AIM: I want to start this project on a local machine just as easy as it is in Visual Studio, but how could I do so?
You're misunderstanding what happens when you press F5 in Visual Studio.
When you press F5, and if you're using the Visual Studio Development Server instead of IIS, that server is started up, and can serve requests for your application that come in on localhost. In any case, Visual Studio next starts your default browser and tells it to browse to your web application. The only application being launched on the desktop is your browser.
When your application is ready for other users to use, you will need to deploy it to a web server. Once it is deployed to the web server, users will be able to open their browser and browse to your application.
There is no simple way to package up a web server, database server, and your web application into a single .exe that a user can double-click.
i recommend you look into this product
http://ultidev.com/products/UWS-Cassini-Pro/Default.aspx
You'll need to use SQL CE, which has a number of limitations, such as the inability to auto-increment identity type columns.
Why would you use IIS for a stand-alone desktop application? A web application is for the web. If you want desktop that look into WinForms of WPF. I doubt you will find any tools to do the conversion for you so you will have to make it a manual process. Just hope you have a well structured web app.
Unless of course, you mean to just access a local web application from your local machine IIS installation? If so, then just set up IIS like you would do on a server, assign yourself a port to the localhost to access the web application and then create a nice desktop shortcut that links to the correct URL

How to find Visual Studio's web server's application pool mode?

When I run my website in visual studio 2010, it works.
When I deploy it in IIS, it doesn't work.
Can I find the settings of visual studio's web server? That will be really helpful for learning purpose for me too.
Don't rely on ASP.NET Development Server or even IIS Express (http://learn.iis.net/page.aspx/868/iis-express-overview/).
A long time ASP.NET developer should understand that playing with IIS as early as possible is the correct way.
Show the exact errors that your application reports (on IIS), and then someone can tell you what's up. It is useless to learn more about ASP.NET Development Server as your application is not finally deployed on it.
Use real IIS, lots of stuff is different in integrated mode. If you do httpmodules, you will find anything but real IIS doesn't support stuff like adding headers and such.
The Visual Studio 2010 development web server is an entirely .NET based server. As such it has much more in common with the intergrated pipeline of IIS7 than it does with the Classic. It doesn't support all that the IIS7 integerated pipeline does since it only has to concern itself with delivering .NET and static content and doesn't need the optomisations that IIS7 will employ.

Categories

Resources