Posts

Showing posts with the label wcf

The HTTP request is unauthorized with client authentication scheme 'Basic'. The authentication header received from the server was 'Negotiate,NTLM'

The HTTP request is unauthorized with client authentication scheme 'Basic'. The authentication header received from the server was 'Negotiate,NTLM' I am trying to connect to a service using the following settings. <bindings> <basicHttpBinding> <binding name="EngineSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTabl...

Dump() object to JSON pretty-print string

Dump() object to JSON pretty-print string Ok, I am having a bit of a problem with this, and I would rather not build my own code if there is an applicable one with permissive license.. I need a way to dump instance of object, any object, into human readable JSON string. Our plan was to use ServiceStack.Text but that piece of software has a restrictive license in v3, and we are not building a FOSS. I also have zero understanding from mgmt about buying commercial license for ServiceStack v4 just to dump objects. So we need something along the lines of MIT licensing. Internal JSON serializer in WCF seems to only work with DataContract adorned objects. Any idea if something like that is available? Use JSON.NET ? if you can use 3rd party DLLs that is. – Alex Anderson Mar 20 '15 at 9:57 Perfect... Thanks. We can us...

Deserializing C++ string in WCF service using Json converter

Deserializing C++ string in WCF service using Json converter I am trying to communicate with C# wcf service which takes josn as an input where json contains image data, i wrote C# client where I am converting the object (InputData) which contains image as byte to json and sending it to server. Client side: InputData RequestData; //copied image data into RequestData obj String jsonRequest = (new JavaScriptSerializer()).Serialize(RequestData); //converting obj to json where : public class InputData { private byte RawImage = null; public byte FrontImage { get return this.FrontRawImage; set if (null != value) { FrontRawImage = value.ToArray(); } } } Server side: //deserialize and get the object InputData requestData = JsonConvert.DeserializeObject<InputData>(jsonData); I am able to do this with C# client but the problem is, I have to communicate this WCF service from C++ client where I am convertin...