gpt4 book ai didi

c# - 使用 Membership.GetUser() 时发生错误

转载 作者:行者123 更新时间:2023-11-30 21:07:40 25 4
gpt4 key购买 nike

当我使用 Membership.GetUser() 方法并包含 using System.Web.Security; 命名空间时,错误显示

"The type 'System.Web.Security.MembershipUser' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. C:\Raj\Orchard\src\Orchard.Web\Modules\test\Controllers\VideoController.cs"

最佳答案

您需要在 Visual Studio 项目中对 System.Web.ApplicationServices 程序集执行“添加引用”。有关详细信息,请参阅以下链接:How to: Add or Remove References in Visual Studio

To add a reference in Visual C#

In Solution Explorer, right-click the project node and click Add Reference.

In the Add Reference dialog box, select the tab indicating the type of component you want to reference.

Select the components you want to reference, and then click OK.

关于c# - 使用 Membership.GetUser() 时发生错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10240834/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com