I’m currently in the process of moving this blog from my old server (real piece of iron that was running me US$ 150 / month just to have hosted) to a new VPS from MyHosting (US$ 500 / year).
In trying to publish my new corporate website to (an ASP.NET MVC app) from Visual Studio 2010 to my server using WebDAV.
Sidenote: Microsoft has been trying to get rid of Front Page Server Extensions for a while… They want us to move to WebDAV for all the reasons we used FPSE, and my new server is running Server 2008 R2 with IIS 7.5 which won’t allow you to install FPSE anymore. With this cycle of product release MS has decided to force you to use WebDAV. Configuration of WebDAV is a nightmare, either they need to allow installation / activation / configuration of WebDAV to be as easy as the former FPSE install, or they are going to have to back down (again) and allow FPSE to be run in IIS 7.5.
So after 2 days of trying to figure out / activate / configure WebDAV it seemed that I finally got it working, so I go to publish my ASP.NET MVC 2.0 web site up to my new server using the Publish Feature in VS2010 for a solution and everything works, UNTIL we hit the “Views” folder, suddenly we get an error
405 - HTTP verb used to access this page is not allowed.
I fire up Expression 4, attach to the website using WebDAV and I can view and add and delete from any folder in the project (controllers, contents, etc) except the “View” folder. With an MVC project that is pretty much a non starter. So how did I fix it? The usual way when MS doesn’t provide good management tools or error diagnostics, I use a sledge hammer (yeah I know my server isn’t a Black Box, but I don’t have time or the will to start trying the 101 different diagnostic pathways to determine what is going on).
I don’t recommend this fix, and someday when I have more time I will go in and figure out the exact necessary and sufficient minimal fix, but for now the answer was:
- Open IIS
- Select the root website that you want to publish to
- Click on the Handler Mappings
- scroll down and find the WebDAV handler and click on it then in the Actions click on Edit
- Click on the Request Restrictions
- Then click on the Verbs tab, and you will see something like this…
In my case the verbs in the list were: PROPFIND,PROPPATCH,MKCOL,PUT,COPY,DELETE,MOVE,LOCK,UNLOCK
- Make a copy of those verbs and store them somewhere (see step 11), cause you will want to come back later and unsledge hammer this fix.
- Finally just click the “all verbs” radio option and click OK
- OK and Apply your way out, and you are good to go!
- publish away
- Now go back in and PUT the verbs BACK IN, otherwise WebDAV will decided it gets to handle all request before anyone else which must mucks with your site.
As I said, this is definitely a sledge hammer solution and I only recommend it as a work around. I’ll try to do the 101 diagnostic tests in the next couple of weeks to determine what extra verb I need to add to allow the “View” folder to be accessed / modified.
What so weird is that it only happens on the “Views” folder, I would have expected the same verbs to be used with any of the folders that are published. What makes the Views folder so unique that it has to use special verbs that the other folders don’t?
26 Aug 10 12:13
Bookmark this post with: