Solution to "Could not load file or assembly or one of its dependencies. Access is denied"

This is one of the most irritating build errors a developer might see, especially while setting up an existing .NET application on a fresh machine.

I have found one solution that works always. Go to "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files" ( Modify the framework version, root directory etc according to your environment. ) Now, right-click and open up the Security tabs for this folder. Grant "Full control" to the 'users' group. (Modify will also work, thought I didn't try it out) However, it this is a security problem for your environment to grant full control to all users in Users group, another Solution could be to put the concerned assemblies lo GAC which I avoided as it was not  logical to put the assemblies into GAC in my scenario.

IF the above solution doesn't help, you can try another way: adding your impersonate user to the IIS_WPG on the local machine should solve the problem. It grants your impersonate user the correct permissions on the server file system without having to modify the folder security and open up control to large numbers of users.

 

Hope this helps.

 

转载于:https://www.cnblogs.com/Xiaojiang/archive/2010/05/20/ASPNET.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值