本地调试一切正常,但上传到服务器就会报错:
System.UnauthorizedAccessException: 对路径“……”的访问被拒绝。 在 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, Boolean useLongPath, Boolean checkHost) 在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) 在 System.Xml.XmlDocument.Save(String filename) 在 AOWEN.Web.Controllers.ActivitiesController.AddMonthlyActivity(String[] kclist, String campname, DateTime effective, DateTime deadline, Int32 type, String kctype, String gift)
代码如下:
应该怎么解决昂?