السلام عليكم
حينما احاول رفع ملف او عمل File upload الى السيرفر اجد هذا الخطأ
اقتباسServer Error in '/WebApplication3' Application.
--------------------------------------------------------------------------------
The given path's format is not supported.
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.NotSupportedException: The given path's format is not supported.
Source Error:
Line 52: string strFileName=File1.PostedFile.FileName;
Line 53: System.IO.Path.GetFileName(strFileName);
Line 54: File1.PostedFile.SaveAs(Request.MapPath(Request.ApplicationPath )+"//"+strFileName);
Line 55: ListBox1.Items.Add(strFileName);
Line 56: ListBox1.SelectedIndex=0;
Source File: e:\test\webapplication3\webform2.aspx.cs Line: 54
Stack Trace:
[NotSupportedException: The given path's format is not supported.]
System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath) +230
System.Security.Util.StringExpressionSet.AddExpressions(String[] str, Boolean checkForDuplicates, Boolean needFullPath) +461
System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList) +168
System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath) +43
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +421
System.IO.FileStream..ctor(String path, FileMode mode) +52
System.Web.HttpPostedFile.SaveAs(String filename) +48
WebApplication3.WebForm2.btnUpload_Click(Object sender, EventArgs e) in e:\test\webapplication3\webform2.aspx.cs:54
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1277
لا اعلم سبب المشكله!!
وجزاكم الله خيرا