0

I am trying to use entityframework in WCF application. For the moment i managed to get this far :

WebSecurity.InitializeDatabaseConnection("ILottoEntities", "Users", "Id", "UserName", autoCreateTables: true);
SimpleMembershipProvider provider = (SimpleMembershipProvider)System.Web.Security.Membership.Provider;
string userName = "gmail@gmail.com";
string password = "gmail@gmail.com";

This code is working fine with no errors But when i am trying to use :

bool result = WebSecurity.Login(userName, password, persistCookie: true);

I am getting :

Object reference not set to an instance of an object.

I have no idea what is null.

Soner Gönül
  • 91,172
  • 101
  • 184
  • 324

0 Answers0