Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Error: VirtualPath is <null> after 4.62 migration. Help?

Vote:
 

Hi guys.

I'm migrating a 4.62b site to 5.1.422.256 (SP2). But it seems i have a problem with virtual path providers. if i remove the "/website root/upload" folder, no files are available from the website and when i open the fileexplorer in edit mode, i get a "VirtualPath is <null>" exception.

I've upgraded the website on a 2003 server with iis 6.0 but have then moved the website and database to my local XP mashine, running iis 5, so i could do the code migration/upgrade.

My website is located at c:\ER\websites\[websitename]\Site, so the vpp folder is NOT under the website folder. This is my web.config snip:

<virtualPath customFileSummary="~/FileSummary.config">
  <providers>
    <add showInFileManager="false" virtualName="upload" virtualPath="~/upload/" bypassAccessCheck="false" name="Siteupload" type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" physicalPath="C:\ER\Websites\[website name]\vpp\upload" />
</providers></virtualPath>

How do i make the VPP error go f' it self?

Thanks in advance,
/Martin

#42035
Aug 06, 2010 11:16
Vote:
 

You saw you have removed the folder physically, but you still have it in web.config. Did I understand you correctly?

#42054
Edited, Aug 06, 2010 14:11
Vote:
 

Hi Tobias

Well, i have moved the website and the VPP folder to my local mashine, after doing the upgrade on a 2003 server. I have then reconfigured my web.config locally to point to my VPP directory, as shown in the previous post.

So in short, the VPP upload directory is there on my physical drive, with alot of files in it.

I have removed the old 4.62b upload folder from website root/upload, as i understand that now the VPP folder will be used instead.

#42058
Aug 06, 2010 14:40
Vote:
 

Ah good!

You say you have moved the site to a IIS 5 installation, maybe that has something to do with it? In either case, look at this link and see if it corresponds with your web.config.

http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-5/EPiServer-CMS-SP2/Virtual-Path-Providers-in-EPiServer-CMS-5/#Different settings for IIS5 and IIS6

#42060
Aug 06, 2010 14:44
Vote:
 

Hi again, and thanks for quick reply.

I have this web.config section, as described in the link. I have tried to remove it on my IIS 5.1 setup, as it is only critical for IIS 6, but with no change in the error. 

The issue remains.

#42062
Aug 06, 2010 14:51
Vote:
 

Could you post the whole error message?

#42063
Aug 06, 2010 15:23
Vote:
 

Some more info on the error behavior: On the original installation on the 2003 server with IIS 6, i discovered that i got a standard episerver message saying "Page could not be found" when i opended up the file manager. I tried to set customErrors mode to Off to get a clear view of the real issue, but i still got the "Page could not be found" standard episerver error page. Thinking it might be a url-rewriting issue, i changed the urlRewrite provider from EPiServerFriendlyUrlRewriteProvider to EPiServerIdentityUrlRewriteProvider. Now, i get the same "VirtualPath is <null>"- error on this installation as well. I tried chaning back to the EPiServerFriendlyUrlRewriteProvider but i still get the same error.

EPiServerFriendlyUrlRewriteProvider works fine on my IIS 6 installation, but does not work on my IIS 5.1 installation. there, the pages never gets shown.. it's like there's an infinite loop happening. But, this is a seperate issue, I just thought i'd mention it.

#42064
Aug 06, 2010 15:29
Vote:
 

The whole error msg:

Server Error in '/' Application.

--------------------------------------------------------------------------------

VirtualPath is <null>

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: VirtualPath is <null>

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: VirtualPath is <null>]

EPiServer.UI.Hosting.HostingUserControlBase.GetIdFromVirtualPath(String virtualPath) +246

EPiServer.UI.Hosting.CreatePageDirectory.OnLoad(EventArgs e) +105

System.Web.UI.Control.LoadRecursive() +50

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Control.LoadRecursive() +141

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

--------------------------------------------------------------------------------

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

#42065
Aug 06, 2010 15:31
Vote:
 

Try the NullRewriter, then it won't bother rewriting the url's and show them in their original form. Also, check in web.config file and the site node. There you have a setting for showing EPiServer error messages or not (globalErrorHandling).

#42066
Edited, Aug 06, 2010 15:33
Vote:
 

I think I need the whole web.config. So if you could censor the sensitive bits and put it on pastebin or some other code sharing site, I can take a look at it.

#42068
Aug 06, 2010 15:46
Vote:
 
#42069
Aug 06, 2010 15:56
Vote:
 

I found something strange, I guess it's some kind of censoring you've made?

<providers>
<add showInFileManager="false" virtualName="upload" virtualPath="~/upload/" bypassAccessCheck="false" name="Siteupload"
type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" physicalPath="C:\ER\Websites\www.nhcglobal.com (4)\vpp\upload" />
</providers>
</virtualPath>

#42070
Aug 06, 2010 16:17
Vote:
 

Also, your site settings says your VPP page folder is Siteupload, but if you look at your VirtualPath node, you don't see any mention of Siteupload. Try changing that to "Siteupload", or change the pageFolderVirtualPathProvider to "upload".

#42072
Aug 06, 2010 16:20
Vote:
 

Hi again and thanks for the quick replys.

1) the www.nhcglobal.com (4) is just the name of the folder. It's my 4th migration attempt :)

2) Siteupload is the name of the provider. virtualName="upload" is the virtual folder name, aka the name of the folder when viewed in the file manager i think. Anyways, if i change the Siteupload name, i get an error. If i change virtualName to something else, i still get the "VirtualPath is <null>]" error.

Issue remains.

#42073
Aug 06, 2010 16:34
Vote:
 

Yeah, sorry. I saw now that you indeed have a virtualPath named Siteupload. But don't you think spaces in the physical path may cause a problem?

#42074
Aug 06, 2010 16:45
Vote:
 

No problemmo m8.

I can't see that spaces should give a problem, as it's a valid path. But anyhow, i've tried to move the VPP folder to c:\VPP\upload but still have same error.

Do you think that this could be a data-related issue? aka a migration issue? - i've decompiled your API to try and find out what's going on, but it's a maze. I can't seem to find out where the VirtualPathFileManager get's polulated with data. It seems like that the VirtualPathFileManager.CurrentDirectory is null or empty string.

I think i'll try to verrify that i don't have the problem on a clean installation of 5.1. That way, i'll know for sure it is or isn't a data/database related issue.

Well, anyways, thanks for the help so far. And Good weekend :)

#42079
Aug 06, 2010 17:11
Vote:
 

I have resolved the issue.

By adding additional two VPP providers like the following, the filemanager loads correctly.

<add showInFileManager="true" virtualName="Upload" virtualPath="~/Global/" bypassAccessCheck="false" indexingServiceCatalog="Web" physicalPath="C:\ER\Websites\www.nhcglobal.com (4)\vpp\Globals" name="SiteGlobalFiles" type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" />

<add showInFileManager="true" virtualName="Documents" virtualPath="~/Documents/" bypassAccessCheck="false" maxVersions="5" physicalPath="C:\ER\Websites\www.nhcglobal.com (4)\vpp\Documents" name="SiteDocuments" type="EPiServer.Web.Hosting.VirtualPathVersioningProvider,EPiServer" />

#42102
Aug 09, 2010 10:22
Vote:
 

I found the solution. I added two more providers, just like in the example installation of episerver. This solved the exception thrown in the file manager. However, i don't see any of the supposebly migrated files in the upload folder. But that's another issue, for a seperate thread.

#42103
Aug 09, 2010 10:38
Vote:
 

Congratulations on solving it! Well halfway at least ;).

I was looking through the tech notes for migrating and found that you should separate the page folders from the upload folder before migrating. Maybe that's the step you missed?

Well I hope you are able to solve it. Or else you can always contact support or make a new thread :)

#42105
Aug 09, 2010 10:51
Vote:
 

I got a recently installed site where I get this error. If I "sit" on the server locally everything works fine but if I try to use the filemanger when surfing from another machine everything else works.

I have tried everything but I can't find the problem. But htis isn't a migrated site it's a CMS 5 R2 site.

#45509
Edited, Nov 09, 2010 17:10
Vote:
 

Martin, did you ever solve this issue?

#56333
Jan 18, 2012 12:43
Vote:
 

Nvm, didn't see the paging.. :)

#56334
Jan 18, 2012 12:44
Vote:
 

Per. did you find a solution to your problem?

#56847
Feb 13, 2012 13:49
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.