These forums are read-only and considered to be an archive. Please use the new Community for future interaction and posts.

Error: System.ArgumentException: The relative virtual path '.' not allowed.

I have download FileVistaControl.
I have create one new project.
I have read and execute all the istruction (readme.txt).
I have create a new form with this load form istruction.


            Dim FV As New FileVistaControl
            FV.LoadControl("~\FileVistaControl\filevista.ascx")

            FV.Style = "width: 800px; height: 600px"
            FV.LicenseKey = "k0r64Bq87NBWuEcj1wWW9QxDXQa2A+lf2R+KGZM="

            Dim rootFolder As FileVistaRootFolder

            rootFolder = New FileVistaRootFolder("Test Root Folder", "/")
            rootFolder.Permissions = FileVistaPermissions.Full
            FV.RootFolders.Add(rootFolder)

            rootFolder = New FileVistaRootFolder("Test Root Folder 2", "/")
            rootFolder.Permissions = FileVistaPermissions.Traverse & FileVistaPermissions.List & FileVistaPermissions.Download

            rootFolder.Quota = "2 MB"
            FV.RootFolders.Add(rootFolder)

            Dim rootFolders(0) As FileVistaRootFolder
            rootFolders(0) = New FileVistaRootFolder("Test Root Folder", "/")
            FileVistaControl.SessionRootFolders = rootFolders

            PlaceHolder1.Controls.Add(FV)

            AddHandler FileVistaControl.Uploaded, AddressOf FileVistaControl_Uploaded

I have no one error and the procedure run well but when i visualize the page I have this error:

System.ArgumentException: The relative virtual path '.' not allowed.

[ArgumentException: Il percorso virtuale relativo '.' non è consentito.]
   System.Web.VirtualPath.FailIfRelativePath() +8830668
   System.Web.Hosting.HostingEnvironment.MapPathActual(VirtualPath virtualPath, Boolean permitNull) +49
   System.Web.Hosting.HostingEnvironment.MapPathInternal(VirtualPath virtualPath) +42
   System.Web.VirtualPath.MapPathInternal() +4
   System.Web.HttpRequest.MapPath(VirtualPath virtualPath, VirtualPath baseVirtualDir, Boolean allowCrossAppMapping) +107
   System.Web.UI.UserControl.MapPath(String virtualPath) +62
   GleamTech.Web.Controls.FileVistaControl.b() +36
   GleamTech.Web.Controls.FileVistaControl.Page_Load(Object sender, EventArgs e) +219
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


di Microsoft .NET Framework:2.0.50727.3074; Versione di ASP.NET:2.0.50727.3074 



Nicola Moscardo 4/25/2009 10:10 AM
Cem Alacayir 4/28/2009 3:47 PM