Question

I know the login control in .NET will automatically create database file in App Data folder. But I would like to use an external database instead and want to use the membership & role function provided by .NET as well. What is the way to achieve that?

  1. How to use the auto-created db but keep all other data in the same db?
  2. How to external db and also pick the data need to used by the login role control?
Était-ce utile?

La solution

You can configure both membership provider and role provider to use different database

http://msdn.microsoft.com/en-us/library/vstudio/6e9y4s5t(v=vs.100).aspx

But you need first to configure your own database to store providrs data. This can be done using aspnet_regsql.exe tool

http://msdn.microsoft.com/en-us/library/vstudio/ms229862(v=vs.100).aspx

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top