2

I am running a gallery template Windows Server 2012 VM instance on Azure. I've deployed a .NET site to the local IIS 8.0 but it doesn't work, just gives 404's for path that work fine on dev box (IIS Express).

I had a nightmare with Web Deploy already on this VM so I think this whole VM template is screwy.

I want to re-register ASP.NET with IIS using aspnet_regiis.exe but I see this 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.

The link goes to a page explaining how to add roles. I haven't the faintest idea how to remove roles.

There is a TechNet article about doing it via PowerShell and has almost a footnote for removing via a GUI, using "The Remove Roles Wizard" - which is nowhere to be found on Server 2012.

How can I remove IIS or ASP.NET or .NET Framework and reinstall it these days? It's so confusing.

In fact, its seem SO impossible, that I'm wondering whether this isn't some customization of the VM template on Azure; there's no way to remove anything.

Luke Puplett
  • 42,091
  • 47
  • 181
  • 266
  • Duplicate of http://stackoverflow.com/questions/14495429/alternative-for-the-registering-asp-net-4-5-on-windows-server-2012 though in that question, the answer would be trickier to follow if you'd ticked the skip option on the first page of the Add wizard. – Luke Puplett Dec 04 '14 at 18:05

3 Answers3

2
I want to re-register ASP.NET with IIS using aspnet_regiis.exe

simply you can't, you'll need to turn on / off features in windows 2012

  • Go to Control Panel,
  • Click Programs, and then click Turn Windows features on or off.
  • In the Windows Features dialog box, click Internet Information Services to install the default features.
  • Expand the Application Development
  • Features node and click ASP.NET 4.5 to add the features that support ASP.NET. (If you installed .NET 3.5, select ASP.NET 3.5 also.) The following additional features are automatically selected: .NET Extensibility 4.5

    • ISAPI Extensions
    • ISAPI Filters
    • .NET Extensibility 3.5 (If ASP.NET 3.5 was selected)

for the command line take a look at this article and see if that works.

pedrommuller
  • 15,741
  • 10
  • 76
  • 126
  • 1
    Thanks, but these features were already installed. I was trying to find out how to remove them. I just cannot see a way, though I have managed to via PowerShell `Remove-WindowsFeature` – Luke Puplett Dec 04 '14 at 17:36
  • why don't you try to "turn off" (uncheck) the features using the gui? – pedrommuller Dec 04 '14 at 17:37
  • 1
    They won't uncheck! Seriously. I'm in the Add Roles and Features Wizard and there are grey squares in items, but I can't uncheck the squares, ticks are grey. It's like a one-way street. Though I *can* remove via PowerShell. – Luke Puplett Dec 04 '14 at 17:40
  • 2
    In Server 2012, the ability to REMOVE features is separate from the Add Roles and Features. From the Server Manager, click on Manage in the upper right area of the box, which then gives you clear options to either remove or add roles and features. You will not go into Add Roles and Features and have the option of unchecking/removing anything, nor can you go into Remove Roles and Features and be able to add anything. – Saint Ronin May 21 '15 at 18:56
1

Actually you don't need to register framework in iis8. just follow below step to work with framework 4.5.

enter image description here

OR

Run the following command from an administrative command prompt: dism /online /enable-feature /featurename:IIS-ASPNET45

Mohammad Imran
  • 125
  • 1
  • 6
0

Use Get-WindowsFeature to list them and Remove-WindowsFeature to remove them or there is a GUI tool, but its not where you expect.

The problem was that I was using the search tool on the 2012 start screen and typing "features" which gives "Turn Windows features On/Off" which is wrong, because when launched, you cannot turn features off via the tool it presents. That's a Windows UI bug.

I needed to go to Server Manager, Manage menu, Remove Roles and Features!

IMPORTANT

Removing .NET 4.5 from a Windows Server 2012 R2 Azure gallery VM seems to brick the VM, just get a Command Prompt on restart. This happened twice, two VMs dead. Not sure what to do if you need to re-register ASP.NET with IIS. Use Windows 2008?

Luke Puplett
  • 42,091
  • 47
  • 181
  • 266