Print Page | Close Window

Exception when calling the authentication service

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3160
Printed Date: 13-Apr-2026 at 3:28pm


Topic: Exception when calling the authentication service
Posted By: pponzano
Subject: Exception when calling the authentication service
Date Posted: 15-Dec-2011 at 7:05am
Helo,
I've got an application WPF that uses a web server for accessing the DB,I also use devorce application framework...
when I call the login

public void Login()

     {

         var loginCredential = new LoginCredential(_userName, _password, "");

 

         bool isLogged = false;

         try

         {

             _authenticationService.Login(loginCredential);

             _eventAggregator.Publish(new ActivateWorkspaceMessage());

 

         }

         catch (LoginException ex)

         {

            //todo add logic for message

             int i = 0;

         }

 

 

     }


I got this exception:

Type 'my.DomainModel.CustomerSearchResult' cannot be added to list of known types since another type 'my.DomainModel.CustomerSearchResult' with the same data contract name 'http://schemas.datacontract.org/2004/07/my.DomainModel:CustomerSearchResult' is already present. If there are different collections of a particular type - for example, List<Test> and Test[], they cannot both be added as known types.  Consider specifying only one of these types for addition to the known types list.

I think the problem is due to the fact my WPF application uses my.Client, while Web uses my.Server that contains the edmx and shares between my.Client the mymodel.IB.Designer.cs...

Any suggestion?
Thanks



Replies:
Posted By: kimj
Date Posted: 15-Dec-2011 at 12:12pm
So does this mean you've resolved the invalid credentials problem you had previously?
 
You're right that the my.Client and my.Server assemblies are the likely culprits here.   You need to either not deploy both assemblies to each side, or to exclude the unwanted assembly using the CompositionHost.IgnorePatterns ( http://drc.ideablade.com/xwiki/bin/view/Documentation/discovery#HControllingdiscovery - http://drc.ideablade.com/xwiki/bin/view/Documentation/discovery#HControllingdiscovery ).  



Print Page | Close Window