Could not load file or assembly or one of its dependencies. Access is denied. The issue is random, but after it happens once, it continues

后端 未结 20 1786
夕颜
夕颜 2020-12-02 09:32

I have found plenty of information out there about this error: \'ERROR: Could not load file or assembly \'*.dll\' or one of its dependencies. Access is denied.’ But i haven

20条回答
  •  旧时难觅i
    2020-12-02 10:06

    I believe I wasted like 1 day on researching it and this what I have come out with.

    You need to add the Impersonating user to the Debug folder of your Solution as the Framework will try to access the DLL from this location and place it in Temporary Asp.Net Folder.

    So basically follow these 2 steps

    1. Give permission to Temporary Asp.Net Folder under C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files and make sure the user you are adding here is the same you are using while Impersonating.

    2. Add the Impersonating user to the Debug folder of your Solution YourSolutionPath .. \bin\Debug

    This should work

提交回复
热议问题