While configuring WebDAV with Apache for accessing SVN repository using web service, if there is a small misconfiguration related to “Location” directive you will see the following error:

svn: Server sent unexpected return value (405 Method Not Allowed) in response to PROPFIND request for '/svn'

Most probably you would have configured a trailing “/” character along with the location as shown below which requires correction.

<Location /svn/>
DAV svn
SVNPath /project/svn
</Location>

You should remove trailing “/” from the path “/svn/” given in the “Location” directive and the modified one looks like this.

<Location /svn>
DAV svn
SVNPath /project/svn
</Location>

If you haven’t made the above mistake and still see the same error, then perhaps the directory specified for SVNPath may not be really a SVN repository path. Otherwise you might have forgotten to initialize the fresh directory which is created for SVN repository. You can use the following commad to initialize SVN repository for the first time.

svnadmin create /project/svn

The above command takes “/project/svn” as an example, you should replace it with whatever directory you specified for SVNPath in Apache configuration.