ASP.NET Core module not in IIS - iis

I am keep getting 500.19(0x8007000d) error when running my .NET core project through IIS Express.
After a bit digging, it looks like IIS doesn't recognize <aspNetCore> as a valid element in the web.config.
Here are the things I've tried:
installed URL rewrite module as someone suggested installed
AspNetCoreModule throgh here:
https://www.microsoft.com/net/download/dotnet-core/runtime-2.0.5.
installed .NET Core Windows Server Hosting bundle.
I've tried adding it as a managed module and put the path for AspNetCoreModule, but looks like it doesn't fix the issue. Enable stdoutLog doesn't work, because it simply won't generate any log file.
Any idea on how to solve this?

I got it working finally. Because all my website is under the default website, I went to install AspNetCoreModule module for the default website.
After it was installed, I noticed a change in the web.config under the default website. At the same time, AspNetCoreModule module is also listed as Native module in the module section.
The real error message is web.config was trying to install AspNetCoreModule, but it is already installed. Then I deleted the <modules> section in the web.config under the default website and it worked...
The website used to work before I turned off/on windows IIS features. Really not sure what caused this...

Repairing the core server hosting from the add remove program did the trick -
It seems like IIS was installed or changed after core windows server hosting. According to Microsoft is such case you need to repair the hosting bundle

Add Native module with path C:\Windows\system32\inetsrv\aspnetcore.dll

Related

Blazor host on IIS shows blank page

I created a Blazor Server Project which runs well from Visual Studio, i tried hosting same app on IIS installed Runtime and Hosting Bundle to achieve this. Also, i created site and pointed to the published files. When i run the app on the browser, it shows me a blank page without any error.
Please what could i be doing wrong?
I had this issue today...
I accidentally deleted an import in _Host.cshtml. Unfortunately, this import was used in a string, so no error could be generated. After fixing this all worked fine again.
IIS requires a web.config that isn't created with a normal debug/release build, which is why you are just getting a white screen.
You can use this walkthrough to learn how to publish the website for IIS publish a blazor server application to iis
Alternatively, you could build your own web.config - but I wouldn't recommend it.

IIS has no websites

I'm configuring Windows 10 machine for web development. Installed Visual Studio and want to configure websites. Installed IIS manager but for some reason it doesn't have... anything. No websites, no application pools, no features at all. And it doesn't let me to add any of that.
Has anyone faced this kind of behavior?
Found it. It turned out that something messed up IIS config files (in Windows\System32\inetsrv\Config). So all IIS features were referencing invalid DLLs in the GAC and therefore were silently failing. I only found a trace of that in the Windows Event Log.
Took clean administration.config file and IIS started correctly.

Webmatrix - URL rewrite module

Does anyone have any experience with creating URL rewrites in Webmatrix? Because it uses IIS Express instead of IIS 7, there's nowhere for me to create these rules.
I am deploying to IIS 7 on my production server, so if I need to do any rewrites, I need to make them directly in production to test.
Is there any way I can switch to using IIS instead of IIS Express on my local machine?
I have tried a few things to get local IIS working, but to no avail.
You can install IIS on a Windows 7 or Windows 8 machine by going to Control Panel -> Programs and Features -> Turn Windows features on or off. Make sure to install enough of the components to get a WebMatrix site working - ASP.NET & the management console for certain.
You can then create a virtual server for the directory your project is in and use the IIS management console to play around with URL rewriting. You may need to install the UrlRewrite module using the MS Web Platform Installer, available here:
http://www.microsoft.com/web/downloads/platform.aspx
If you need more help getting your local IIS working, give me some more information on how far you've got and I'll try and extend my answer.

Migrating Umbraco 4.7.1 from IIS6 to IIS7

I have taken over an Umbraco (version 4.7.1) installation from a previous coworker. The server hosting the application must be shut down and therefore I'm migrating the application to a new server.
The old server is running IIS6, but the the new server is running IIS7.5. When I try to open the site on the new server, I get a "Object reference not set to an instance of an object" exception. The YSOD does not provide much info on what's going wrong (see below).
When I run the application locally in Visual Studio it works like a charm. Do any of you have a clue to what is going wrong?
Can I suggest that you take a clean web.config from the Umbraco 4.7.1 archive and try that first. You can download v4.7.1 from this unofficial archive http://code.leekelleher.com/umbraco/archive/
Merge your customisations into the web.config e.g. connection string and give that a go as I suspect your web.config is not migrated to IIS7.
I wrote a blog post a few years ago about migrating web.config files from IIS6 > IIS7 which may be of use if the above advice doesn't help:
http://www.prolificnotion.co.uk/use-appcmd-to-migrate-web-config-from-iis6-to-iis7/
Have you checked that your application pool is running the correct version of the .Net Framework? Also check the pipeline mode you are running - mine run in Integrated mode not Classic.
In the <system.webServer> node of your web.config locate the <modules> node and ensure you have the runAllManagedModulesForAllRequests attribute set to true as that has caught me out a few times. It should look something like this:
<modules runAllManagedModulesForAllRequests="true">
I suspect the latter advice is the one that will do it for you.
Simon
Just riffing on some of #Pronotion's suggestions ... I have occasionally had issues installing apps on new server instances and have had to reinstall IIS. It's a single command line: aspnet_regiis -i
Also from your screenshot, it looks like you are running a .Net 4 app pool. Umbraco 4.7.1 should be running under .Net 2 Classic app pool as far as I remember.

Umbraco - web.config issue when installing

I'm trying to install a default Umbraco installation on IIS7, and I'm getting the following error on my (unmodified) web.config file, any ideas?
Config Error
The configuration section 'system.web.extensions' cannot be read because it is missing a section declaration
Thanks,
I'm going to assume you are using the current version of Umbraco 4.5.2 as offered on the Codeplex site...
By default, Umbraco is configured to use .Net 2.0 (not .Net 4.0). Go to your IIS Management Console, select ApplicationPools and double-click your website. Make sure the .Net Framework is set to 2.0.
Also make sure the server you are running the IIS on has .Net 2.0 installed!
If you can provide more information from the server's error page, I can help better pinpoint the error...

Resources