views:

457

answers:

6

Hi,

Does anyone know if there's a way to manage users/roles in the asp.net membership database using a web-based interface you can access remotely?

I need one which doesn't require installation to the Default Website.

Thanks

+1  A: 

There is a great article here.
with samples of how to implement the aspnet membership database through webservices.
Download asp.net example from here
For the downloaded example using SQL express for local testing, I struggeled a little bit, but found a solution:
In web.confing:

<connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Data Source=name of the local machine\SQLEXPRESS;Initial Catalog=ASPNETDB;Integrated Security=True" providerName="System.Data.SqlClient"/>
  </connectionStrings>
Kb
+1  A: 

Here is a quick and dirty solution. Copy your ASP.NETWebAdminFiles to a directory on your server. Make it a virtual directory. Open up the App_Code/WebAdminPage.cs file and coment out lines around 488 - 495 the code will look like this:

// Changed by Jason so I can use this remotely!!!

        //if (!application.Context.Request.IsLocal) {
        //    SecurityException securityException = new SecurityException((string)HttpContext.GetGlobalResourceObject("GlobalResources", "WebAdmin_ConfigurationIsLocalOnly"));
        //    WebAdminPage.SetCurrentException(application.Context, securityException);
        //    application.Server.Transfer("~/error.aspx");
        //}

Then you can now use this tool remotely. Just user your browser to pull up the newly created virtual directory passing in the correct parameters. For example

http://myservername/WebAdminFiles/default.aspx?applicationPhysicalPath=C:\Websites\Application\&amp;applicationUrl=/ApplicationURL

The other thing I did was to enable windows authentication on this folder so that I have to have an admin account on the server before I can access this url. This is important because once you enable this tool anyone can browse and delete users if they pull up the url.

G Jason Smith
+1  A: 

By the way the ASP.NETAdmin file are located on your machine here:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles

enjoy.

G Jason Smith
+1  A: 

Well, the asp .net object for managing users and membership information is fairly straightforward, why not do it yourself?

Irwin
Seems that's what I'm going to have to do.
Shahin
A: 

I just modify the connection string in my local web.config on the development version of my site to point to the remote database and then from within Visual Studio went to:

Project | ASP.NET Configuration

This opened up the local configuration site but talking to the remote database, allowing me to manage users/roles etc from there.

Obviously this assumes that you have a database server to connect to rather than the file based setup in APP_DATA.

Zhaph - Ben Duguid
A: 

Try:

MyWSAT

From the website:

MyWSAT aka ASP.NET WSAT is a WebForms based website Starter Kit for the ASP.NET Membership Provider. It is a feature rich application that takes care of all the basics to save you time. Use it as a template to start your websites.

CraigTP