.Net 4.0 System.Web.Security.MembershipProvider ambiguous reference?

浪尽此生 提交于 2019-11-29 05:45:54

Problem solved. System.Web.Security namespace is a member of System.Web, however, it is also a member of System.Web.ApplicationServices. The project had a reference to System.Web, and a using statement referenced System.Web.Security, so IntelliSense did not throw a flag when specifying the class. However, the project was missing a reference to to System.Web.ApplicationServices. The project had a reference to the class, but it could not load the class because the containing assembly (...ApplicationServices) was missing.

I just dealt with this same issue when creating a custom membership provider for my web application. You need to remove the reference to System.Web and add the following references. - System.Web.ApplicationServices - System.Configuration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!