开发者

ASPx Dev Express File Upload Control to Mapped Network Drive

Here is my function, and as you can see I have the upload going into the web sites directory/files ... I am hosting the site on IIS with another site & need the files to upload to the mapped network drive DOCSD9F1/TECHDOCS/

No idea what the folder path should be...

any help would be greatly appreciated

开发者_运维百科protected void ASPxUploadControl1_FileUploadComplete(object sender, DevExpress.Web.ASPxUploadControl.FileUploadCompleteEventArgs e)
    {
        if (e.IsValid)
        {
            string uploadFolder = Server.MapPath("~/files/");
            //string uploadFolder = "//DOCSD9F1/TECHDOCS/";
            string fileName = e.UploadedFile.FileName;

            e.UploadedFile.SaveAs(uploadFolder + fileName);
            e.CallbackData = fileName;
        }
    }


Use backslashes instead of slashes for the network path. If it doesn't work, make sure the ASP.Net account has adequate permissions to write to the share.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜