views:

22

answers:

1

Okay,...first the facts.

I'm working on an ASP.Net project which validates it's users across a WCF service. I have a CutomMembershipUser class in a shared assembly which inherits from MembershipUser since I'm using a custom membership provider. All this cannot change because it's out of my remit.

Here's roughly what's happening. I've got some code in the Logged_In event of a login control that looks like this...

            CustomMembershipUser user = (CustomMembershipUser)SecurityBL.GetUser(userName);

            if (user.Customer.ToLower() == "some user")
            {
                //impl omitted
            }

The first line executes without problems and I get the correct user back from the service. However, in the second line, when I compare the user.Customer property a second request is sent to the service with an empty userName string which hangs the whole IDE for about 30 secnods or so and eventually throws a FaultException<T> which I can catch on the service side.

Obviously my first assumption was that there was some logic in the getter of that property that lazy loads the property but there isn't; in fact it's an auto implemented property!

Even more strange than that,..in the calling code I can't even catch the exception which tells me that the request is coming from a different thread than that which I'm executing.

This same problem happens for any property access on this object whether it's overridden or entirely new.

Has anyone seen anything like this before? I'v been scratching my head for 2 days now and I'm not sure what to try next.

Any help would be great.

Thanks in advance. Stimul8d

+1  A: 

membership is pretty straight ahead and actually has no knowledge of network communications especially not WCF,, so there has to be something hinky happening in your code. really.

if you want to try and isolate the smallest footprint of code that reproduces the effect and upload it somewhere I would be happy to take a look.

Sky Sanders
After much deliberation I would agree,..something is definitely askew with our code but I haven't even been able to faithfully replicate the issue in isolation yet. I think this is going to be a real headache until we can do that but thanks for the help all the same. big tick for you.
Stimul8d
@stim - good luck. just add another comment if you want to revisit this.
Sky Sanders