Authntication problem for WebDAV on IIS 7.5

Advertisement

Guest

Authntication problem for WebDAV on IIS 7.5

Hi,

I'm not able to connect to a WebDAV folder on a IIS 7.5 server using TLS/SSL. Here's what I see in the connection window:

Connecting to host
Authenticating...
Authenticating...
Authenticating...
Authenticating...
Authenticating...
Authenticating...
Authenticating...
Authenticating...
Authenticating...

until it hangs and crash. Looks like the same issue in this thread:
https://winscp.net/forum/viewtopic.php?t=15850

I'm using WinSCP 5.7.6. I've enabled logging and the following line appears many times in the logs:

[status-line] < HTTP/1.1 401 Unauthorized

WinSCP don't prompt me for a user name or password even if I leave those fields empty in the Login window as it normally does for a SFTP connection.

I've found out that if I create a local Windows account on my computer using the same user name and password as on the server, WinSCP is working inside this account. It looks like WinSCP is using Windows credentials to connect to a WebDAV folder.

Cheers
Patrick

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Authntication problem for WebDAV on IIS 7.5

Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

Reply with quote

Guest

Re: Authntication problem for WebDAV on IIS 7.5

Thanks for your reply. Here's 2 log files. Please note I've changed the server's host name in the files. One last thing, the WebDAV server is part of an AD domain while my computer isn't. It's always the same no matter what user name/password I put in the WinSCP's login window.

Cheers,
Patrick
Description: This log file was generated when I was able to connect. I was logged in a local account who has the same user name and password than my account on the WebDAV server. If I put a different password on my local account, my server's account get locked when I
Description: This log file was generated when the problem occurred. I was logged in the local administrator account which doesn't exist on the WebDAV server.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

Re: Authntication problem for WebDAV on IIS 7.5

Thanks for the logs.

Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.

Reply with quote

pat2855
Joined:
Posts:
1

Re: Authntication problem for WebDAV on IIS 7.5

martin wrote:

Thanks for the logs.

Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.

Mail sent.

Reply with quote

Advertisement

lfassio@invallee.it
Joined:
Posts:
2
Location:
Italy

Cannot access WEBDAV share on IIS - Windows 2016

I've exactly the same problem and enclose my log, of course credentials are correct and i can connect via NET USE from command prompt to the resource. The server name and login name have been changed for security purpose.

Thank you in advance

Lucio Fassio
Description: Full debug log file

Reply with quote

martin
Site Admin
martin avatar

Re: Cannot access WEBDAV share on IIS - Windows 2016

Can you connect with any other WebDAV client (not counting net use)?

Reply with quote

UD2020
Guest

I have the exact same issue as well ;-)

I have the same issue my server is running in IIS10/ Windows server 2019 and I can connect to the server using carrotdav client. Also can map using Windows explorer. WinSCP seems to be failing to connect. attached log.
  • test@test.com.log (94.74 KB, Private file)

Reply with quote

Advertisement

lfassio@invallee.it
Joined:
Posts:
2
Location:
Italy

WEBDAV access failed

In my case it was not a WinSCP fault.

We discovered that if the shared directory is a .Net application, WEBDAV analyzes web.config and obeys to the directives written there.

So if in the web.config you have a handler who manages the access to the file system, like this:

<handlers accessPolicy="Script">
<!-- Clear all handlers, prevents executing code file extensions or returning any file contents. -->
<clear />
<!-- Return 404 for all requests via a managed handler. The URL routing handler will substitute the MVC request handler when routes match. -->
<add name="NotFound" path="*" verb="*" type="System.Web.HttpNotFoundHandler" preCondition="integratedMode" requireAccess="Script" />
<!-- WebApi -->
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
<remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>

you will never access the contents of such directory.

Microsoft's guys told us that this behaviour is by designed and cannot be changed, so we returned back to classic FTP.

Reply with quote

Advertisement

You can post new topics in this forum