Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added web.Release.config to include remove WebDAV during the publish stage of a release #1957

Merged
merged 2 commits into from
Jan 28, 2022

Conversation

Rodien
Copy link
Contributor

@Rodien Rodien commented Jan 21, 2022

Transformations to the web.config file can be applied automatically when an app is published based on Build configuration.

I decided to make this pull request after reading the following discussion: #1952

@dnfadmin
Copy link

dnfadmin commented Jan 21, 2022

CLA assistant check
All CLA requirements met.

Code cleanup. I removed the unnecessary comments.

This code will remove WebDAV during the publish stage of a release.
Copy link
Contributor Author

@Rodien Rodien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the unnecessary comments.

@sbwalker sbwalker merged commit efe6421 into oqtane:dev Jan 28, 2022
@sbwalker
Copy link
Member

sbwalker commented Apr 12, 2022

@Rodien I was doing some local upgrade testing and when I installed version 3.0.3 which contains the WebDAV changes, my local IIS threw an exception and would not start the app:

This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".

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

I never had problems installing Oqtane on IIS in the past - so it appears that the WebDAV modification caused this issue. My concern is that other people will experience this issue as well when trying to install Oqtane. So I am not sure if this modification should be rolled back?

Looping in @leigh-pointer as well since he has helped many people with WedDAV issues.

@Rodien
Copy link
Contributor Author

Rodien commented Apr 12, 2022

@sbwalker

I have not been able to reproduce this…

What I did =>

  • Install Optane 3.0.2 and upgrade to 3.0.3 then upgraded from 3.0.3 to 3.0.1 without issues
  • I installed Oqtane 3.0.3 and upgraded to 3.1.0 again without any issues.

My System:

  • windows 10 version 21H2 (OS Build 22000.556)
  • IIS version 10

Maybe double check your "Internet Information Services" configuration.

image

@leigh-pointer
Copy link
Contributor

@sbwalker in you web.config do you have the handlers addition to remove the WebDAV handler
image

@Rodien Is the WebDAV feature turned off in the Common HTTP Features map?

@sbwalker
Copy link
Member

@leigh-pointer yes I unzipped the Oqtane.Framework.3.0.3.Install.zip file into a clean folder and it contained the web.config file (with the WebDAVModule removal logic):

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
        <remove name="WebDAV"/>
      </handlers>
      <aspNetCore processPath="dotnet" arguments=".\Oqtane.Server.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess" />
      <modules>
        <remove name="WebDAVModule"/>
      </modules>
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: 6A60C4DD-67E6-42A7-B9AA-A1EE45AD45C7-->

IIS threw an error when I tried to start the app in a browser - so I removed the

<remove name="WebDAVModule"/>

and the error went away and the app started up.

@sbwalker
Copy link
Member

@Rodien you may be correct that it is related to my IIS configuration. The strange thing is that Oqtane functions just fine with my IIS configuration - however the WebDAVModule removal item in web.config throws an exception, so I had to remove it manually.

image

@Rodien
Copy link
Contributor Author

Rodien commented Apr 12, 2022

@sbwalker

I am kind of interested to know how you are able to run oqtane without turning on ASP.NET 4.8.
Oqtane will not run if I turn ASP.NET 4.8 off.

Try turning ASP.NET 4.8 on.

image

And this is an installation without the <remove name="WebDAVModule"/> logic.

But the moment I turn ASP.NET 4.8 on oqtane starts working again.

I'm using "" in many DNN installations and have never had issues with it.

@leigh-pointer
Copy link
Contributor

@Rodien oqtane run on .netcore and not asp.net

@Rodien
Copy link
Contributor Author

Rodien commented Apr 12, 2022

@leigh-pointer Yes, I know that Oqtane runs on .NetCore but Oqtane does not work when I turn ASP.NET 4.8 off.

image

@Rodien
Copy link
Contributor Author

Rodien commented Apr 12, 2022

@sbwalker

Take a look at NopCommerce they are also making use of <remove name="WebDAVModule"/>

nopSolutions/nopCommerce@5e4948c

@leigh-pointer
Copy link
Contributor

leigh-pointer commented Apr 13, 2022

To turn webDAV off in a pure .netcore environment (as in no .net framework) then two more settings need to be changed in IIS /Feature Delegation.
image
image
Change these from ReadOnly to ReadWrite and you are good to go.

The reason behind my personal webDAV issues is my hosting provider uses Plesk and there is no option to modify the webDAV component thus removal in the web.config is necessary.

I think the webDAV config should be removed from the solution.

@Rodien
Copy link
Contributor Author

Rodien commented Apr 13, 2022

Adding the Remove WebDav logic to webconfig at build was supposed to help developers and automate things.

But if it's getting in the way then I agree with @leigh-pointer that it should be removed.

sbwalker added a commit to sbwalker/oqtane.framework that referenced this pull request Apr 15, 2022
sbwalker added a commit that referenced this pull request Apr 15, 2022
remove web.release.config as it causes installation issues in pure .net core environments (see #1957)
@sbwalker
Copy link
Member

removed in #2140 - @Rodien I really appreciate your efforts to try and help streamline the installation process... unfortunately it seems that there are some variables which impact its effectiveness. Thank you @leigh-pointer for the insights into pure .NET Core environments vs. .NET Framework environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants