Я создаю файл .XLS с помощью DLL (Библиотека Excel http://code.google.com/p/excellibrary/)
Я добавил эту DLL в качестве ссылки на мой проект.
Код для сохранения .XLS на диск запущен, но возникла проблема с разрешениями.
Я попытался установить полный доступ для IUSRS, Сетевой службы и всех, просто чтобы посмотреть, смогу ли я заставить его работать, и ни один из них, кажется, не имеет значения.
Вот где я пытаюсь записать файл:
c:/temp/test1.xls
Вот ошибка:
[SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]
System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) +0
System.Security.CodeAccessPermission.Demand() +54
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) +2103
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +138
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +89
System.IO.File.Open(String path, FileMode mode, FileAccess access, FileShare share) +58
ExcelLibrary.Office.CompoundDocumentFormat.CompoundDocument.Create(String file) +88
ExcelLibrary.Office.Excel.Workbook.Save(String file) +73
CHC_Reports.LitAnalysis.CreateSpreadSheet_Click(Object sender, EventArgs e) in C:\Users\brian\Desktop\Enterprise Manager\CHC_Reports\LitAnalysis.aspx.vb:19
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +115
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +140
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11041511
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +11041050
System.Web.UI.Page.ProcessRequest() +91
System.Web.UI.Page.ProcessRequest(HttpContext context) +240
ASP.litanalysis_aspx.ProcessRequest(HttpContext context) +52
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171
Есть идеи, что мне нужно сделать, чтобы диагностировать проблему с разрешениями и разрешить создание файла?
Спасибо.