Need help configuring security and role management settings for website

P

Philipp Lenz

I'm completely new to ASP.Net 2.0 and I'm baffled about what to do to
get this to work.
FYI, I'm not new at this, I've used asp.net 1.1 for allmost 4 years
now.

I'm running a development machine running Team Foundation Server,
VS.net 2005 Team Suite and SQL Server 2005, all freshly installed and
working (all final, no betas).

I've built my first website and, having worked with sharepoint for
years, wanted to play with the new asp.net 2.0 webpart framework.

Okay, now I'm required to configure the role management and security
setup before this can work, so I start the configuration website where
I want to configure the sql server provider...without success.

I learn that because I do not use SQL Server Express I have to
configure the database myself.
I start the aspnet_regsql tool and it creates an aspnet databse in my
local sql server 2005.
Okay, now I try, once again, to configure the provider, no luck (no
connection could be established)

So now I learn that I have to configure the connection string myself,
which I do, i configure it to use the sql server on localhost using
integrated security with the aspnet db as the default catalog.

It STILL won't work, now it tells me something about shared memory,
sometimes it tells me that access for Server\Administrator (the user
that I'm logged in as) could not be established (?? how can this
be??).

Now I'm absolutely clueless what to do to get this to work, why is
this so hard and confusing?? Why can't the admin website ask me about
connection settings and accounts, why do I have to us command line
tools and why do I get cryptic error messages?

I would understand if the products I used where CTPS or Betas, but
they are ALL final.

Please help me with this!!

Philipp Lenz
 
G

Guest

You need to configure your membership and role providers by adding settings
like the following to your web.config file:

<membership defaultProvider="MySqlProvider" userIsOnlineTimeWindow="20"
hashAlgorithmType="MD5">
<providers>
<add connectionStringName="MyConnString"
enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="true"
passwordFormat="Hashed" applicationName="MyApp"
name="MySqlProvider"
type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>
<roleManager defaultProvider="MySqlProvider"
enabled="true"
cacheRolesInCookie="true"
cookieName=".ASPROLES"
cookieTimeout="30"
cookiePath="/"
cookieRequireSSL="false"
cookieSlidingExpiration="true"
cookieProtection="All" >
<providers>
<add
name="MySqlProvider"
type="System.Web.Security.SqlRoleProvider"
connectionStringName="MyConnStr"
applicationName="MyApp" />
</providers>
</roleManager>
 

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,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top