Reputation: 21
I have IIS 6.0, mvc 3 application running under asp .net 4.0, basic authentication, web.config has
<identity impersonate="true" />
<authentication mode="Windows" />
I need to use IPersistFile to access my file. The problem is that COM runs under NETWORK SERVICE account and I don't want to give permissions to the file for the NETWORK SERVICE. So, how can I impersonate the calling user for a COM object?
Upvotes: 1
Views: 307
Reputation: 11211
Answer as discovered by origional poster
Solved.
You need to call COM object in a separate STA thread.
http://support.microsoft.com/kb/325791/en-us?fr=1
Upvotes: 1