Hi, I am an IT Consultant, but this is my first time setting up WebDAV for a client. I cannot figure out what I've done wrong and the client is getting impatient. Help will be much appreciated!
I am trying to set up Secure WebDAV access to a file share on their file server (Windows Server 2012 (not R2)).
First off, why is there no straightforward documentation from Microsoft on how to share one folder via WebDAV?! Why is this so complicated? I understand some need granular control of settings, but geez, why can't a newb just "flip a switch" and share a folder
via WebDAV? Okay, rant over, please help me figure this out.
I followed these articles to install WebDAV, create Certificate Signing Request (CSR), create Root and SSL Certificates using OpenSSL, install the SSL Certificate into IIS on the server and bind to port 443, set Port Forwarding on their Verizon router for port
443 to the server's LAN IP, and import the Root Certificate into the Trusted Root Certificate Store of the client PC.
http://advancedhomeserver.com/webdav-and-windows-server-2012/
http://advancedhomeserver.com/if-you-plan-to-use-ssl-read-this-first/
http://advancedhomeserver.com/making-a-pc-a-secure-webdav-server/
http://advancedhomeserver.com/iis-and-the-certificate-signing-request/
http://advancedhomeserver.com/openssl-and-your-root-certificate/
http://advancedhomeserver.com/domain-certificates-and-windows-server-2012/
http://advancedhomeserver.com/exporting-and-importing-root-certificates/
http://advancedhomeserver.com/webdav-and-windows-server-2012/
Verizon Static IP: xxx.xxx.xxx.38
Server name: SERVER12
Domain: COMPANYDOMAIN
Physical folder: E:\TestWebDAV
Virtual directory: TestWebDAV
When I attempt to Map Network Drive using this path: https://xxx.xxx.xxx.38/TestWebDAV
I get challenged, enter my domain username and password 2 or 3 times, and receive the following error. Same error if I use the administrator username/password.
The mapped network drive could not be created because the following error has occurred:
A device attached to the system is not functioning.
Note: I cannot use their domain name address (https:\\www.companydomain.com\TestWebDAV) since their website is hosted by an external provider. I got them a Static IP address from Verizon and have Port Forwarding configured on the Verizon router for TCP 443.
============================================================
After I enabled Directory Browsing for the Default Web Site in IIS, I can now browse to https://localhost/TestWebDAV and its subfolders from within IIS, Internet Explorer, and Google Chrome on the server.
The problem occurs when I attempt to connect across the Internet. I have tried to Map Network Drive from the client's laptop (from my office) which is a member of the domain, and from my desktop PC. Both are Windows 7.
============================================================
I followed these instructions for converting the Virtual Directory to an Application and associating a different application pool to the Application instead of using the DefaultAppPool:
http://blogs.msdn.com/b/benjaminperkins/archive/2013/08/01/setting-up-webdav-on-iis-using-windows-authentication-and-a-unc-mapped-drive-or-file-share.aspx
I ran thru the instructions a week ago, then reverted the changes when it did get WebDAV working. I then discovered the SSL Certificate I had installed on the server had disappeared somehow, so I am now following the instructions again, but:
I am stuck on the SETSPN commands, I cannot figure out what "accountname to use". I have tried:
SETSPN -L administrator
SETSPN -L COMPANYDOMAIN\administrator
SETSPN -L SERVER12\administrator
None are working now, although when I tried this previously, I got the SETSPN commands to work.
============================================================
As a sanity check, I had a friend create a WebDAv share on his website, which is hosted at hostgator.com
I can successfully Map Network Drive to:
https://gatorNNNN.hostgator.com:2078
using the username and password he set up for me.
So the problem getting WebAV working for my client is not my computer/router/firewall, etc.
I do wonder if I am formulating the URL correctly using the Static IP (https://xxx.xxx.xxx.38/TestWebDAV)?
============================================================
Server = Windows Server 2012 (not R2)
Roles - File Server / IIS / Desktop Experience feature added
Here are the things I have done already:
1. Created a test file share (TestWebDAV) with subfolders, some Full Control for the Sales group, others explicitly denied Full Control for the Sales group. Exploring those same file shares from a LAN computer works fine: folders are either Read/Write or "invisible"
per their permissions.
2. Added webDAV/IIS role and created virtual directory, pointing to that file share.
3. Created WebDAV Authoring Rule and allowed all users to access all content.
4. At this point with basic configuration it failed, so then I tried other things.
5. Enabled Windows authentication, but have tried Basic and Digest. Currently I'm allowing Windows Authentication only.
6. After I enabled Directory Browsing for the Default Web Site in IIS, I can now browse to https://localhost/TestWebDAV and its subfolders from within IIS, Internet Explorer, and Google Chrome ON SERVER12. But when I attempt to Map Network Drive across the
Internet, I get the error "A device attached to the system is not functioning".
7. Since I have the SSL cert on SERVER12 and the clients, i have enforced Use SSL only. The bindings are 80 and 443.
8. I increased the Registry values:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\
FileAttributesLimitInBytes = 200000000
FileSizeLimitInBytes = 4200000000
============================================================
Here is the bottom section of the applicationHost.config file in C:\Windows\System32\inetsrv\config:
</system.webServer>
<location path="Default Web Site">
<system.webServer>
<security>
<requestFiltering>
<fileExtensions applyToWebDAV="false" />
<verbs applyToWebDAV="false" />
<hiddenSegments applyToWebDAV="false" />
</requestFiltering>
<authentication>
<windowsAuthentication enabled="true" />
<anonymousAuthentication enabled="false" />
<basicAuthentication enabled="false" />
<digestAuthentication enabled="false" />
</authentication>
<access sslFlags="Ssl" />
</security>
<webdav>
<authoring enabled="true" requireSsl="true" />
<authoringRules>
<add users="*" path="*" access="Read, Write, Source" />
</authoringRules>
</webdav>
</system.webServer>
</location>
<location path="Default Web Site/TestWebDAV">
<system.webServer>
<security>
<authentication>
<digestAuthentication enabled="false" />
<basicAuthentication enabled="false" />
<windowsAuthentication enabled="true" useAppPoolCredentials="true" />
</authentication>
<access sslFlags="Ssl" />
</security>
</system.webServer>
</location>
</configuration>
============================================================
Thank you very much for any assistance. Let me know if you need more info.