Connecting Tech Pros Worldwide Forums | Help | Site Map

sharing asp.net membership database

Phil
Guest
 
Posts: n/a
#1: Nov 19 '05
Is it possible to share the ASP.Net database that maintains membership
information? I want to use a single database install with several
independent sites. I've seen where there is information about "applications"
being stored, but haven't found a way to specify between applications/sites.

Thanks,
Phil

Mr Newbie
Guest
 
Posts: n/a
#2: Nov 19 '05

re: sharing asp.net membership database


I think you can do this using the Application_AuthenticateRequest event in
the global ASAX to get to your security provider. I have not done this
myself, but I think this could be the way to do it.
--
Best Regards


The Inimitable Mr Newbie º¿º



"Phil" <Phil@discussions.microsoft.com> wrote in message
news:A9C1B6F7-1866-44F1-A251-98E03812DBE1@microsoft.com...[color=blue]
> Is it possible to share the ASP.Net database that maintains membership
> information? I want to use a single database install with several
> independent sites. I've seen where there is information about
> "applications"
> being stored, but haven't found a way to specify between
> applications/sites.
>
> Thanks,
> Phil[/color]


Juan T. Llibre
Guest
 
Posts: n/a
#3: Nov 19 '05

re: sharing asp.net membership database


Not if you use Access for your database.
Using Access would require different databases.

If you use SQL Server or SSE you shouldn't have a problem.
Just pointing to the database you want to use should be enough.





Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Phil" <Phil@discussions.microsoft.com> wrote in message
news:A9C1B6F7-1866-44F1-A251-98E03812DBE1@microsoft.com...[color=blue]
> Is it possible to share the ASP.Net database that maintains membership
> information? I want to use a single database install with several
> independent sites. I've seen where there is information about "applications"
> being stored, but haven't found a way to specify between applications/sites.
>
> Thanks,
> Phil[/color]


Phil
Guest
 
Posts: n/a
#4: Nov 19 '05

re: sharing asp.net membership database


Thanks for the replies.

I'm using SQL Server 2000 currently, and will likely move to 2005 when I
have time. To my understanding, simply pointing to mutiple sites to the same
database will mean they share both the database and the date. For instance
users from Site A will be able to long into Site B. I'm wanting to share the
database install among sites, but not the data. I want users from Site A to
be able to only access Site A, and Site B to only access Site B.

Thanks,
Phil

"Juan T. Llibre" wrote:
[color=blue]
> Not if you use Access for your database.
> Using Access would require different databases.
>
> If you use SQL Server or SSE you shouldn't have a problem.
> Just pointing to the database you want to use should be enough.
>
>
>
>
>
> Juan T. Llibre, ASP.NET MVP
> ASP.NET FAQ : http://asp.net.do/faq/
> Foros de ASP.NET en Español : http://asp.net.do/foros/
> ======================================
> "Phil" <Phil@discussions.microsoft.com> wrote in message
> news:A9C1B6F7-1866-44F1-A251-98E03812DBE1@microsoft.com...[color=green]
> > Is it possible to share the ASP.Net database that maintains membership
> > information? I want to use a single database install with several
> > independent sites. I've seen where there is information about "applications"
> > being stored, but haven't found a way to specify between applications/sites.
> >
> > Thanks,
> > Phil[/color]
>
>
>[/color]
Scott Allen
Guest
 
Posts: n/a
#5: Nov 19 '05

re: sharing asp.net membership database


On Mon, 7 Nov 2005 05:39:02 -0800, "Phil"
<Phil@discussions.microsoft.com> wrote:
[color=blue]
> I'm wanting to share the
>database install among sites, but not the data. I want users from Site A to
>be able to only access Site A, and Site B to only access Site B.
>[/color]

When you configure the <membership> section in web.config (which
you'll have to do to point to anything other than a SQL express
database in App_Data), then set ApplicationName for each of your
application's to a unique string.

ApplicationName is used to scope membership data so it will not be
shared.

--
Scott
http://www.OdeToCode.com/blogs/scott/
Phil
Guest
 
Posts: n/a
#6: Nov 19 '05

re: sharing asp.net membership database


Thanks, I'll give that a try.

"Scott Allen" wrote:
[color=blue]
> On Mon, 7 Nov 2005 05:39:02 -0800, "Phil"
> <Phil@discussions.microsoft.com> wrote:
>[color=green]
> > I'm wanting to share the
> >database install among sites, but not the data. I want users from Site A to
> >be able to only access Site A, and Site B to only access Site B.
> >[/color]
>
> When you configure the <membership> section in web.config (which
> you'll have to do to point to anything other than a SQL express
> database in App_Data), then set ApplicationName for each of your
> application's to a unique string.
>
> ApplicationName is used to scope membership data so it will not be
> shared.
>
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/
>[/color]
Mr Newbie
Guest
 
Posts: n/a
#7: Nov 19 '05

re: sharing asp.net membership database


I see you fixed your 'Fine' print.

--
Best Regards

The Inimitable Mr Newbie º¿º



"Scott Allen" <scott@nospam.odetocode.com> wrote in message
news:qkpum19mfmd7avukiij6b9gdltt7brv97e@4ax.com...[color=blue]
> On Mon, 7 Nov 2005 05:39:02 -0800, "Phil"
> <Phil@discussions.microsoft.com> wrote:
>[color=green]
>> I'm wanting to share the
>>database install among sites, but not the data. I want users from Site A
>>to
>>be able to only access Site A, and Site B to only access Site B.
>>[/color]
>
> When you configure the <membership> section in web.config (which
> you'll have to do to point to anything other than a SQL express
> database in App_Data), then set ApplicationName for each of your
> application's to a unique string.
>
> ApplicationName is used to scope membership data so it will not be
> shared.
>
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/[/color]


Scott Allen
Guest
 
Posts: n/a
#8: Nov 19 '05

re: sharing asp.net membership database


On Mon, 7 Nov 2005 14:53:26 -0000, "Mr Newbie" <here@now.com> wrote:
[color=blue]
>I see you fixed your 'Fine' print.[/color]

Yes - thanks for pointing that out. It's such a glaring error once I
saw it!

--
Scott
http://www.OdeToCode.com/blogs/scott/

Closed Thread