开发者

ASP.NET Membership is creating double user entries upon creation

I'm using asp.net membership in my web application.

I use website->ASP.net Configuration to create users. Whenever I create an user it is adding two entries into this table aspnet_Users with two different application ids.

is there a reason why?

Because, i'm assigning this user a role. this is getting saved into the usersinroles table with a user id.

When i login from my application, the logged in userid is different from the usersinroles table.

How do i achieve this? Im trying to display/not display some links based on user roles. the users and roles are created using asp.net configuration utility

--I see 3 records created in teh application table. How is this possible? When are they craated. here are teh values in application table

ApplicationName LoweredApplicati开发者_如何学ConName ApplicationId
/ / AA398676-C555-4999-A085-632DDF3576FE
/eproc /eproc 9F887F82-7AA1-41E8-97EA-E8EDEB4A7C09
eproc eproc 4B46421F-2FCE-449B-A14A-9188EEE0B8B6


Check your Web.Config file and search for 'applicationName'. Make sure they are all set to the same value.

You will have at least 3:

 <membership>
      <providers>
        <clear/>
      ONE HERE
      </providers>
    </membership>

    <profile>
      <providers>
        <clear/>
        ONE HERE
      </providers>
    </profile>

    <roleManager enabled="true">
      <providers>
        <clear />
        ONE HERE
      </providers>
    </roleManager>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜