User (Old forums)MemberAugust 31, 2004 at 9:43 pmPost count: 23064
I’m trying to unzip a zip file on my hosting using the Xceed ZIP component,
but get the following error message :
The physical file represented by the item could not be created. Type: Xceed.FileSystem.DiskFile FullName
Is it a permission problem ?
If so , is there a workaround ?
Imported from legacy forums. Posted by alonhr (had 3300 views)User (Old forums)MemberAugust 31, 2004 at 11:35 pmPost count: 23064
You will have to provide us with your code, and the InnerException of this FileSystemException you’re getting. There are many possible reasons why a file could not be created.
Imported from legacy forums. Posted by Martin (had 153 views)User (Old forums)MemberSeptember 1, 2004 at 5:18 amPost count: 23064
This is the ASP.NET Code
Public Class WebForm1
#Region ” Web Form Designer Generated Code “
‘This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
‘CODEGEN: This method call is required by the Web Form Designer
‘Do not modify it using the code editor.
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
‘Put user code to initialize the page here
‘ License the component. For more information jump to the licensing topic.
Xceed.Zip.Licenser.LicenseKey = “SAMPLE-APPLICATION-KEY”
Dim zip As New ZipArchive(New DiskFile(Server.MapPath(“.”) & “\linkexchange_sp.zip”))
Dim folder As New DiskFolder(Server.MapPath(“.”))
zip.CopyFilesTo(folder, True, True)
Catch err As Exception
and the error :
The physical file represented by the item could not be created. Type: Xceed.FileSystem.DiskFile FullName: c:\inetpub\wwwroot\UnZip\linkexchange_sp.sql
Imported from legacy forums. Posted by alonhr (had 277 views)User (Old forums)MemberSeptember 1, 2004 at 8:35 amPost count: 23064
The ASPNET user probably doesn’t have write access to the root of this web app (“c:\inetpub\wwwroot\UnZip” in your case). I guess you are only testing stuff, but it’s generally not a good idea to grant that right anyway. You’ll probably want to unzip in a subfolder, granting write access to that special subfolder only.
Also, remember that a web app may be accessed more than once at the same time. While two or more processes may read the zip file at the same time, they can’t write to the same file at the same time. You’ll probably want to unzip your files in a unique filename or unique subfolder within the first subfolder.
Hope this helps.
Imported from legacy forums. Posted by Martin (had 4242 views)
- You must be logged in to reply to this topic.