Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

DnsEndpointIdentity does not exist in System.ServiceModel

$
0
0

Hi

I have some code auto generated from a webservice:

private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) {
if ((endpointConfiguration == EndpointConfiguration.WSHttpBinding_IDeviceService)) {
return new System.ServiceModel.EndpointAddress(new System.Uri("http://compasseauditservice.mdbconsulting.co.uk/Compass.eAudit.DeviceService.Devi" +
"ceService.svc"), new System.ServiceModel.DnsEndpointIdentity("localhost"));
}
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
}

I am getting the error:
The type or namespace name 'DnsEndpointIdentity' does not exist in the namespace 'System.ServiceModel' (are you missing an assembly reference?)

No sure how to resolve this - it works fine in a windows phone (not xamarin) project. I tried to Add Reference to System.ServiceModel but the only options to add are:
System.ServiceModel.Duplex and
System.ServiceModel.NetTcp

When I reference these, the above error seems to disappear, or it just gets lost in the 4000+ other errors that suddenly appear when I build.

Can't seem to find any help via Google on this so would really appreciate any help or suggestions.

Thanks,
Rick.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>