Debugging ASP.Net MVC in local IIS on Server 2008 R2 - asp.net

I am having issues debugging locally within Visual Studio 2010 on Server 2008 R2 (x64) for a new ASP.Net MVC application. I am able to debug using the VS Development Server (Cassini) but when I change to use the Local IIS Web Server and Create Virtual Directory, I am unable to debug. I get the standard VS message:
"Unable to start debugging on the web server. The web server is not configured correctly. ..."
Everything looks standard in IIS. The Default Web Site is running under the ASP.NET v4.0 application pool. The virtual directory that Visual Studio created is running under the same app pool. I am running Visual Studio as the Administrator account. It feels like some security setting or something is preventing this to work but I'm at a loss to what it could be.

The solution that worked for me was to run aspnet_regiis -i.

Related

Visual Studio 2017 throws error on debugging an ASP.NET MVC application

I am setting up my new workstation (Windows 10 Pro) with my ASP.NET projects with Visual Studio 2017. I have enabled local IIS and the project throws a timeout error while trying to debug the project.
It is not failing 100% of the time though, mostly fails but when it runs it is taking longer than expected to give the startup page. The error thrown is
Unable to start debugging on the web server. The operation has timed out
I did notice that the IIS worker process (w3wp.exe) was only executed in the completed console output. So it looks like the IIS worker process is not always being executed.
Any help would be appreciated!
Thank you!
The project runs successfully on an old workstation (Windows 10 Edu) with Visual Studio 2017. App pool settings has been compared between both and it seems same. IIS reset is tried as well. Visual studio has been repaired and IIS local has been restarted as well (unchecking and enabling followed by restarting the machine). Default app pool is used and its been recycled as well. Nothing worked!
Possibly the Visual Studio project version does not match the ASP.NET configured application pool. Update the ASP.NET version in the application pool and restart it.
Make sure you have the correct version of ASP.NET installed on IIS. A version mismatch between ASP.NET in IIS and the Visual Studio project can cause this issue. May need to set the framework version in web.config. To install ASP.NET on IIS, use the Web Platform Installer (WebPI).
If the issue is not related to IIS configuration, try the following steps:
Restart Visual Studio with administrator privileges and try again.
For example, using the Web to deploy some ASP.NET debugging scenarios that require elevated Visual Studio privileges.
If you are running multiple instances of Visual Studio, reopen your project in one instance of Visual Studio (with administrator privileges) and try again.
If using a HOSTS file with a local address, try using the loopback address instead of the computer's IP address.
If not using a local address, make sure the HOSTS file contains the same project URL as in the project properties, Properties > Web > Server or Properties > Debug, depending on the project type.
Reference link:
Visual Studio "Unable to start debugging on the web server. The web server did not respond in a timely manner.".

how to deploy asp.net core development application to IIS?

I have ASP.NET Core 1.0 application developed in VS2015. I am trying to deploy it to IIS (tried 7.5 on Win 2008R2 and 8 on Win 2012 with the same results). My goal is to deploy as Development, however, I can see that all the links are pulled from environment name=Production tag.
Publish wizard gives me a choice of Debug and Release that apparently come from Configuration manager, and Debug has the default value of Hosting:Environment=Development. This all works as expected in IIS Express. I am looking at documentation for publishing and for working with multiple environments but neither ties Debug/Release with Development/Production/etc and neither explains how to deploy Development to the server.
Should I put Hosting:Environment somewhere on the server site?

AppPool in IIS Express must run under Integrated Mode

I am using the IIS Express instead of the Visual Studio 2012 Development Server to install the DotNetNuke 7.0.04 because DotNetNuke 7 requires integrated mode and ASP.NET Development Server doesn't support Integrated Mode, however, the installation process throws the following exception:
AppPool in IIS must run under Integrated Mode
Is there any way to configure the IIS Express Integration Mode? Or any other solution to get over this problem.

Visual Studio 2010 (Ultimate): ASP.NET Web Service - Debug Breakpoint does not hit. Not able to Debug

Recently, I've installed VS 2010 on my machine. I also have VS 2008 installed.
Problem I'm facing is - I'm not able to debug the web services hosted on local IIS. Also, VS 2010 do not show message that source code is different.
To start debugging I'm attaching aspnet_wp.exe process. My breakpoint is in a method which is part of a Class Library project which is targeting to .NET v3.5.
Environment Details:
- Windows XP SP3
- VS 2005, 2008 & 2010
- IIS (v5.1) Targeting ASP.NET 2.0
- Web Service Targeting .NET Framework - v3.5
Does anybody have encountered same problem?
First there is an easiest method than attaching, to use the
System.Diagnostics.Debugger.Launch();
Next, go to the IIS and open the properties on you running web and check on "Web Site" tab if the the "HTTP Keep-Alives" is enable or not, and make it not enable.
If still not break, close the vs, and go to the project directory, and delete (first backup it) the xxxxx.suo file of the project. Then start it again and go for debug.

Debug .NET app with IIS7 and Delphi.NET - Use aspnet_regiis.exe to configure the local IIS web server

I have been trying to set up local debugging for my ASP.NET app in Delphi and am getting the error above. I have used the aspnet_regiis.exe tool with the following:
Aspnet_regiis.exe -s W3SVC/1/ROOT/DevTest
but this hasn't helped. It added it to IIS as an application but I am still getting the error:
The project cannot be debugged because virtual directory "DevTes" is not configured with ASP.NET version 2.0 or 3.0 Use aspnet_regiis.exe to configure the local IIS web server.
I am not really sure where to go from here so need some help please:
Machine specs: Windows 7 64bit, IIS7, Using RAD Studio 2007.
EDIT: For more info, I have been able to start the website in Firefox and have been able to attach to process now, although the debugging is lacking a little, i.e I can't see values of sessions ect ...
Try using the Web Platform Installer to configure IIS for ASP.NET development. http://www.microsoft.com/web/Downloads/platform.aspx

Resources