Registering ASP.NET in IIS - asp.net

I am trying to deploy the website I built on Visual Studio. I would like to host on IIS instead of the default ASP.NET Development Server so that I can access the website on my phone.
One of the steps I need to do is register ASP.NET on IIS. I run the following in the command prompt:
1)C:\Windows\Microsoft.NET\Framework64\v4.0.30319
2)aspnet_regiis -i
However, I get this error message:
This option is not supported on this version of the operating system. Administrators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog, the Server Manager management tool, or the dism.exe command line tool. For more details please see http://go.microsoft.com/fwlink/?LinkID=216771.
Here are the details of my system:
ASP.NET 4.0
Visual Studio 2010
IIS 10
Windows 10
I have been to the link provided and it is not helpful at all.
Does anyone know how to solve this problem or is there another way for me to host on IIS instead of ASP.NET Development Server?

On windows 10, you can "setup" IIS and asp.net using the Program and Features...
Go to control panel | Program and Features | Turn Windows features on or off
Inside there locate the "Internet Information Services"
There ensure that "World Wide Web Services" is checked (partial) and inside "application development features" the .Net Extensible and asp.net are checked !
(source: planethost.gr)

Related

In Microsoft Azure .net Framework is not recognized in IIS Application Pool

I am trying to make some ASP.NET website work on Azure.
I have a SQL Server running on the same machine, meaning minimum .net 3.5 is working on it. Also I installed version 4.0 and 4.5 while 4.0 shows up in registry and 4.5 won't show up. Also I can't re-install 4.5 because it is already installed.
In IIS only the .net CLR version shows up, there is no option to make my websites use any other .net Framework version.
When I try to register them using command line : aspnet_regiis.exe -ir
I get the following error on my 2012 Windows Server:
This option is not supported on this version of the operating system. Administr
ators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Win
dows Features On/Off" dialog, the Server Manager management tool, or the dism.e
xe command line tool. For more details please see http://go.microsoft.com/fwlin
k/?LinkID=216771.
also it shows:
Finished installting ASP.NET ...
But nothing shows up in IIS. What options do I have left? I don't know any.
Here my selected version in IIS, 4.0
Here what It shows for the apppools
http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45
This has all details. Basically in server you need to use "Add Roles". So check whether 4.5 is enabled in the "Web server (IIS)" role.

how to configure asp.net with .net 4.5

I am using visual studio 2012 ultimate. Every time I open asp.net web form application the following message pops up.
Configuring web http://"localhost":35651/ for ASP.NET 4.5 failed.
You must manually configure this site for ASP.NET 4.5 in order for the site to run correctly. ASP.NET 4.5 has not been registered on the Web server. You need to manually configure your Web server for ASP.NET 4.5 in order for you site to run correctly.
How to get rid of this message ?
You can install this update and your problem should be solved:
MSDN link
Update:
I've uploaded the file to my Dropbox account so that people can have alternative URL in case if the first one fails, The File Name is VS11-KB3002339.exe
I had this problem on Windows 8.1 and Windows 10 which wouldn't support the aspnet_regiis -i approach.
Go to Control Panel, Click On Programs locate the "Turn Windows features on or off" option Under Programs and Features and drill down as follows:
Internet Information Services -> World Wide Web Services -> Application Development Features and check the "ASP.NET 4.5" option. In checking this box, other options such as ".NET Extensibility 4.5" and the ISAPI options will be checked automatically.
Apply the changes by clicking OK. Restart your System.
Use aspnet_regiis.exe -i. Only you need to set the path of .net version. See this link for more information
ASP.NET 4.5 has not been registered on the Web server
FOR VISUAL STUDIO 2012
you actually need to download an update to fix it from here:
https://support.microsoft.com/en-us/kb/3002339
Description:
Unexpected dialog box appears when you open projects in Visual Studio 2012 after you install the .NET Framework 4.5.3
Reference from related thread.
https://stackoverflow.com/a/49746751/3261852

Can't register .net 4.0 in IIS on windows 8

I tried running aspnet_regiis.exe -ir in an admin cmd but no luck.
Any ideas?
C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -ir
Microsoft (R) ASP.NET RegIIS version 4.0.30319.17929 Administration
utility to install and uninstall ASP.NET on the local machine.
Copyright (C) Microsoft Corporation. All rights reserved. Start
installing ASP.NET (4.0.30319.17929) without changing existing web
applica tions to use this version of ASP.Net. This option is not
supported on this version of the operating system. Administr ators
should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn
Win dows Features On/Off" dialog, the Server Manager management tool,
or the dism.e xe command line tool. For more details please see
http://go.microsoft.com/fwlin k/?LinkID=216771. Finished installing
ASP.NET (4.0.30319.17929) without changing existing web appl ications
to use this version of ASP.Net.
whats all this scary talk about install/uninstall ASP.NET 4.5..
The solution for me on Windows Server 2012 was to:
In IIS, Open Modules, Remove the ServiceModel module.
In IIS, Open Handlers, Remove the svc-Integrated handler.
Restart IIS
More here: http://www.codeproject.com/Articles/613812/Solve-IIS-8-Error-Could-not-load-type-System-Servi
The situation that caused this was the fact that I enabled WCF services after I had already set up IIS and .NET 4.5. This caused all of my apps on the server to fail.
After I completed the above steps to get everything except WCF back up and running, I still needed WCF to work. To accomplish that, I then went into "Turn Windows Features On and Off" and enabled .NET Framework 4.5 Features -> WCF Services -> HTTP Activation
aspnet_regiis is deprecated in IIS8. When we install IIS (ASP .NET 4.5 and other components) automatically asp .net gets registered. We don't need to manually register it.
Can you briefly specify the problem you are facing?
Run the following command from an administrative command prompt: dism /online /enable-feature /featurename:IIS-ASPNET45
For Windows 8 client computers, turn on "IIS-ASPNET45" in "Turn Windows Features On/Off" under "Internet Information Services-> World Wide Web Services -> Application Development Features -> ASP.NET 4.5".
reference: http://support.microsoft.com/kb/2736284
I was facing the same issue as described above. It didn't work even after running following command
dism /online /enable-feature /featurename:IIS-ASPNET45
The solution for me was to install patch to VS 2010 SP1.
Just to give the background I have Windows 10 and VS 2010 SP1 and was facing issue when running a ASP.Net 4.6 site.
Following are links for Visual Studio versions:-
VS 2010 SP1 =>
https://support.microsoft.com/en-us/help/3002340/unexpected-dialog-box-appears-when-you-open-projects-in-visual-studio
VS 2012 =>
https://support.microsoft.com/en-us/help/3002339/unexpected-dialog-box-appears-when-you-open-projects-in-visual-studio
VS

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.

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