views:

384

answers:

2

Hey guys. I have developed a little mashup site. This site is complete with a community. So when the user goes to the Community.aspx page he/she will see the members of the community with joined date,nuber of comments, name, etc.etc. and ofc paging as well. There are like 15 users per page. Now my problem is that i have 2 types of users on my site "Traditional Users" and "Open ID" users. Ofc i have 2 Roles defined in the Asp. Net membership namely "OpenIDUser" and "User".

OK!!!

Now when the user click on Community.aspx A list of users is created and the first 15 are returned. But for this list of users to be created there are a lot of Roles.IsUserInRole("Username","RoleName") checks to see which users are which because now to sort the userlist in alphabetical order. You have to be carefull of all OPEN ID users who all start with http://identifier.username or whatever. So i make a lot of Asp .Net Membership Service Calls Membership.GetUser Roles and all that...

Now typically this would not be a problem, however i have incorporated the MemberShip service into a WCF. The reason for this is that in this community i am going to have lots of subdomains (a subdomain for each "site") and i only want to use 1 database for all this.

So i think normally if u make 500+ Membership.whatever calls thats 100%. But as soon as you bring .NET Membership in WCF and convert every single Membership.Whatever method into a WCF method. you have 500+ WCF calls every time the page is loaded.

I think that is why the error is occuring. Can any help me?

P.S thanks so much for reading through my garbage!!!! :D

A: 

This is not a question, so this is not an answer, but a comment.

You should be looking at having each sub domain as a separate membership application. This allows multiple sites to share the same membership database, but not interfere with each other's members. You can set the application name as part of the provider configuration.

blowdart
i want signle sign on for the whole site though :/ so if u register to one sub-domain , u should be part of all. But the problem is the error message that i get. Because i hade made each Membership class call a WCF method that creates a communication channel each time
The_Butcher
So if you're sharing auth then why are you using a web service? Setting the same application name and cookie path will offer you this without using a web service for auth
blowdart
A: 

Are you closing the client? IIRC I had a similar problem.

leppie
Ye after every instantiation as soon as the transport is created the client is being shut-down.im using client.close() is this correct or is there another way?
The_Butcher
No, that sounds right :( Maybe you need to rethink the strategy :)
leppie