views:

114

answers:

1

I have written a application which resides in a subdirectory of the parent, or root application.

The root application uses a custom membership provider, but all the code for it is in the App_Code directory, and it's compiled deep into the Temp files for ASP.NET.

Therefore, it complains that it's missing a reference to the provider when I do:

Membership.GetUser().ProviderUserKey

I need to get the UserId guid for shoving into some database table for tracking. Is there any other way to get at this key from a child application? Or is there a way to make a child application load DLLs from the parents reference directories?

+2  A: 

One approach is moving your custom membership provider into separate class library (DLL) project. Then, you'll be able to access it both from the root and child websites.

Pavel Chuchuva
Yeah, but the team that wrote that doesn't want to... Thanks though!
TheSoftwareJedi