FileUpload控件上传文件出错
测试的时候时可以上传的,但是当我发布到局域网时,却发生报错,具体如下:
UnauthorizedAccessException: 对路径“c:\inetpub\wwwroot\sh\Data\Finance\产品手册认证相关软件.xls”的访问被拒绝。 在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) 在 System.IO.FileStream..ctor(String path, FileMode mode) 在 System.Web.HttpPostedFile.SaveAs(String filename) 在 Finance_and_Stock._Default.Button3_Click(Object sender, EventArgs e) 位置 C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\Finance_and_Stock\Finance_and_Stock\Finance_and_Stock\Finance.aspx.cs:行号 110
------------------------------------------------------
通过F5调试的时候,是没有问题的,但是用局域网访问的时候就不能上传,郁闷啊,这是怎么回事?