I am attempting to do Word automation in an ASP.NET project. I imported
the Word type library to a .NET assembly using tlbimp.exe, and am
referencing it in my project. I keep getting the following error:
System.UnauthorizedAccessException: Access is denied.
The ASP.NET process is not authorized to access the requested resource.
For security reasons the default ASP.NET process identity
is '{machinename}\ASPNET', which has limited privileges. Consider
granting access rights to the resource to the ASP.NET process identity.
I have reconfigured the relevant assembly with rights to the ASPNET
user. I tweaked the virtual folder in IIS. I even reimported the TLB
with the /unsafe switch to (supposedly) disable security on the
interface. I have read the docs front to back, and my books as well.
The imported assembly works fine in a Windows Forms environment.
Security is preventing it from working in ASP.NET. Any ideas on what to
do?