如何添加用户在IIS管理器为ASP.NET 4.0应用程序? [英] How to add users in IIS Manager for an ASP.NET 4.0 application?

查看:437
本文介绍了如何添加用户在IIS管理器为ASP.NET 4.0应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了IIS 7.5中的ASP.NET 4.0 Web表单应用程序。如果我设置的应用程序池为默认应用(适用的.NET Framework 2.0)我得到的供应商,.NET的角色和.NET的用户图标作为配置页上显示在IIS管理器,我的应用程序可以在IIS中管理用户和角色。 (我使用Forms身份验证。)

I have installed an ASP.NET 4.0 Web forms application in IIS 7.5. If I set the application pool to DefaultAppPool (.NET Framework 2.0) I get the icons for Providers, .NET-Roles and .NET-Users displayed on the configuration page for the application in IIS Manager and I can manage users and roles within IIS. (I'm using Forms authentication.)

但是,如果我设置应用程序池为 ASP.NET V4.0 我得到一个问题:关于在IIS管理器用户或角色图标双击抛出一个错误告诉我,我不能用为受信任自提供商这些特征不能确定。如果我设置的 administration.config trustedProviders 部分的 allowUntrustedProviders =真正的和双再次图标点击我的错误大会的 System.Web程序,版本4.0.0.0,文化=中性公钥= b03f5f7f11d50a3a 找不到。如果我重新启动IIS管理器的图标完全消失。

But if I set the application pool to ASP.NET v4.0 I get a problem: Double clicking on the icons for Users or Roles in IIS Manager throws an error telling me that I cannot use these features since the providers could not be determined as trusted. If I set in administration.config in the trustedProviders section allowUntrustedProviders="true" and double click again on one of the icons I get the error that the assembly System.Web, Version 4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a could not be found. If I restart IIS Manager the icons disappear completely.

的.NET Framework 4.0是绝对安装。因此,这是所有相当混乱。我知道,.NET 4中使用另一个GAC比旧的.NET 2-3。难道是可能的IIS管理器无法找到新的GAC用于.NET 4?我必须也许一些新的4.0组件添加到 administration.config ?有另一种方式来添加用户和角色,而不是IIS?

.NET Framework 4.0 is definitely installed. So this is all quite confusing. I know that .NET 4 uses another GAC than the old one for .NET 2-3. Could it be possible that IIS Manager is not able to find the new GAC for .NET 4? Do I have to add perhaps some of the new 4.0 assemblies to administration.config? Is there another way to add users and roles instead of IIS?

感谢您的帮助提前!

推荐答案

不幸的是,目前这些功能没有,如果你的应用程序池使用.NET 4.0,因为这将需要IIS管理器,以加载.NET 4.0框架,以支持调用正确的供应商(这就是为什么.NET用户/会员,.NET角色,等等),它因为IIS管理器是一个.NET 2.0的应用程序是不可能的。

Unfortunately, currently those features are not supported if your Application Pool is using .NET 4.0 since that would require IIS Manager to load the .NET 4.0 framework in order to call the right providers (and that is why .NET Users/Membership, .NET Roles, etc), and it is not possible since IIS Manager is a .NET 2.0 application.

因此​​,对于现在还没有很好的办法解决,暂时不是改变你的应用程序池为2.0,加入他们,然后切换回4.0等。当然,你不应该这样做,除非它只是一个开发机器。

So for now there is no good workaround, other than changing your Application Pool temporarily to 2.0 and adding them and then switching back to 4.0. But of course you should not do this unless its just a development machine.

另外,你可以使用CreateUserWizard控件创建一个页面,并使用内置的从ASP.NET Login控件应该是一个行(标记),以获得类似的功能。

Otherwise you could build a page using the CreateUserWizard control and use the built-in Login controls from ASP.NET which should be a one line (of markup) to get similar functionality.

这篇关于如何添加用户在IIS管理器为ASP.NET 4.0应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆