Continuous calls to WCF service returns "Only one usage of each socket address (protocol/network address/port) is normally permitted 127.0.0.1:10111"
Asked Answered
F

2

0

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,number 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 you 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 occurring.

Fujimoto answered 6/5, 2009 at 9:45 Comment(0)
A
0

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.

Antebi answered 6/5, 2009 at 11:18 Comment(2)
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 timeFujimoto
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 authAntebi
M
0

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

Marymarya answered 6/5, 2009 at 13:15 Comment(2)
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?Fujimoto
No, that sounds right :( Maybe you need to rethink the strategy :)Marymarya

© 2022 - 2024 — McMap. All rights reserved.