Debug ASP.NET web forms in full IIS - asp.net

I'm running Visual Studio 2013 Ultimate on a Windows 8.1 (with Update 1) laptop, and I would like to debug an ASP.NET web forms project against IIS, which is installed on the local Windows 8.1 instance.
Previous versions of Visual Studio had an option to use IIS Express or full IIS, but I cannot find that option in the Project properties anymore.
How do I deploy & debug my ASP.NET web forms project in full IIS?
EDIT: When I right-click on my project, I see this:
And then if I click on "Properties Window" I see this:

This is one way to have your project available in IIS:
Press Ctrl+X, type inetmgr
or
Open your IIS Manager Application.
Expand the tree on the left.
Add WebSite
Give a name to the website and port
For file location provide the same file location were your project is.
Assuming your port number is 3000 just simply type http://localhost:3000 in your browser.
Now from Visual Studio go to:
file Open...
WebSite (you will see that IIS is available on the left).
Open your new web site
This will let you debug from IIS and any changes you make will be directly made on IIS as well.

I just double checked one of my local Web Forms applications locally running in Visual Studio 2013 Ultimate on Windows 8.1. The settings are still there. If you open the project properties for your Web Forms project, you should see the following:
After selecting Local IIS, setting a port, and saving, you should be walked through the process of configuring a Virtual Directory for your site (if one isn't already configured).
EDIT
After looking at your edit, it looks like you've created a Web Site Project rather than a Web Application Project. You can read about the various differences here:
Web Application Projects versus Web Site Projects in Visual Studio
If you haven't written any significant code yet, I'd suggest deleting the Web Site Project and creating a new Web Application Project. You'll then see the settings as described above.
If you really want to keep the Web Site Project, you'll have to configure the site in IIS and then open it in Visual Studio using the 'Open Web Site...' dialog (and then choosing Local IIS as the source):

Related

IISExpress shows up as host for browser in Visual Studio and messes up everything - how to get back to local?

All of a sudden after I installed Microsoft Edge on Windows 10 gd, Visual Studio is using IIS Express when debugging a web application and it is messing up everything.
How do I get back to normal, so that stupid IISExpress is not used anymore?
Go to the project settings and on the web tab is a drop down that allows you to choose which engine to use.
I went to Project > Properties > Startup Project and then set my start up projects to start the services I need and my project. This reverted my button back to just "Start".

Visual Studio configures my local IIS website as an ASP.NET website

We are using Visual Studio 2008 on IIS 7, and on some machines we are having trouble getting Visual Studio to recognize our website as an IIS website. On most machines it is configured properly, displaying and running under http://localhost/websitename. But on a couple of machines - using the same solution file - it loads it as a directory/asp.net site: in VS it appears as c:...\foldername, and when running it, it comes up as http://localhost:randomportnumber/websitename.
We tried removing and then re-adding the site through the File-> Open Website-> Local IIS, but when we select the site it automatically changes it to a asp.net site.
Thanks in advance.
In the properties of the project, you can specify whether or not to use IIS or the built-in ASP.NET server.
When you debug a website and you see the odd port number after local, you are running the visual studio web server Cassini and not through IIS.
You can configure this when you go to property settings on your website.

Visual Studio can't create web site in IIS

After installing service pack 1 for Visual Studio 2010 cannot create web site in IIS. Here is error message:
---------------------------
Microsoft Visual Studio
---------------------------
Configuring Web http://localhost/MyWebSite for ASP.NET 3.5 failed.
You must manuallyconfigure this site for ASP.NET 3.5 in order for
the site to run correctly. Visual Studio cannot detect whether this
virtual root has been configured for use with ASP.NET 2.0. The likely
cause is that you do not have sufficient priviledges to access the
IIS metabase. You may need to manually configure this site for
ASP.NET 2.0 in order for your site to run correctly.
---------------------------
OK Help
---------------------------
Does anybody know how to fix it ? Thanks!
P.S. I'm using windows7 x64.
Have you tried run Visual Studio with "Run As Administrator" from right click?
This happened to me when I deleted the default application pool.
Thanks to a Microsoft Connect report, I was able to solve this by choosing a new default application pool under the "Web Site Defaults" properties of the Sites node in the IIS 7 Manager tree.
Try changing the .Net version your Application Pool is using.
Open IIS Manager from Administrative Tools.
Select Application Pools on the left.
On the right, double click 'DefaultAppPool' (or whichever you may have created)
Under .Net Framework Version select v3.5.
Click OK and restart IIS.
I don't know if you have to restart IIS or not, but it won't hurt.
I found the answer here:
Visual Studio 2013. You do not have sufficient privilege to access IIS web sites on your machine
IIS stores a config file on your personal drive. At my company our shared drive was down for maintenance and I was getting this error. Once the drive came back online VS.NET started working again.

IIS 7.0 reflect web site changes

I have published a website on my windows server using IIS 7.0 and visual studio 2010. Its an asp.net project.
While publishing it I chose the option
"Allow this precompiled site to be updatable"
But what I do not know is how to update it when I change my templates/pages/IP address etc in my visual studio project files? I have to remove the corresponding App from IIS and then re-add it whenever I make changes. Any help would be great. Thanks.
You will still need to publish your updated pages to the new site using something like the "Copy Web Site" ability in VS. What the option you select does is allow for dynamic compilation of the page as opposed to a static compilation. For more information look here

Asp.net on visual studio .net 2003 web component Issues

I want to run ASP.NET on VS 2003 but it raises an error which says:
"Visual studio has detected that web server is running asp.net version
1.0.The web application you are creating or opening can be configured to be compliant with asp.net 1.0. However, the web application will
not be able to use the new features from asp.net 1.1."
When I choose the option "Make the application compliant with asp.net 1.0", then it is unable to set the compliance saying
"Visual Studio.NET cannot create or open the application. The
likeliest problem is that required components are not installed on the
local web server. Run Visual Studio.NET setup and add the web
development component."
It seems that you are running Visual Studio 2003 on Vista, which is not supported.
By default, Vista does not include .NET Framework 1.1 SP1. Install it first. Make sure that SP1 is installed. If you look into properties of "c:\Windows\Microsoft.NET\Framework\v1.1.4322\mscorsvr.dll", you should get the version 1.1.4322.2032.
Enable IIS 6 Compatibility in Control Panel -> Program and Features -> Turn Windows features on or off. Check "IIS 6 Management Compatibility" under "Internet Information Servces".
Register .NET 1.1 with IIS by running "c:\Windows\MIcrosoft.net\Framework\v1.1.4322\aspnet_regiis.exe -ir". It will create the Application Pool targeted to Framework 1.1 with Classic pipeline in IIS7 and set Enable32BitAppOnWin64 property to true on 64bit OS.
Allow ASP.NET 1.1 in IIS7. Open the IIS Manager and click on the computer name in left tree. In main window select "ISAPI and CGI Restrictions" and make sure that ASP.NET v1.1.4322 is enabled. If not, select it and click Allow link on right side.
When you create an application on any directory that runs .NET 1.1 or lower, always select Application Pool that is targeted to Framework 1.1. For already configured applications, you have to change it manually.
You may need to update the script map of the ASP.NET application within IIS to use the newer version of the framework. I assume that .NET 1.1 framework and VS 2003 are already installed without issues.
Here is an MSDN article that should explain how to register the ASP.NET application within IIS to use the .NET 1.1 version using the aspnet_regiis.exe tool. Command-line reference for the tool is available here.
Visual Studio.NET cannot create or open the application. The likeliest problem is that required components are not installed on the local web server. Run Visual Studio.NET setup and add the web development component.
I faced this problem when I copied the project folder from the network shared location to my local system.
Solution: Create a empty folder in your local system. Copy the files from the original folder into the newly created empty folder.
In addition to the accepted answer, you may also need to add the actual "Web Development" component that is included with the Visual Studio 2003 setup file.
While in the menu, even after you install ASP.NET v1.1 & associated Hotfixes/security updates, as well as FrontPage Extensions for your version of IIS, you may STILL see a red X over the installation component.
This may seem very hacky, but for some reason the installer doesn't seem to do a very thorough check - just click the "Red X" and the "Update Now!" icon becomes visible, then you can install the component just fine.
Specs: Windows 10, Visual Studio .NET 2003 Enterprise
TIP: If you are running a newer version of IIS, you won't be able to "just create" an ASP.NET 1.1 application pool. You'll need to enter these appcmd.exe commands:
appcmd create apppool /name:"YOURPOOLNAME"
appcmd set apppool /apppool.name:"YOURPOOLNAME" /enable32BitAppOnWin64:true
appcmd set apppool /apppool.name:"YOURPOOLNAME" /managedRuntimeVersion:"v1.1"
appcmd set apppool /apppool.name:"YOURPOOLNAME" /managedPipelineMode:"Classic"
appcmd set apppool /apppool.name:"YOURPOOLNAME" /autoStart:true

Resources