4

I am trying to impersonate (whilst using COM) to access an external system, and I've had the error thrown.

Never seen anything like it before, and nothing on Google for it.

Could it be a trust issue? This code works fine when using a unit test to run the chechk the code works

Stuart.Sklinar
  • 3,683
  • 4
  • 35
  • 89
  • That doesn't really help, I've seen that linked, but I've not installed/removed anything, and it works via unit test. – Stuart.Sklinar Jan 22 '14 at 15:47
  • Any luck with this? I'm having the same problem. – Yehuda Shapira Apr 11 '16 at 12:04
  • I'm having a very similar issue. It started out as "Access is Denied" error coming up when we had impersonation switched on. So we gave the users access to the Tempory ASP.Net folder:(C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files) and we now have the same error as here. Our problem is also the error does not happen all the time but once it happens it happens for anyone using the web application. It can be happy for half a day or 5 minutes before it falls over. We believe it has something to do with IIS 10 as previous versions did not exhibit anything like this – TomShantisoft Oct 04 '17 at 09:15

1 Answers1

3

I was loading an old VS2013 project in VS2017 and kept getting this error.

It appears when upgraded the solution platform was set to "Any CPU" and was therefore trying to compile/run in x64 mode (on my 64bit machine). Putting the solution platform back on x86 caused it to execute as expected.

Evan Weissburg
  • 1,564
  • 2
  • 17
  • 38
Tribmos
  • 49
  • 5
  • I have the same problem as the original post, but I intentionally trying to upgrade my complex app (.netforms + com/native) to 64bit. Theoretically all owned and 3rd party native/managed libs/controls are 64bit (or anycpu) now, but I receive this error. So this has to be related some 32/64 mixing. – Zoli Jun 08 '22 at 14:38
  • Found the reason: the app manifest file had a strong dependency to a 32bit dll. `` ..... `processorArchitecture="X86"` ..... `` – Zoli Jun 08 '22 at 15:14