boris_dv
boris_dv

Reputation: 143

'System.ServiceModel.CommunicationException' -> Could not find XmlSerializer UWP

Recently I migrated a project im currently working on from Windows 8.1 to UWP using Migrate to UWP. With some minor issues and tweaks I managed to successfully build and run the project (Frontend Win project + 2 referenced projects). However when I try to login (sending a request with credentials to a webservice) the function throws an System.ServiceModel.CommunicationException.

MESSAGE: There was an error in serializing body of message getPermRequest: 'Could not find XmlSerializer for type App.GWebService.GenericWS.'. Please see InnerException for more details.

INNER MESSAGE: Could not find XmlSerializer for type App.GWebService.GenericWS.

 public async Task<getPermissionsResponse> GetUserPermissions(string userName)
    {
        var request = new getPermissionsRequest(new comMsg2
        {
            msgParams = new comMsgParams2(),
            msgData = new comMsgData2 { userName = userName },
            msgId = Guid.NewGuid().ToString(),                                  
            msgUid = userName,                                                  
            msgVersion = 101,                                                   
            msgSourceSystem = 114,                                              
            msgTargetSystem = 1,                                                
            msgTargetSystemSpecified = true,                                    
        });

        LogRequest(request);
        try
        {

        //crashes here
        var response = await ((GenericWS)SessionHolder.Instance.ServiceClientGenericWs.WebService).getPermissionsAsync(request);

Service references are in another project that is referenced and was converted to win 10.

win 8.1 version works ok.

Any Ideas? I was trying to Google similar error messages with no success.

Upvotes: 0

Views: 82

Answers (0)

Related Questions