How to register ASP.NET 2.0 to web server(IIS7)? - iis

I have a web-page application already created, but when I open it in visual studio 2008, it says there that:
ASP.NET 2.0 has not been registered on the Web Server. You need to
manually configure you Web server for ASP.NET 2.0 in order for your
site to run correctly.
I'm using asp.net 2.0, IIS7 and running on vista home premium.
How to register ASP.NET 2.0 to my web server(IIS7)?

ASP .NET 2.0:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -ir
ASP .NET 4.0:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir
Run Command Prompt as Administrator to avoid the ...requested operation requires elevation error
aspnet_regiis.exe should no longer be used with IIS7 to install ASP.NET
Open Control Panel
Programs\Turn Windows Features on or off
Internet Information Services
World Wide Web Services
Application development Features
ASP.Net <== check mark here

If anyone like me is still unable to register ASP.NET with IIS.
You just need to run these three commands one by one in command prompt
cd c:\windows\Microsoft.Net\Framework\v2.0.50727
after that, Run
aspnet_regiis.exe -i -enable
and Finally Reset IIS
iisreset
Hope it helps the person in need... cheers!

If you installed IIS after the .Net framework you can solve the porblem by re-installing the .Net framework. Part of its install detects whether IIS is present and updates IIS accordingly.

Open Control Panel
- Programs
- Turn Windows Features on or off
expand - Internet Information Services
expand - World Wide Web Services
expand - Application development Features
check - ASP.Net
Its advisable you check other feature to avoid future problem that might not give direct error messages
Please don't forget to mark this question as answered if it solves your problem for the purpose of others

The system I was working on is Windows Server 2008 Standard with IIS 7 (I guess that my experience will apply for all Windows systems of the same age).
Running
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir
SEEMED to work, as
C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -lv
showed the .Net framework v4 registered with IIS.
But, running the same for .Net v2, namely
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -ir
did NOT result in
C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -lv
showing the framework registered.
(And, for me, the installer for Kofax Capture Network Server was still missing ASP.NET.)
The solution was:
Open Server Manager
Go to Roles/Web Server (IIS)
Push Add Role Services
check ASP.NET under Application Development (and press Install)
After that, aspnet_regiis.exe -lv (either version) shows the framework registered.
(And the Kofax installer was also happy and worked.)

I got it resolved by doing Repir on .NET framework Extended, in Add/Remove program ;
Using win2008R2, .NET framework 4.0

Related

ASP.NET Core 2.0 app targeting .NET 4.6.1 fails to host on IIS

The problem
IIS ASP.NET Core module is unable to start an ASP.NET Core 2.0 app.
Browser: HTTP Error 502.5 - Process Failure
Windows Event Log: Application ‘MACHINE/WEBROOT/APPHOST/AppSite’ with physical root ‘C:\inetpub\apps\AppFolder\’ failed to start process with commandline ‘C:\inetpub\apps\AppFolder\App.exe’, ErrorCode = ‘0x80004005: 1’.
ASP.NET Core Module Log: Log file is created but is empty.
The setup
App: ASP.NET Core 2.0 targeting .NET Framework 4.6.1.
Server: Windows Server 2012 R2 Standard 6.2.9200 with IIS 8.5.9600.
The story
We've created a blank MVC Web application using the default project templates provided in Visual Studio 2017.
The app is deployed following the official specification: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/.
The confusion arises mainly from these two points:
Running the app through command-line on Kestrel works.
Running a different app but targeting .NET Core 2.0 and publishing as framework-dependant works flawlessly on IIS.
But between these two apps: the codebase is the same, the IIS website and application pool is the same and we even emptied out the app directory and used the same one.
Due to these points the only difference seems to be the net461 app's executable file.
We do not have full control over the Windows Server where we're trying to deploy but we do have administrator accounts. The current assumption is that the issue lies within permissions - maybe AD group policies, antivirus blocking the file but we're still awaiting response from the client's sysadmins. Meanwhile we haven't been able to replicate the error code ‘0x80004005: 1’ while trying to setup these restrictions on our development machines.
Here's an incomplete list of ideas and points about the issue we've tried while problem solving:
The initial app (targeting net461) works flawlessly on IIS when
deployed to other servers (Windows 10 Enterprise, Windows Server 2012
R2 Datacenter).
Reinstalling different versions of ASP.NET Core/.NET Core: Runtime & Hosting Bundle.
Setting NTFS permissions to the dotnet folder.
Changing IIS application pool identity to an administrator account.
Restarting the server.
Going over local group and security policies.
Going over the antivirus settings and logs.
Trying to deploy on a brand new server (same OS, same bloat).
All ideas/comments are greatly appreciated. The more obscure the better.
EDIT:
Since this got flagged as a possible duplicate of ASP.NET Core 0x80004005 I need to specify why that is not a duplicate.
That referenced project is an older version of ASP.NET Core (last use
of project.json was in 2016)
That referenced project targets .NET Core and not .NET 4.6.1. It is mentioned here as well that targeting .NET Core works on IIS in regard to this issue.
Selected answer points out that they fixed it by:
Turns out that this was result of needing to install some windows
updates and this problem:
api-ms-win-crt-runtime-l1-1-0.dll is missing when opening Microsoft
Office file
Rather than install the version discussed in the above issue I whet
into Programs and Features and ran a repair on Microsoft Visual C++
2015 Redistributable.
but the installation of Microsoft Visual C++ 2015 Redistributable is one of the steps in the official setup guide and it is mentioned here as well that the official guide has been followed during the setup process.
We have gone over that post and tried to repair and reinstall the Microsoft Visual C++ 2015 Redistributable runtime components and this did not fix the issue.
If anyone stumbles upon this post in the future:
The problem was indeed in the server's antivirus. It wasn't directly blocking the app's executable but its call to a class library in the system folder. This termination did not raise any of the usual alarms.
The application "C:\inetpub\apps\AppFolder\App.exe" attempted to load the library "bcrypt.dll" by calling the function "LoadLibraryExW". The operation was blocked and the application terminated.
After switching the MVC blank app to a completely blank Hello-World app it ran successfully.

Page keeps loading forever

Im using IIS 8.5 on Windows Server 2012 R2 so I add my Web Api but when I try to view the site it stays in a loading state like this:
Do not show any message or error just stays loading, I think that i miss some configuration or feature in my IIS but I don't know which one.
Edit: I use .Net framework, it is a REST .net web api like this reference, the IIS have installed .Net versions 3.5 and 4.5, it's IIS not the express and the default IIS website runs fine.
I would really appreciate any help.
Try to reduce the timeout settings to a minimum level, say 10 seconds.
See if it throws a Timeout error.
Without much information from your side its hard to judge.
Perhaps it could be an external service you are trying to access(Web service) or a DB connection?
Please check if the application pool you assigned to your solutions runs under the correct version of .net framework and in integrated mode. I had similar issues when trying to run an mvc app in classic mode. Check this out.
EDIT 1 - Reconfiguring IIS
If problems persists then try the ASP.NET IIS Registration tool. Execute the followig command as administrator:
aspnet_regiis -i
At the end of this post the different locations for aspnet_regiis are described. You should select a .NET Framework version corresponding to that of your project, run aspnet_regiis and assign the proper application pool to your app.

HTTP Error 404.17 - Not Found (.Net 4)

I've just got a new server setup on Windows 2008 Web edition. I'm trying to set the first asp.net 4 application up on it but am having nothing but problems.
The latest is that I'm getting the 404.17 error, which says "the requested content appears to be script and will not be served by the static file handler.".
I've done a lot of research on google but most suggestions seem to be to run aspnet_regiis -i to install asp.net 4. I've done this several times both on the Framework and Framework64 folders, but with no success.
I tried changing from the default application pool to a .net4 application pool, which appeared to work at first and I instead got a server error to do with permissions. I fixed that, and immediately the 404.17 error returned.
Other suggestions I've read say to go into the "turn windows features on and off" and make sure .net 4 is selected there under IIS. However on this server clicking "turn windows features on and off" takes me to the standard windows 2008 server manager. I click "add features" there, and only ".NET Framework 3.0 Features (Installed)" is listed and selected. .NET 4 isn't shown there, yet it is selectable through the application pools.
What else can I try to get the website running as I'm at a complete loss now. Its annoying because my old server was easy to manage - I did it all through the server itself without a control panel (Windows 2003), now on my new server I have to manage most of it through Plesk because there is no dns.
Any help would be much appreciated.
I too had the same problem but solved it with simple solution. My program was in framework 4.0 but in application pool was mapped to framework 2.0.
Just changed the frame work in application pool to 4.0.
It worked.
I've finally figured out the problem, and it was to do with Plesk itself.
After delving through some of the thousands of links throughout the plesk control panel I found a page for "Website Scripting and Security". Under there it was set to .NET 2.0. However, even though I'd installed .NET 4 on the server, Plesk didn't know about it. Although the application pool I'd set the website to run under through IIS was .NET 4, it still wouldn't work for some reason.
I then found another page under "tools and settings" for server components, and on that page is a refresh button. Hit that and it suddenly realised that .NET 4 was installed, went back to the website scripting and security page, selected .NET 4, and hey presto, I got a server error (never have I been so glad to see a server error).
I then just had to give the application pool identity read access to the web folder, and the website worked.
I wish I'd paid an extra £15 per month for Windows 2008 Standard edition now so I could manage it all manually without Plesk.
Ensure that you are running this application under a Virtual Directory, also ensure that your IIS has ASP, ASP.Net, ISAPI Extensions And Filters, Static Content installed.
Change the .net framework from 'plesk' panel:
go to Domains
select then domain
Go to 'Domain and Websites & Domains'
Hide Advanced Operations
Go to 'Asp.net Settings'
Go to 'Change Version'
select 4.0
If you don't have the 4.0 option then you must install the framework on your server first.

HTTP Error 404.3-Not Found in IIS 7.5

I'm using IIS 7.5 on Windows Server 2008 R2 x64 Enterprise Edition. In the project we have developed with ASP.NET 4.0 we used WCF Service. But it doesn't run over domain when the software is running from local computer. Otherwise, I am getting the following error:
HTTP Error 404.3-Not Found
The page you are requesting cannot be served because of the extension
configuration. If the page is script, add a handler. If the file should
be downloaded, add a MIME map.
You should install IIS sub components from
Control Panel -> Programs and Features -> Turn Windows features on or off
Internet Information Services has subsection World Wide Web Services / Application Development Features
There you must check ASP.NET (.NET Extensibility, ISAPI Extensions, ISAPI Filters will be selected automatically). Double check that specific versions are checked. Under Windows Server 2012 R2, these options are split into 4 & 4.5.
Run from cmd:
%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir
Finally check in IIS manager, that your application uses application pool with .NET framework version v4.0.
Also, look at this answer.
In my case, along with Mekanik's suggestions, I was receiving this error in Windows Server 2012 and I had to tick "HTTP Activation" in "Add Role Services".
In windows server 2012, even after installing asp.net you might run into this issue.
Check for "Http activation" feature. This feature is present under Web services as well.
Make sure you add the above and everything should be awesome for you !!!
I was having trouble accessing wcf service hosted locally in IIS. Running aspnet_regiis.exe -i wasn't working.
However, I fortunately came across the following:
Rahul's blog
which informs that servicemodelreg also needs to be run:
Run Visual Studio 2008 Command Prompt as “Administrator”.
Navigate to C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation.
Run this command servicemodelreg –i.

404.2 Error after installing .net 4.0

I have a project which I have upgraded to .Net 4.0, but when I try to access it, I retrieve the following error:
HTTP Error 404.2 - Not Found
The page you requested could not be displayed because of the settings for the list of ISAPI and CGI restrictions on web server.
ErrorCode: 0x800704ec
Handler PageHandlerFactory-ISAPI-4.0_32bit
Do I need to do something extra to the IIS 7 or APP pool, when converting an existing site to a .NET 4.0 site?
Also if I look at ISAPI both 32bit and 64bit of the .Net 4.0 is installed.
In IIS, enable .NET 4.
Here is image:
I take it you're running on IIS6 right now..
Open the IIS manager, and go to the Web Service Extensions area.. You'll be able to enable .NET 4 in there.. All new extensions are disabled by default :)
If you're running on IIS7, .NET might not have registered in IIS.. Then open up an admin command prompt and navigate to the .NET 4 framework folder (C:\Windows\Microsoft.NET\Framework\v4.{version}). If you're on a 64 bit machine go to the Framework64 folder instead of the Framework folder.
Then run aspnet_regiis -i in there
I had this same issue. Strangely, for me it would run in integrated mode but not in classic mode for .NET 4. After enabling the .NET 4 extensions via the Isapi and Cgi restrictions section in IIS 7, it then began working in both modes. The Isapi and Cgi restrictions section is located at the server level node in IIS manager. This option should not be confused with the Isapi Filters section at the site level.

Resources