Web.config stops app from running in iis

Hi,

The following section in web.config stops the app from working when deployed in IIS. Am I doing something wrong?

    <modules>
      <remove name="WebDAVModule" />
    </modules>

I deployed using zip remote and direct to IIS local, both have similar results. Error 500.

Hi @simon,

Here is more info about the WebDAV problem, Radzen users have reported it and this is why that section in the web.config exists (<remove name="WebDAVModule" /> ) . Microsoft even documented it.

1 Like

But why does having in web.config stop my app from working? I get error 500 with the in but seems to work when the section is removed.

Check if there is a log in the application root folder or IIS logs.

No log was generated. Running the dll direct works fine, it's just running in IIS that is the issue.

Unfortunately Iā€™m not sure what caused this exception.

I understand. I don't really have a lot to go on myself. Any tips on how to dig deeper? Like how to enable the logs.

@simon You can check Microsoft documentation:

I don't see anywhere to log the blazor application start events.

All IIS exceptions should be part of the windows event log. Also you haven't yet specified the actual error message - at least something should appear in the browser when you open the page of the application.

Usually this error happens when the user does which IIS runs with does not have sufficient rights to exclude modules (such as WebDAV). Some people would recommend to just uninstall WebDAV as you are most probably not using it. Then that line from web.config should not cause any trouble. You can check here for instructions how to uninstall it: azure - How to remove WebDAV module from IIS? - Stack Overflow

I agree that something should have popped up in the event log but I didn't find anything. The app does not actually start with the webdav remove included. The error is

None of the errors or logs are helping us. However I think that you may be on to something regarding user security. I use the app pool user to run the app. I also note that the event log shows that it cannot write the stdout to .\radzen which is why I'm not seeing the error. I just need to figure out what to change. Meanwhile removing the webdav remove line is my temporary fix.

@korchev Just coming back to this one.
Firstly for logging to work properly, I had to install ASP.NET Core 2.2 Runtime (v2.2.2) - Windows Hosting Bundle
I still have the issue with ensuring that the webdav remove command must be taken out of the web.config. It seems that because I had never installed it, then IIS just does nothing at all. All good, at least I know for next time. Just sharing in case it helps anyone.