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
You saw you have removed the folder physically, but you still have it in web.config. Did I understand you correctly?
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.
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
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.
Could you post the whole error message?
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.
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>
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.
[ArgumentException: VirtualPath is <null>]
EPiServer.UI.Hosting.HostingUserControlBase.GetIdFromVirtualPath(String virtualPath) +246
EPiServer.UI.Hosting.CreatePageDirectory.OnLoad(EventArgs e) +105
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
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).
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.
here you go:
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>
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".
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.
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?
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 :)
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" />
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.
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 :)
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.
Martin, did you ever solve this issue?
Nvm, didn't see the paging.. :)
Per. did you find a solution to your problem?