自定义WebDAV服务器和Windows资源管理器

时间:2020-01-28 15:01:25

标签: c# xml webdav

我正试图让Windows资源管理器与我的webdav实例进行对话,我已经构建了我认为是有效的PROPFIND响应的内容,但是当我发出...时却在命令行中。

网络使用率x:https://example.com/Some/Root/Path/

...突然爆炸...

发生系统错误67。

找不到网络名称。

无论天气如何,SSL证书是否有效以及是否在正确的服务器部署上以及本地使用本地主机(使用VS调试过程),都会发生这种情况。

我正在使用.Net Core 2.2(以防万一),现在没有一个“需要”身份验证,但我打算在基本请求生命周期正常工作后再添加一个。

PROPFIND响应看起来像这样...

<?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:">
    <d:response>
        <d:href>https://localhost:44313/Core/App(1)/WebDav/data</d:href>
        <d:propstat>
            <d:prop>
                <d:id>e08c9a0a-4728-41f4-909b-08d71b3f7bc2</d:id>
                <d:name>Data</d:name>
                <d:type>Folder</d:type>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>
            </d:prop>
            <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
    </d:response>
    <d:response>
        <d:href>https://localhost:44313/Core/App(1)/WebDav/scripts</d:href>
        <d:propstat>
            <d:prop>
                <d:id>56b353ad-78ba-4ea6-5dc4-08d72181c00c</d:id>
                <d:name>Scripts</d:name>
                <d:type>Folder</d:type>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>
            </d:prop>
            <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
    </d:response>
    <d:response>
        <d:href>https://localhost:44313/Core/App(1)/WebDav/icons</d:href>
        <d:propstat>
            <d:prop>
                <d:id>1959b510-b27a-4636-2f54-08d7427b8307</d:id>
                <d:name>Icons</d:name>
                <d:type>Folder</d:type>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>
            </d:prop>
            <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
    </d:response>
    <d:response>
        <d:href>https://localhost:44313/Core/App(1)/WebDav/content</d:href>
        <d:propstat>
            <d:prop>
                <d:id>d8c9a4fc-fb5d-461d-d4ee-08d74bdb2d3d</d:id>
                <d:name>Content</d:name>
                <d:type>Folder</d:type>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>
            </d:prop>
            <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
    </d:response>
    <d:response>
        <d:href>https://localhost:44313/Core/App(1)/WebDav/documentation</d:href>
        <d:propstat>
            <d:prop>
                <d:id>9e383261-831f-4f75-a62e-08d7725c8272</d:id>
                <d:name>Documentation</d:name>
                <d:type>Folder</d:type>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>
            </d:prop>
            <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
    </d:response>
    <d:response>
        <d:href>https://localhost:44313/Core/App(1)/WebDav/test</d:href>
        <d:propstat>
            <d:prop>
                <d:id>771b935d-7ad8-4262-ea25-08d79901323d</d:id>
                <d:name>TEST</d:name>
                <d:type>Folder</d:type>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>
            </d:prop>
            <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
    </d:response>
    <d:response>
        <d:href>https://localhost:44313/Core/App(1)/WebDav/testingfiles2001020</d:href>
        <d:propstat>
            <d:prop>
                <d:id>475f4d08-86d4-46f6-692f-08d79d955806</d:id>
                <d:name>TestingFiles2001020</d:name>
                <d:type>Folder</d:type>
                <d:resourcetype>
                    <d:collection />
                </d:resourcetype>
            </d:prop>
            <d:status>HTTP/1.1 200 OK</d:status>
        </d:propstat>
    </d:response>
</d:multistatus>

0 个答案:

没有答案
相关问题