1

I'am creating a dynamic web form aplication. It stores the users data in another database (external server) I know that there is aspnet_regsql.exe but i have no idea how to implement it on external server. (i also can't loose data from existing database) How can i force default login system to check if my database have valid credentials in my Password and UserName columns ?

Thanks in advance.

1 Answer 1

2

Membership using aspnet_regsql.exe has been obsoleted.

There are new ones -

  1. Universal Providers
  2. Simple Membership
  3. ASP.NET Identity

Universal Providers will be the closest if you want to use the legacy Membership.

It stores the users data in another database (external server) I know that there is aspnet_regsql.exe but i have no idea how to implement it on external server.

Yes, you can store the Membership's tables in another database. If so, you will need to have separate connection string for the Membership.

<membership defaultProvider="DefaultMembershipProvider">
  <providers>
  <clear/>
    <add name="DefaultMembershipProvider" connectionStringName="MyConnection" ... />
  </providers>
</membership>
<roleManager enabled="true" cacheRolesInCookie="false" 
  defaultProvider="DefaultRoleProvider">
  <providers>
  <clear/>
  <add name="DefaultRoleProvider" connectionStringName="MyConnection" ... />
  </providers>
</roleManager>
Sign up to request clarification or add additional context in comments.

3 Comments

Hi thanks for comprehensive answer. I afraid that i do not explain well goal that i want to achieve. Thing is that i have to authorize users which are authenticate by user login and password (that i store in external DB) I can achive that in any possible way. After a day of looking for answers and learning ASP.NET (i'm new in this technology) i figure out that maybe easier will be to override Login.Authenticate Event like here:[link] msdn.microsoft.com/en-us/library/…
What do you think ? does it make any sense ?
I suggest you to use Membership Provider. If you do not use Membership Provider and just use Login.Authenticate to authenticate a user, you will need to 1) create Authentication Ticket by yourself, 2) create IPricipal object by yourself on each request. It is a lot of works if you are new to FormAuthentication.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.