Failure to bind to EpiServer Roles assemblies



I have an assembly which calls the membership API method GetUsersInRole(). In my config files I reference the EpiServer MultiplexingRoleProvider setup.

When the above method is hit via a normal assembly reference (to my 'NotifierEngine' dll) it works ok, but, when I try to wrap the 'NotifierEngine' assembly within a WCF service (so that I can call it asynchronously), I get (with anonymised substitutions obviously):


The error was: Could not load file or assembly 'EPiServer' or one of its dependencies. The system cannot find the file specified.
at System.Web.Security.Roles.Initialize()
at System.Web.Security.Roles.GetUsersInRole(String roleName)
at xXx.-X-.Notifier.NotifierEngine.UserIsBrokerOrClient(MembershipUser membershipUser) in C:\-X-\Notifier\Notifier\Notifier\NotifierEngine.cs:line 1007
at xXx.-X-.Notifier.NotifierEngine.PerformCancellationsAndReactivations() in C:\-X-\Notifier\Notifier\Notifier\NotifierEngine.cs:line 969
at xXx.-X-.Notifier.NotifierEngine.Process(String path) in C:\-X-\Notifier\Notifier\Notifier\NotifierEngine.cs:line 229
The Notifier engine completed, but errors occurred so review the log file or event log.

I *think* I have all the same the EpiServer assemblies referenced/in the bin in my async project, can someone suggest what I'm overlooking reference-wise?





May 16, 2011 10:57

I don't know what wrong, but I would try to copy all the files from the bin folder of a default EPiServer install to the bin folder of your application and see if it worked. If it didn't I would also copy all the assembly redirects from web.config of the default site. Then it's hopefully working and I would start to clean up things not needed...

May 16, 2011 11:52
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.