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

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top