MethodNotAllowedException Class

IT Hit WebDAV for .NET

The method is not allowed.

For a list of all members of this type, see MethodNotAllowedException Members.

System.Object
   System.Exception
      ITHit.WebDAV.Client.Exceptions.WebDavException
         ITHit.WebDAV.Client.Exceptions.WebDavHttpException
            ITHit.WebDAV.Client.Exceptions.MethodNotAllowedException

[Visual Basic]
Public Class MethodNotAllowedException
    Inherits WebDavHttpException
[C#]
public class MethodNotAllowedException : WebDavHttpException

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

Thrown when server responded with 405 (Method Not Allowed) http response. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.

Example

string license = "<?xml version='1.0' encoding='utf...
WebDavSession session = new WebDavSession(license);
session.Credentials = new NetworkCredential("User1", "pwd");

IFolder folder = session.OpenFolder(new Uri("http://server:8080/"));
IFolder newFolder = null;
try
{
    newFolder = folder.CreateFolder("My Folder");
}
catch(MethodNotAllowedException)
{
    Console.WriteLine("Folder already exists.");
}
if (newFolder!=null)
    Console.WriteLine(newFolder.CreationDate.ToString());
 

Requirements

Namespace: ITHit.WebDAV.Client.Exceptions

Assembly: ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll)

See Also

MethodNotAllowedException Members | ITHit.WebDAV.Client.Exceptions Namespace