IIS 7.0 StaticFile Error - iis-7

My project is based on ASP.NET 4.5, it works in my local machine with Visual Studio 2013. And it also works well in Windows Server 2012 R, but when I put it into IIS 7.0 in Windows Server Standard (32 bit), a error is thrown;
Module: IIS Web Core
Info: MapRequestHandler
handle: StaticFile
Code 0x80070002
I had registered .NET v4 and added aspnet_isapi.dll to handle map, i had set the path of the StaticFile to '*'.
But it still doesn't work well.
How to deal with it.

I had a similar issue before, I think you have to register the .net framework in IIS.
Open a command line window and navigate to
c:\windows\microsoft.net\framework64[your .net version]\
and type
aspnet_regiis -i

Related

Publish a .Net 5.0 web in IIS from Visual Studio 2019 doesn't start

I am trying to publish a test website in .Net 5.0 on an IIS on Windows 10.
I have .Net 5.0 installed
I have activated the IIS on Windows
I have installed the ASP.NET Core 5.0 Runtime (v5.0.1)
I have installed the dotnet-hosting-5.0.1-win
I have created the web application in the IIS and assigned it a specific Pool with the .Net CLR version "No code managed" and "Integrated". I have assigned the port 8090.
From Visual Studio when Publish I selected:
File System
Configuration: Release
Target Framework: 5.0
Deployment Mode: Self-Contained
Target Runtime: win-x86 (with win-x64 it doesn't work either)
My Windows version is 1909 (OS compilation 18363.1256)
If I navigate to the path http://localhost:8090/ I get this error "HTTP Error 500.32 - Failed to load .NET Core host.
I have reset the IIS, I have deleted and recreated the application, I have restarted Windows, but it still does not start the test web.
The Windows event viewer showed me these errors:
Unable to load 'C:\inetpub\wwwroot\TestNetCore.\hostfxr.dll'. This might be caused by a bitness mismatch between IIS application pool and published application.
Could not find 'aspnetcorev2_inprocess.dll'. Exception message:
Failed to start application '/LM/W3SVC/2/ROOT', ErrorCode '0x800700c1'.
I don't know what else to look at. Any ideas or suggestions?
Your errors are in ASP.NET Core, For these errors, you can try the following solutions:
Have you install asp.net core module? if not, please install it:
ASP.NET Core Module
Open IIS manager > Application Pool > Select App pool > Advanced
Settings, update "Enable 32 bits applications" from false to true > Click OK.
Try to delete the applicationhost.config (in .vs\config\applicationHost.config) and rebuild app.
I solve this problem in this way for myself:
In web.config I remove hostingModel="inprocess"
I answer for others who encounter this problem

IIS: Unrecognized attribute 'runallmanagedmodulesforallrequests'

I am experiencing trouble running a .Net core web application on a specific Windows 2016 server. The same packages is working on other servers running Windows 2016.
Things done
-Installed all components except CGI in Windows Server (IIS) >>Application Development
-Installed .Net 4.8
Detailed Error Information:
Module
IIS Web Core
Notification
BeginRequest
Handler
Not yet determined
Error Code
0x8007000d
Config Error
Unrecognized attribute 'runallmanagedmodulesforallrequests'

Cassini: ASPX file: This type of page is not served

When running a ASP.NET 3.5 project in Visual Studio 2010's Casini, I receive the following error:
This type of page is not served.
Description: The type of page you have
requested is not served because it has
been explicitly forbidden. The
extension '.aspx' may be incorrect.
Please review the URL below and make
sure that it is spelled correctly.
Requested URL: /default.aspx
Version Information: Microsoft .NET
Framework Version:2.0.50727.4952;
ASP.NET Version:2.0.50727.4955
This is a project running in visual studio 2010 in windows 7 64 bit on .NET 3.5
The same error occurs in IIS, although IIS is configured to handle .aspx:
I also executed aspnet_regiis /i from the 2.0.50727 .net folder:
C:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -i
Finished installing ASP.NET (2.0.50727).
I concluded the following
Check the target framework of your project.
Also check if default.aspx exists on the disk. If you are redirecting or accessing the page
try using ~/DirName/Pagename.aspx if inside root , in some directory or ~/page.aspx if in the root itself.
Also .Aspx files are by default added to IIS or any webserver that supports asp.net.

Should ASP.NET v2 IIS server extension be missing after .NET 4 is installed?

I'm having a ton of issues when my ASP.NET sites are using version 2. For example, all my SVC and ASPX files return "file not found". Also when I use IISMgr and navigate to:
ServerName
..... Web Service Extensions
I notice that ASP.NET v2 is not present. I tried aspnet_regiis but no luck. Does anyone have Windows 2003 with .NET 4 installed? Can you tell me what you have for ASP.NET 4.x so I can manually re-add the IIS extension?
UPDATE
aspnet_regiis.exe – i seemed to now have worked. But I'm still having issues with WCF. I just tried reinstalling WCF using ServiceModelReg -i and I get this in the event log
Also, this is what ServiceModelReg -ls looks like (note no Web Host Script Mappings exist)
A probable solution is here. Excerpt:
When you build Window 2003 R2 SP2
server – by default it has
Microsoft.NET Framework 2.0 Service
Pack 1 and Microsoft .NET Framework
3.0 Service Pack1 installed. You will notice ASP.NET v2.0.50727 is
MIA(missing in action) in Web Services
Extension in IIS manager. How you make
it appear and make it as an “allowed”
service?..start a DOS window – change to the following directory
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>
or
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727>
for 64 bit
Type aspnet_regiis.exe – i
EDIT: I just now read that you tried aspnet_regiis - did you use the correct Framework folder depending on your processor architecture?

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