Incorrect credentials provided or insufficient permissions to access the requested item.
For a list of all members of this type, see UnauthorizedException Members.
System.Object
System.Exception
ITHit.WebDAV.Client.Exceptions.WebDavException
ITHit.WebDAV.Client.Exceptions.WebDavHttpException
ITHit.WebDAV.Client.Exceptions.UnauthorizedException
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Thrown when server responded with 401 (Unauthorized) http response. The request requires user authentication. The client MAY repeat the request with a suitable Authorization header field. If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information.
string license = "<?xml version='1.0' encoding='utf...
WebDavSession session = new WebDavSession(license);
session.Credentials = new NetworkCredential("User1", "pwd");
IFolder folder = null;
try
{
folder = session.OpenFolder(new Uri("http://server:8080/Products"));
}
catch(UnauthorizedException)
{
Console.WriteLine("Incorrect user name or password.");
}
catch(NotFoundException)
{
Console.WriteLine("Folder not found.");
}
if(folder!=null)
{
Console.WriteLine(folder.LastModified.ToString());
}
Namespace: ITHit.WebDAV.Client.Exceptions
Assembly: ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll)
UnauthorizedException Members | ITHit.WebDAV.Client.Exceptions Namespace