Membership login failure

Joined
Dec 10, 2008
Messages
1
Reaction score
0
Hi,

I'm trying to use asp.net Membership in my site. I use forms
authentication,and running anonymous access in the IIS.
without the membership everything works fine when login to DB,but when i'm trying to do something like: User.IsInRole('xxx')
i'm getting: Login failed for user 'Domain\MachineName' although this is NOT the user the application should run with.
If I write explicitly the right user name in the connection string - it's still doesn't work.
this is the web.config part:

<connectionStrings>
<clear/>
<add name="MyConnectionString" connectionString="Server=ServerName;Database=MydbName;
Trusted_Connection=Yes;" />
</connectionStrings>

<system.web>
<identity impersonate="true"/>

<membership defaultProvider="SqlMembershipProvider">
<providers>
<clear/>
<add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="MyConnectionString"
enablePasswordRetrieval="false"
applicationName="App"
passwordFormat="Hashed" minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
</providers>
</membership>

<roleManager enabled="true" defaultProvider="SqlProvider">
<providers>
<clear/>
<add name="SqlProvider" type="System.Web.Security.SqlRoleProvider" applicationName="App"
connectionStringName="MyConnectionString"/>
</providers>
</roleManager>


any ideas?

Thank you!
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top