未能加载文件或用户登录时集'Microsoft.CSharp“这是不是管理员组的成员 [英] Could not load file or assembly 'Microsoft.CSharp' when logged in with user which is not a member of administrator group
问题描述
我创建了一个网站,当我登录使用的管理员但是当我登录使用任何其它用户,下面出现错误。
I have created a website which compiles successfully when I log-in using administrator but when I log-in using any other user, following error occurs.
无法加载文件或程序集Microsoft.CSharp,版本= 4.0.0.0,
区域性=中性公钥= b03f5f7f11d50a3a'或其
的一个依赖。要么未提供所需的模拟级别,
或提供的模拟级别无效。 (异常来自
HRESULT:0x80070542)
Could not load file or assembly 'Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT: 0x80070542)
在管理员用户是成员
- Acronis远程用户
- 管理员
- 远程桌面用户
而其他用户的
- Acronis远程用户
- 管理员*
- IIS_IUSRS
- 远程桌面用户
- SQLServerMSSQLUser $ VM-TMP-ABCD-1 $ MSSQLSERER
- 用户
- Acronis Remote users
- Administrators *
- IIS_IUSRS
- Remote Desktop Users
- SQLServerMSSQLUser$vm-tmp-abcd-1$MSSQLSERER
- Users
我现在用的结果
的Windows Server 2008 R2企业版64位操作系统。
I am using
Windows Server 2008 R2 Enterprise with 64-bit Operating System
- 最初其他用户不属于为管理员组。我加在管理员的角色,但我仍得到同样的错误
- Initially the other user didn't belong to administrators group. I added the administrators role to it but still I am getting the same error.
请注意:这编译该网站成功的,如果我选择VS2010为以管理员身份运行
NOTE: It compiles the website successfully if I choose VS2010 to run as administrator.
推荐答案
这一次解决了我的问题。
This one solved my problem.
- 右键单击Visual Studio中(无论使用何种版本)
- 属性
- 选择兼容性标签
- 填充它说运行此程序作为管理员
- 从文件位置打开项目的复选框
- 运行应用程序
- Right click on Visual studio (whichever version you use)
- Properties
- Select compatibility tab
- Fill the checkbox which says "Run this program as administrator"
- Open the project from the file location
- Run the application
这篇关于未能加载文件或用户登录时集'Microsoft.CSharp“这是不是管理员组的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!