How to Manager the ASP.NET Web Site Administration Tool

K

Kirk

Hello,

I am a somewhat experienced VS 2005 user who is trying to us the
ASP.NET Web Site Administration Tool for the first time. I have
experimented with it on my local IIS and it seems to be an excellent
tool for security administration. However, I have some long term
questions.

Where does the W.S.A.T. store its information? In my local SQL Server
2000, I can see a database called "aspnetdb" - however none of the
tables contain any data (despite the fact that I have created a couple
of users & roles). Is it storing them in the local instance of SQL
Server 2005 Express that was installed with VS 2005? If so, I suppose
I need to install that "SQL Server 2005 Management Studio Express
Edition", correct?

This leads me to my next question. While I don't really "care" right
now where the data is stored, I WILL care when I move my completed
application to the real SQL Server 2000 that my company uses. How
would I make the switch so that my ASP.NET application looks in a
location on another server? I have seen some articles discussing this
issue, and they all deal with modifying a .config file to use a
different connection string. Am I on the right track?

Obviously, I am a newbie when it comes to this stuff, so I would
greatly appreciate any guidance that anyone could offer me.
Thank you in advance,
 
S

sloan

Check the .config files after you run the tool.

Type in a role like "PeanutBuddy" and do a search for that unique string.
I'm going from memory, but I think you'll find it in a xml or config file.
...

Personally, I wouldn't use the tool. I think its more for RAPID deployment.

Take a crack at a Custom Membership Provider or Custom Role Provider.
 
K

Kirk

I guess I should have dug a little deeper before posting. I found this
article, which was very helpful:

http://aspnet.4guysfromrolla.com/articles/121405-1.aspx

It details how to use the ASP.NET SQL Server Registration Tool to copy
[create] the required schema to the database of your choosing.

I changed my Web.config file to look at this [local SQL 2000]
connection by using this:

<connectionStrings>
<add name="MyDB" connectionString="Provider=SQLOLEDB.1; Integrated
Security=SSPI; Initial Catalog=aspnetdb; Data Source=(local)" />
</connectionStrings>

<roleManager enabled="true">
<providers>
<add connectionStringName="MyDB" name="CustomizedRoleProvider"
type="System.Web.Security.SqlRoleProvider" />
</providers>
</roleManager>

<membership>
<providers>
<add connectionStringName="MyDB"
name="CustomizedMembershipProvider"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>

which seems to work EXCEPT I still can't see any data in the aspnetdb
tables (even though I have created multiple users & roles). From what
I now know, the Web Site Administration Tool was using a database it
automatically created in SQL Server 2005 Express, but I thiink I have
made everything "switch" to my local SQL 2000 server. Can anyone tell
me why I still cannot see this information in my local server?

Thank you in advance for any replies!
 
S

sloan

Did you try the search for unique name thing? and come up empty?

Try that first. and report back.
 
K

Kirk

OK, this is getting more convoluted by the minute. I tried this:

1) I added some obscurely-named role (via the ASP.NET configuration
tool) and tried to find it without success. I searched through all the
files on my computer. Any guesses where I should be looking?
2) I read & reread Scott Guthrie's article to no avail. Using his
guidlines, I changed the web.config to read:

<connectionStrings>
<remove name="LocalSqlServer" />
<add name="LocalSqlServer"
connectionString="Provider=SQLOLEDB.1; Integrated Security=SSPI;
Initial Catalog=aspnetdb; Data Source=MYLOCALCOMPUTER"
providerName="System.Data.SqlClient" />
</connectionStrings>

....which seemed to work (the web pages of my site don't display SQL
errors when displayed). But when I fire up the ASP.NET Web Site
Adiministration Tool and go to the security tab, this error message is
displayed:

"There is a problem with your selected data store. This can be caused
by an invalid server name or credentials, or by insufficient
permission. It can also be caused by the role manager feature not being
enabled. Click the button below to be redirected to a page where you
can choose a new data store.

The following message may help in diagnosing the problem: An error
occurred while attempting to initialize a
System.Data.SqlClient.SqlConnection object. The value that was provided
for the connection string may be wrong, or it may contain an invalid
syntax. Parameter name: connectionString "

WT? I realize that I am new at this, but for something that is
supposed to be so simple to implement, this is getting ridiculous.
Sorry to vent - I am just getting a little frustrated.

To try something new, I created a brand new Web application in VS 2005
(just in case I had mucked something up in my previous attempts). This
ended up with the same results as above. Also, if I go to the
"Providers" tab in ASP.NET's WSAT, it shows a "Could not establish a
connection to the database" error when I click "test".

Thank you very much for your suggestions (& patience), but I am not
sure what to try next. I would appreciate any further comments.
 
C

clintonG

Because you don't know any better and nobody has the character to tell you
the WAT is currently am incomplete and buggy piece of crap. Use it with 2.0
and it writes into the web.config file disabling Intellisense. It can only
be used on a development machine so its really useless for the time being.
Better to find a 3rd party solution if you need support for now.

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://clintongallagher.metromilwaukee.com/
MAP http://wikimapia.org/#y=43038073&x=-88043838&z=17&l=0&m=h
 
K

Kirk

Clinton,

Thanks for your input. You are right about one thing - I don't know
any better right now, because I don't know what my other alternatives
are. Can you or somebody point me in the right direction of a 3rd
party solution that is out there? Quite frankly, I would not know
where to begin.

Thank you.
 
C

clintonG

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top