Forms Authentication - Admin Pages Outside of VS?

S

Scott Townsend

Okay so I'm somwhat new to ASP.Net and Visual Studio. We've installed
WindoesSharepoint Services 3 on our server and have it configured to use
Forms Based Authentication. I've gone in VS and created the ASP.Net app and
then clicked the Website, ASP.Net Configuration Menu option and it brings up
the Screens to allow me to Add Users to the DB, create groups, and all that
fun stuff.

My Copy of Visual Studio is in a Virtual Machine and its a Pain to have to
load it up every time I want to Add or edit a user.


Can I just make a Virtual Directory to the
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ASP.NETWebAdminFiles folder
and run it from another Web instead of inside Visual Studio?

Where would I put:
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer" connectionString="<..snip..>" />
<remove name="AspNetSqlProvider" />
<add name="AspNetSqlProvider" connectionString="<..snip..>" />
</connectionStrings>

and the other studd in the web.config.

Thanks
 
D

Dominick Baier

Well - this kind of works - but is not supported.

a) have a look at the query strings they pass into the admin page - basically
the virtual and physical path of the app you want to configure
b) the provider settings are read from the app you want to configure
c) in addition - there is a check in the source to only allow connection
from localhost - you would have to remove that check.

as i said - it is not supported ;)
 
S

Scott Townsend

So how else are you supposed to be able to add and maintain users? I guess
you are supposed to create your own pages?

So I've linked in the pages. put in the URL of:
http://localhost:27268/asp.netwebad...t-WebAdmin\website1\&applicationUrl=/website1

I've published the web.config file from the VS App to the
D:\Inetpub\Webs\ASP.Net-WebAdmin\website1 directory

The thing I'mnot sure of is the Application URL. On the VS machine there
are 2 Webs running, one is the Webadmin files on port 1686 and the webapp on
1233. So how does the asp.netwebadmin files know that the Application web
is on a different port? Is it always on 1233?


So when I put in the URL I get the Following, so something isn't right in
the URL or the placement of the files.

An error was encountered. Please return to the previous page and try again.

The following message may help in diagnosing the problem:
System.ArgumentOutOfRangeException: Specified argument was out of the range
of valid values. Parameter name: site at
System.Web.Configuration.WebConfigurationHost.InitForConfiguration(String&
locationSubPath, String& configPath, String& locationConfigPath,
IInternalConfigRoot configRoot, Object[] hostInitConfigurationParams) at
System.Configuration.Configuration..ctor(String locationSubPath, Type
typeConfigHost, Object[] hostInitConfigurationParams) at
System.Configuration.Internal.InternalConfigConfigurationFactory.System.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Type
typeConfigHost, Object[] hostInitConfigurationParams) at
System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLevel
webLevel, ConfigurationFileMap fileMap, VirtualPath path, String site,
String locationSubPath, String server, String userName, String password,
IntPtr tokenHandle) at
System.Web.Configuration.WebConfigurationManager.OpenMappedWebConfiguration(WebConfigurationFileMap
fileMap, String path) at
System.Web.Administration.WebAdminPage.OpenWebConfiguration(String path,
String appPhysPath, Boolean getWebConfigForSubDir) in
c:\WINDOWS\microsoft.net\Framework64\v2.0.50727\ASP.NETWebAdminFiles\App_Code\WebAdminPage.cs:line
345 at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String
path, Boolean getWebConfigForSubDir) in
c:\WINDOWS\microsoft.net\Framework64\v2.0.50727\ASP.NETWebAdminFiles\App_Code\WebAdminPage.cs:line
325 at System.Web.Administration.WebAdminPage.OpenWebConfiguration(String
path) in
c:\WINDOWS\microsoft.net\Framework64\v2.0.50727\ASP.NETWebAdminFiles\App_Code\WebAdminPage.cs:line
320 at System.Web.Administration.WebAdminPage.VerifyAppValid() in
c:\WINDOWS\microsoft.net\Framework64\v2.0.50727\ASP.NETWebAdminFiles\App_Code\WebAdminPage.cs:line
446

Thanks,
 
D

Dominick Baier

I once tried it and it kinda worked But i can't remember the details. sorry.


-----
Dominick Baier (http://www.leastprivilege.com)

Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)
So how else are you supposed to be able to add and maintain users? I
guess you are supposed to create your own pages?

So I've linked in the pages. put in the URL of:
http://localhost:27268/asp.netwebadminfiles/default.aspx?applicationPh
ysicalPath=D:\Inetpub\Webs\ASP.Net-WebAdmin\website1\&applicationUrl=/
website1
I've published the web.config file from the VS App to the
D:\Inetpub\Webs\ASP.Net-WebAdmin\website1 directory

The thing I'mnot sure of is the Application URL. On the VS machine
there are 2 Webs running, one is the Webadmin files on port 1686 and
the webapp on 1233. So how does the asp.netwebadmin files know that
the Application web is on a different port? Is it always on 1233?

So when I put in the URL I get the Following, so something isn't right
in the URL or the placement of the files.

An error was encountered. Please return to the previous page and try
again.

The following message may help in diagnosing the problem:
System.ArgumentOutOfRangeException: Specified argument was out of the
range of valid values. Parameter name: site at
System.Web.Configuration.WebConfigurationHost.InitForConfiguration(Str
ing& locationSubPath, String& configPath, String& locationConfigPath,
IInternalConfigRoot configRoot, Object[] hostInitConfigurationParams)
at System.Configuration.Configuration..ctor(String locationSubPath,
Type typeConfigHost, Object[] hostInitConfigurationParams) at
System.Configuration.Internal.InternalConfigConfigurationFactory.Syste
m.Configuration.Internal.IInternalConfigConfigurationFactory.Create(Ty
pe typeConfigHost, Object[] hostInitConfigurationParams) at
System.Web.Configuration.WebConfigurationHost.OpenConfiguration(WebLev
el webLevel, ConfigurationFileMap fileMap, VirtualPath path, String
site, String locationSubPath, String server, String userName, String
password, IntPtr tokenHandle) at
System.Web.Configuration.WebConfigurationManager.OpenMappedWebConfigur
ation(WebConfigurationFileMap fileMap, String path) at
System.Web.Administration.WebAdminPage.OpenWebConfiguration(String
path, String appPhysPath, Boolean getWebConfigForSubDir) in
c:\WINDOWS\microsoft.net\Framework64\v2.0.50727\ASP.NETWebAdminFiles\A
pp_Code\WebAdminPage.cs:line 345 at
System.Web.Administration.WebAdminPage.OpenWebConfiguration(String
path, Boolean getWebConfigForSubDir) in
c:\WINDOWS\microsoft.net\Framework64\v2.0.50727\ASP.NETWebAdminFiles\A
pp_Code\WebAdminPage.cs:line 325 at
System.Web.Administration.WebAdminPage.OpenWebConfiguration(String
path) in
c:\WINDOWS\microsoft.net\Framework64\v2.0.50727\ASP.NETWebAdminFiles\A
pp_Code\WebAdminPage.cs:line 320 at
System.Web.Administration.WebAdminPage.VerifyAppValid() in
c:\WINDOWS\microsoft.net\Framework64\v2.0.50727\ASP.NETWebAdminFiles\A
pp_Code\WebAdminPage.cs:line 446

Thanks,

Well - this kind of works - but is not supported.

a) have a look at the query strings they pass into the admin page -
basically the virtual and physical path of the app you want to
configure
b) the provider settings are read from the app you want to configure
c) in addition - there is a check in the source to only allow
connection
from localhost - you would have to remove that check.
as i said - it is not supported ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top