mardi 31 janvier 2017

WebDavClient (401) Unauthorized WebException

Im working on a solution where i can put data on a server via WebDav, but i keep getting this error:

Excepton

My Authentications on the WebDav server are the following:

Authentication

Im Using this simple Libary: WebDAV.dll 1.0.0 by virtualdreams (i cant post more links) that grants access to the standard Webdav Methods.

In the Authoring Rules i gave access to all content and all users in read, source and write. So would could be the problem?

This is the Method that creates the Exception

    private static void Put()
    {
        Uri uri = new Uri("http://localhost/");

        WebDAVClientCredential cred = new WebDAVClientCredential("", "");
        WebDAVClient client = new WebDAVClient(cred);
        client.Credential.Domain = "administrator";

        client.Put(uri, ObjectToByteArray("test"));
        Console.WriteLine("Uploaded File");
        Console.Read();
    }

I can read and Download Data without a problem.




Aucun commentaire:

Enregistrer un commentaire