Membership.ValidateUser always returns false after upgrade to VS 2010 / .NET 4.0

前端 未结 3 810
盖世英雄少女心
盖世英雄少女心 2020-12-30 15:04

Not sure whether this pertains to VS 2010 or to the upgraded framework, but... we are using the Oracle membership provider to authenticate users. Prior to the upgrade everyt

3条回答
  •  时光说笑
    2020-12-30 15:16

    You may be experiencing machineKey disparity.

    In web.config - the implicit machineKey section uses autogenerated encryption and validation keys that are again keyed against the app Id (AutoGenerate,IsolateApps).

    Are you testing with a different application instance or on another machine?

    Is the Oracle membership provider 2.0 or 4.0?

    And this is just a stab in the dark, maybe this will lead you to a solution.

    From .NET Framework 4 Migration Issues

    Membership types

    Some types (for example, System.Web.Security.MembershipProvider) that are used in ASP.NET membership have been moved from System.Web.dll to the System.Web.ApplicationServices.dll assembly. The types were moved in order to resolve architectural layering dependencies between types in the client and in extended .NET Framework SKUs.

    Class libraries that have been upgraded from earlier versions of ASP.NET and that use membership types that have been moved might fail to compile when used in an ASP.NET 4 project. If so, add a reference in the class library project to System.Web.ApplicationServices.dll

提交回复
热议问题