Permissions Error Using Docx.ReplaceText under IIS

Nov 5, 2010 at 4:16 PM

I'm using DocX to Load a stream and replace some text and save back to a stream.  The application is an ASP.NET running under IIS7.   When I run the application under VS2008 during development it works fine.    When I publish and run the function from a browser pointing to the IIS application the ReplaceText call is failing with the exception below.    I'm guessing it's a permissions issue.  I am an admin on the machine.    Anyone else experienced this?   Thanks  Eric

Message: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Source: mscorlib Stack Trace: at System.Security.Principal.WindowsIdentity.GetCurrent() at Novacode.Paragraph.CreateEdit(EditType t, DateTime edit_time, Object content) at Novacode.Paragraph.RemoveText(Int32 index, Int32 count, Boolean trackChanges) at Novacode.Paragraph.ReplaceText(String oldValue, String newValue, Boolean trackChanges, RegexOptions options, Formatting newFormatting, Formatting matchFormatting, MatchFormattingOptions fo) at Novacode.Container.ReplaceText(String oldValue, String newValue, Boolean includeHeaders, Boolean includeFooters, Boolean trackChanges, RegexOptions options, Formatting newFormatting, Formatting matchFormatting, MatchFormattingOptions fo) at Novacode.Container.ReplaceText(String oldValue, String newValue, Boolean includeHeaders, Boolean includeFooters, Boolean trackChanges) at PRISM.BusinessLogic.PRISMProduction.Produce(String DocumentID, String KeyValue) Target Site: System.Security.Principal.WindowsIdentity GetCurrent() Help Link: Data: