I bumped into this problem when I wanted to add Web Part Zone support for my rpgWiki application (a wiki we use for roleplaying). I was greeted with a nasty exception:
HttpException (0x80004005): The file '/WikiWeb/articles/Helsinki_by_Night.aspx' does not exist.
Here the /WikiWeb is the path to the application on my development server, and the rest of the path is a non existing virtual file. Without the Web Part Zone code, this works just fine, ASP.NET Routing will find the actual physical file and execute that.
Looking at what went wrong I found the following code fragment was being executed. The actual exception happened when invoking ToggleScope():
if ( WebPartManager1.Personalization.Scope == PersonalizationScope.User ) { WebPartManager1.Personalization.ToggleScope (); }
In my rpgWiki project I did not want to provide per user customization. So whenever I saw the User scope, I wanted to change that to Shared scope. So why the hell do I get this exception all of a sudden?
Well, it turns out (after looking at the call stack and digging around with Reflector) that ToggleScope will change the setting, and after that execute a Server.Transfer() to the same page. In "classic" Web Forms without routing this is not a problem, but it turns out the ASP.NET team did not upgrade Server.Transfer() for routing. So it tries to execute the same address where the original request came to, and because it is a virtual path only understood by routing, it will not work.
I was able to speak with Scott Galloway from the ASP.NET team at a conference. He also confirmed this to be a bug, but couldn't say if it would be corrected.
Of course this means that not only Web Part Zones will not work, but rather Server.Transfer() will never work when you want to transfer to a page that does not exist and would need routing.
@ Saturday, 12 February 2011 18:20
I am also stuck in the same problem. Please check the problem steps here: http://forums.asp.net/t/1642934.aspx
Kindly suggest me a solution, if any.