Could not load file or assembly 'someProject&#

2019-01-14 22:01发布

I am stuck with one asp.net error. My application work fine on development and test environemnt. But on production it give me following error:

Could not load file or assembly 'someProject' or one of its dependencies. Access is denied.

7条回答
疯言疯语
2楼-- · 2019-01-14 22:23

Sounds like an incorrectly configured server.

First, verify that the assembly does indeed exist.

Second, verify that your worker process account has access to it.

查看更多
对你真心纯属浪费
3楼-- · 2019-01-14 22:26

Just delete the bin folder and then agian copy it. Now, it is working...

查看更多
时光不老,我们不散
4楼-- · 2019-01-14 22:30

Give full permissions to the running user or group (like MACHINE\users group or DOMAIN\domain users) in

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files

Use your target .net version number instead of v4.0.30319 if it's other than .net 4.0.

查看更多
干净又极端
5楼-- · 2019-01-14 22:33

Go to Sysinternals and download Process Monitor: http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

Then start it up, filter thread and registry actions away. Clear contents. Run your app and get the error, and then stop the collection in process monitor. Now search for an ACCESS DENIED status, and you'll be able to see the exact file that's causing troubles, as well as the user account trying to get access.

查看更多
萌系小妹纸
6楼-- · 2019-01-14 22:41

In my case by changing application pool identity from applicationpoolidentity to network service it works.

查看更多
Bombasti
7楼-- · 2019-01-14 22:43

Check that the server user has access to the directory where your assemblies are located.

查看更多
登录 后发表回答