httphandler doesn't work when document name or guid included

Jun 26, 2014 at 6:12 PM
Edited Jun 26, 2014 at 6:14 PM
I entered the following in web.config
<add verb="*" path="MyDAV" type="PetkaWebDav.Handler.FileSystem.FileSystemWebDavHandler, PetkaWebDav.Handler.FileSystem"/>
I then set a few breakpoints before running the application so I could determine if the setting in web.config was working. I also, registered the route
I'm using MVC2.

The results are that my breakpoints are hit when I enter this into the browser:
But when I enter this the breakpoints aren't hit.
I must be missing something about the route that I registered and how the request is treated when the file name is included. Shouldn't the route I registered ignore all /MyDAV requests? Is there something else I missed?
Jun 26, 2014 at 6:40 PM
Edited Jun 26, 2014 at 6:42 PM
So it seems I missed the significance of {*pathInfo} as including this seems to allow info from in the url like this:
Now I see that the route I registered ignores the url that includes the id because it is part of pathInfo.

But this doesn't explain how the sample website works using the url:
When I do this the httphandler never gets the request because, it appears, the url doesn't match any of the routes including the route set to ignore the DAV requests. In other words it seems including the name causes MVC to keep looking, and eventually fails to find, a controller for MyDAV which doesn't exist resulting in a 404 error.
Jun 27, 2014 at 1:11 PM
Edited Jun 27, 2014 at 1:12 PM
Just in case this is useful to someone (like myself later) I couldn't get this url to work:
So I registered this route to get the docuement:
This lets me ask for the document like this:
I can also now pass in additional information like this.
In summary, the demo video appears to work fine so I suspect the problems I'm having relate to MVC2. According to the title of the project it appears it was created for MVC4. So if you're like me and are using MVC2 you might need to change the routing like I did. I also had to change the way the file system handler got the file name and mime type as I changed the location of the file name in the url.
Jun 27, 2014 at 2:20 PM
This also works if you want to continue using wordstorage in the url:
The url is then: