Question

i'm trying to create a small intranet. For this I have a webserver on my local pc. The root of this website will be a dashboard and it will contain login/register functionality (default ASP.NET Membership).

http://localhost
http://localhost/Account

The rest of the intranet will consist of sub-applications like:

http://localhost/ApplicationName

The root website, and most of the sub-applications will be requiring authentication of the user for which I will be utilizing the default ASP.NET Membership provider.

All the projects (root and sub) are seperate projects in Visual Studio, and every project has it's own WebSetup project for deployment.

1.) How can I use ASP.NET Membership in sub-applications?

Furthermore, most of the applications (root and sub) will be using a 3rd party library (data framework).

2.) How can I reference the library in the root-project and 'use' the referenced library in sub-applications?

Thank you for any suggestions!

Was it helpful?

Solution

Create your common code in class library projects that can be used from multiple web projects. As for the membership provider, I think you'll need to store the membership data in an external SQL instance (which could be on the same server) and then simply use the same connection strings to access it in each project.

OTHER TIPS

Membership is designed to work with one or many applications. You can have an instance of a database (separate from any databases for any of your applications) that can house each of your applications Membership data. If you wish to have all of your applications use the same Membership data, provide an identical applicationName (and connectionString) when defining Membership in each application's web.config.

As for the second part of your question, the answer tvanfosson posted (along with the comments) should lead you on the right path.

Edit (@ ropstah Comment): Ah, I did not account for that. In that case, you'd want to implement Single Sign-on (SSO). Masoud Tabatabaei posted an article at ASPAlliance.com that walks through the process. Also, the answer provided by Keith Rull to this Stack Overflow question may help as well.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top