help with sql server use in visual studio 2005/asp.net, help!

G

Guest

I have a web project where I'm using VS2005 and I have installed Sql server
2005 developer edition. I've modified my webconfig file to point to my custom
provider:

<connectionStrings>
<add name="namegoeshere" connectionString="server=servername(or
localhost);database=dbname;uid=dbid;password=pass1;"
providerName="System.Data.SqlClient"/>
</connectionStrings>
<membership defaultProvider="CustomizedMembershipProvider">
<providers>
<add name="CustomizedMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="namegoeshere" />
</providers>
</membership>

what is weird is that I used the 'aspnet_regsql.exe' tool to create the
membership structure in my existing db. But I see an 'aspnetdb.mdb' file in
my App_Data directory. It it appears that that the 'AspNet Configuration
tool' is saving user data in two places???? The mdb and in my Sql DB??? I
noticed this when I attempted to add a user via a webpage, the user only goes
into my Sql DB, not app_data db. So when I pull a getusers I getonly the
app_data db users????

can anyone explain what is going on? I've checked the settings in aspnet
config tool.

Help??????
 
S

Sean Chambers

Hello,

Yeah, I had a ball with this same issue. It only gets worse as you get
nearer deployment =)

It's been awhile since i messed with that problem, but IIRC I fixed it
by going into the website administration tool and looking at the
Membership provider set in there, IIRC mine had "reset" to use the
aspnetdb which is the database used by the website administration tool,
or it had something to do with the ApplicationName set in the
membership tables. I had so many problems I don't really remember the
seperate problems I had, they all kind of just blended together =P

to be completely honest, I had so many problems with regsql and the
membership/role providers that I abandonded them completely and built
my own role/membership code. Not as modular as I would have liked, but
if I banged my head against the wall anymore I was going to give myself
a concussion.

There is a good tutorial on thecodeproject.com explaining the whole
spiel. don't have the link handy, sorry =(

hope that helps!

Sean
 

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

Top