thank you for the excellent control.--I have a problem with the download function.my virtual directory refers to network location ( on another server ) and I am authenticating the user when opening the page.the control displays the folders properly and the user can access only the folders he authorized to (so far so good) , user can do almost all the function ( rename,delete, move and copy) but the download.when trying to download the file the following error occursThe handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))if I give permission on the folder for everyone , the download works.so I think I am stuck here with permission issue !!??, the user 100% has the right permission to read the file , and if I put the full path to the file in the addressbar the browser downloads it with no issue.in the event viewer I am getting the followingEvent code: 3005Event message: An unhandled exception has occurred.Event time: 11/4/2014 12:31:32 PMEvent time (UTC): 11/4/2014 8:31:32 PMEvent ID: f0ecf106725f433db84813f76b24e26bEvent sequence: 42Event occurrence: 1Event detail code: 0Application information:Application domain: /LM/W3SVC/1/ROOT/Share-2-130596066846124288Trust level: FullApplication Virtual Path: /ShareApplication Path: C:\inetpub\wwwroot\Portal\Share\Machine name: SRV-DMZ1Process information:Process ID: 3180Process name: w3wp.exeAccount name: IIS APPPOOL\UAEACPortalException information:Exception type: COMExceptionException message: The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))Request information:Request URL: https://portal.uaeacademy.ae:443/share/default.aspxRequest path: /share/default.aspxUser host address: 172.30.0.4User: UAEAC\shamIs authenticated: TrueAuthentication Type: BasicThread account name: IIS APPPOOL\UAEACPortalThread information:Thread ID: 5Thread account name: IIS APPPOOL\UAEACPortalIs impersonating: FalseStack trace:can you help pleasethanks
You received this message because you are subscribed to the Google Groups "izwebfilemanager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to izwebfilemanag...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Response.ClearContent()
Response.AddHeader("Content-Disposition", "attachment; filename=" + File.Name)
Response.AddHeader("Content-Length", File.Length.ToString())
Response.TransmitFile(File.FullName)
Response.Flush()To unsubscribe from this group and stop receiving emails from it, send an email to izwebfilemanager+unsubscribe@googlegroups.com.
void RaisePostBackEvent(string eventArgument)
{
var args = eventArgument.Split(new[] { ':' });
FileManagerItemInfo fmi = ResolveFileManagerItemInfo(DecodeURIComponent(args[1]));
switch (args[0])
{
case "Download":
var e = new DownloadFileCancelEventArgs() { DownloadFile = fmi };
OFileDownload(e);
if (!e.Cancel)
{
string file = fmi.PhysicalPath;
if (File.Exists(file))
{
FileInfo File2Download = new FileInfo(file);
Page.Response.ClearContent();
Page.Response.AddHeader("Content-Disposition", "attachment; filename=" + File2Download.Name );
Page.Response.AddHeader("Content-Length", File2Download.Length.ToString());
Page.Response.TransmitFile(file);
}
Page.Response.Flush();
}
break;
case "ExecuteCommand":
OnExecuteCommand(fmi, args[2], args[3]);
break;
}
}To unsubscribe from this group and stop receiving emails from it, send an email to izwebfilemanag...@googlegroups.com.