Upgrading SP1 to SP2 makes my custom VPP fail

Vote:
 

I upgraded an SP1 site to SP2 today and now all pages get an ASP.NET error.

I enabled full logging and this is the uncaught exception:

 2009-09-03 06:38:11,924 DEBUG [9] EPiServer.Web.UrlRewriteModuleBase.BeginRequestEventHandler - Starting request with Url http://localhost/
2009-09-03 06:38:11,934 DEBUG [9] EPiServer.Web.FriendlyUrlRewriteProvider.ConvertToInternalInternal - Url = http://localhost/
2009-09-03 06:38:11,944 ERROR [9] EPiServer.Global.Global_Error - 1.2.5 Unhandled exception in ASP.NET
System.ArgumentNullException: Value cannot be null.
Parameter name: value
at System.String.StartsWith(String value, StringComparison comparisonType)
at EPiServer.Web.Hosting.VirtualPathUnifiedProvider.TryToAbsolute(String virtualPath, String& absolutePath)
at EPiServer.Web.Hosting.VirtualPathUnifiedProvider.IsVirtualPath(String virtualPath)
at EPiServer.Web.Hosting.VirtualPathHandler.IsVirtualPath(String virtualPath)
at EPiServer.Web.FriendlyUrlRewriteProvider.IsVppPath(UrlBuilder url, Boolean& isModified)
at EPiServer.Web.FriendlyUrlRewriteProvider.ConvertToInternalInternal(UrlBuilder url, Object& internalObject)
at EPiServer.Web.FriendlyUrlRewriteProvider.ConvertToInternal(UrlBuilder url, Object& internalObject)
at EPiServer.Web.UrlRewriteModule.HttpUrlRewriteToInternal(UrlBuilder url)
at EPiServer.Web.UrlRewriteModuleBase.BeginRequestEventHandler(Object sender, EventArgs e)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Since the error seems to be related to VPP, I removed my custom VPP from Web.config. That makes the site work again.

Weird part is though - the stacktrace doesn't include my code. I figure there's some null path parameter being passed somewhere, but can't figure out where.

The site worked flawlessly before the upgrade, now this?

 / Thomas

 

#32473
Sep 03, 2009 15:44
Vote:
 

Hi,

from what I can see the problem is caused by the property VirtualPathRoot that is null in your custom VPP.

Check the constructor of your VPP and make sure you set VirtualPathRoot:

VirtualPathRoot = VirtualPathUtilityEx.ToAbsolute(ConfigurationParameters["virtualPath"]);
if (String.IsNullOrEmpty(VirtualPathRoot))
{
   throw new EPiServerException("CustomVPP configuration missing or empty attribute 'virtualPath'");
}
#32495
Sep 04, 2009 10:28
Vote:
 

Glorious times :-)   That did the trick!  Thanks alot.

/ Thomas

 

#32512
Sep 04, 2009 16:00