System.ComponentModel.Win32Excepti on: The message received was unexpected or badly formatted
I was referred to this forum by an MVP from another post. Sorry if this is the wrong place. http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/62631236-809f-447f-b187-2d990748da50 What settings in windows 2008 govern the use of CLIENT certificates?? To clarify, the program is running on Windows 2008 and acting as a client to a different machine (on the internet). I have written a console mode WCF client that contacts an Apache based web service that uses OpenSSL 0.9.8 tls or ssl3. The WCF client uses client certificates on Windows 2008 SP2 x64. The client had been running for months with no problem, and then I started getting the errors below around Nov 8 2010 (below). I have done my best to include all the details. Please read carefully. The relevant traces, exceptions, code and config are included in this post. -------------------------- GOAL: -------------------------- 1.) Fix it. 2.) Find out what 0X80090326 means. 3.) Find out what policies/acl's apply to the situation The only thing I can be sure of that did not change is the code. Can anyone point me toward the next step? -------------------------- DETAILS: -------------------------- - The program executes as a local user (non-domain) that is in the Local Administrators group. - I can display the server url using IE and Firefox, provided I have the certs installed for personal use. - The certificates are installed in the LocalMachine store in "TrustedPeople" - NOT the user's location, the machine location. The local user finds the proper key, as the trace below will show. What I have googled for: - 0X80090326 - Decrypt failed with error 0X80090326 - The message received was unexpected or badly formatted - and others.. --------------------------------------------- Things I have tried that did NOT work: ---------------------------------------------- - changing the policy for Certificate Path Validation and Trusted Publishers (previously undefined) - building a completely new Win 2008 server outside the lan, and re-installing and re-running - running the client interactively as the local user - running the client interactively as a domain user - recompiling new code, and trying again. - adding the certs to the local user's store as well as the machine store - adding a trusted root cert - re-writing the client using HttpWebRequest instead of WCF and using a cert file (not the cert store) --------------------------------------------- Things I have tried that DO work: --------------------------------------------- - running the client on a Windows 7 - recompiling new code, and trying again on Windows 7 - running on and off the corporate LAN on windows 7 - running the client on a Windows XP (on and off LAN) --- Exception --- System.ServiceModel.CommunicationException: An error occurred while receiving the HTTP response to https://www.-----.com/object/search?start=2292&end=99999999. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.IO.IOException: The decryption operation failed, see inner exception. ---> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted --- End of inner exception stack trace --- at System.Net.Security._SslStream.ProcessReadErrorCode(SecurityStatus errorCode, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest, Byte[] extraBuffer) at System.Net.Security._SslStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.StartFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest) at System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) --- End of inner exception stack trace --- --- System.Net trace --- System.Net Verbose: 0 : [3868] WebRequest::Create(https://www.XXXXXXXXX.com/object/incident/search?start=2292&end=99999999) System.Net Verbose: 0 : [3868] HttpWebRequest#19515494::HttpWebRequest(https://www.XXXXXXXXX.com/object/incident/search?start=2292&end=99999999#1378705408) System.Net Verbose: 0 : [3868] Exiting HttpWebRequest#19515494::HttpWebRequest() System.Net Verbose: 0 : [3868] Exiting WebRequest::Create() -> HttpWebRequest#19515494 System.Net Information: 0 : [3868] Associating HttpWebRequest#19515494 with ServicePoint#41421720 System.Net Verbose: 0 : [3868] HttpWebRequest#19515494::GetResponse() System.Net Information: 0 : [3868] Associating Connection#37251161 with HttpWebRequest#19515494 System.Net Information: 0 : [3868] TlsStream#66824994::.ctor(host=www.XXXXXXXXX.com, #certs=1) System.Net Information: 0 : [3868] Associating HttpWebRequest#19515494 with ConnectStream#64554036 System.Net Information: 0 : [3868] HttpWebRequest#19515494 - Request: GET /object/incident/search?start=2292&end=99999999 HTTP/1.1 System.Net Information: 0 : [3868] SecureChannel#44115416::.ctor(hostname=www.XXXXXXXXX.com, #clientCertificates=1) System.Net Information: 0 : [3868] Enumerating security packages: System.Net Information: 0 : [3868] Negotiate System.Net Information: 0 : [3868] Kerberos System.Net Information: 0 : [3868] NTLM System.Net Information: 0 : [3868] Schannel System.Net Information: 0 : [3868] Microsoft Unified Security Protocol Provider System.Net Information: 0 : [3868] WDigest System.Net Information: 0 : [3868] TSSSP System.Net Information: 0 : [3868] CREDSSP System.Net Information: 0 : [3868] SecureChannel#44115416 - Attempting to restart the session using the user-provided certificate: [Version] V3 [Subject] CN=XXXXXXXXX_SOME_SERVICE, OU=Some Site, O="YYYY, Inc.", S=New Jersey, C=US Simple Name: XXXXXXXXX_SOME_SERVICE DNS Name: XXXXXXXXX_SOME_SERVICE [Issuer] CN=xx.yyyy.com, OU=Some Site, O="YYYY, Inc.", L=Some City, S=New Jersey, C=US Simple Name: xx.yyyy.com DNS Name: xx.yyyy.com [Serial Number] 23 [Not Before] 3/17/2010 3:26:50 PM [Not After] 3/17/2011 3:26:50 PM [Thumbprint] xxxxxxxxxxxxxxxxxxxxxxxA91E3731C36F7CC1820F52 [Signature Algorithm] md5RSA(1.2.840.113549.1.1.4) [Public Key] Algorithm: RSA Length: 1024 Key Blob: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4b e3 36 6c 11 7f 15 51 13 89 bd ea f9 3c 04 bd 97 ff f2 bb bc 95 88 4d 30 57 a8 bf 58 be 2b f5 3b 77 10 50 be 9d f7 78 2c 5b ac 7f 05 4f d0 8c 8a 39 3f 90 e0 ee 08 16 ed 45 4f.... System.Net Information: 0 : [3868] SecureChannel#44115416 - Left with 1 client certificates to choose from. System.Net Information: 0 : [3868] SecureChannel#44115416 - Trying to find a matching certificate in the certificate store. System.Net Information: 0 : [3868] SecureChannel#44115416 - Locating the private key for the certificate: [Version] V3 [Subject] CN=XXXXXXXXX_SOME_SERVICE, OU=Some Site, O="YYYY, Inc.", S=New Jersey, C=US Simple Name: XXXXXXXXX_SOME_SERVICE DNS Name: XXXXXXXXX_SOME_SERVICE [Issuer] CN=xx.yyyy.com, OU=Some Site, O="YYYY, Inc.", L=Some City, S=New Jersey, C=US Simple Name: xx.yyyy.com DNS Name: xx.yyyy.com [Serial Number] 23 [Not Before] 3/17/2010 3:26:50 PM [Not After] 3/17/2011 3:26:50 PM [Thumbprint] xxxxxxxxxxxxxxxxxxxxxxxA91E3731C36F7CC1820F52 [Signature Algorithm] md5RSA(1.2.840.113549.1.1.4) [Public Key] Algorithm: RSA Length: 1024 Key Blob: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4b e3 36 6c 11 7f 15 51 13 89 bd ea f9 3c 04 bd 97 ff f2 bb bc 95 88 4d 30 57 a8 bf 58 be 2b f5 3b 77 10 50 be 9d f7 78 2c 5b ac 7f 05 4f d0 8c 8a 39 3f 90 e0 ee 08 16 ed 45 4f.... System.Net Information: 0 : [3868] SecureChannel#44115416 - Certificate is of type X509Certificate2 and contains the private key. System.Net Information: 0 : [3868] AcquireCredentialsHandle(package = Microsoft Unified Security Protocol Provider, intent = Outbound, scc = System.Net.SecureCredential) System.Net Information: 0 : [3868] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = (null), targetName = www.XXXXXXXXX.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation) System.Net Information: 0 : [3868] InitializeSecurityContext(In-Buffer length=0, Out-Buffer length=118, returned code=ContinueNeeded). System.Net Information: 0 : [3868] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 19d6c1a0:25b9b10, targetName = www.XXXXXXXXX.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation) System.Net Information: 0 : [3868] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded). System.Net Information: 0 : [3868] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 19d6c1a0:25b9b10, targetName = www.XXXXXXXXX.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation) System.Net Information: 0 : [3868] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded). System.Net Information: 0 : [3868] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 19d6c1a0:25b9b10, targetName = www.XXXXXXXXX.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation) System.Net Information: 0 : [3868] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=198, returned code=ContinueNeeded). System.Net Information: 0 : [3868] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 19d6c1a0:25b9b10, targetName = www.XXXXXXXXX.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation) System.Net Information: 0 : [3868] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded). System.Net Information: 0 : [3868] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 19d6c1a0:25b9b10, targetName = www.XXXXXXXXX.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation) System.Net Information: 0 : [3868] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=OK). System.Net Information: 0 : [3868] Remote certificate: [Version] V3 [Subject] CN=WWW.XXXXXXXXX.COM, OU=Domain Validated, OU=Thawte SSL123 certificate, OU=Go to https://www.thawte.com/repository/index.html, O=WWW.XXXXXXXXX.COM Simple Name: WWW.XXXXXXXXX.COM DNS Name: WWW.XXXXXXXXX.COM [Issuer] E=server-certs@thawte.com, CN=Thawte Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, S=Western Cape, C=ZA Simple Name: Thawte Server CA Email Name: server-certs@thawte.com DNS Name: Thawte Server CA [Serial Number] XXXXXXXXXXXX77870CAE82825BD5D44 [Not Before] 3/11/2010 7:00:00 PM [Not After] 4/28/2011 7:59:59 PM [Thumbprint] XXXXXXXXXXXXA1092D42EF0A1E504F09468C19 [Signature Algorithm] sha1RSA(1.2.840.113549.1.1.5) [Public Key] Algorithm: RSA Length: 1024 Key Blob: 30 81 89 02 81 81 00 aa c1 71 a2 e6 14 12 80 17 c0 c2 e9 37 6b 22 8a d1 1a b8 ba d5 aa 96 f6 e7 80 30 4d 3d ea 19 c0 16 88 8e 96 5a 5b 90 09 7e ea aa 11 72 f9 5a 49 e0 f8 6c f0 d9 b2 47 b5 11 2c 21 db 3.... System.Net Information: 0 : [3868] SecureChannel#44115416 - Remote certificate was verified as valid by the user. System.Net Information: 0 : [3868] ConnectStream#64554036 - Sending headers { Content-Type: application/xml; charset=utf-8 Host: www.XXXXXXXXX.com Connection: Keep-Alive }. System.Net Error: 0 : [3868] Decrypt failed with error 0X80090326. System.Net Error: 0 : [3868] Exception in the HttpWebRequest#19515494:: - The underlying connection was closed: An unexpected error occurred on a receive. System.Net Information: 0 : [3868] Associating HttpWebRequest#19515494 with ServicePoint#41421720 System.Net Information: 0 : [3868] Associating Connection#61494432 with HttpWebRequest#19515494 System.Net Information: 0 : [3868] TlsStream#16578980::.ctor(host=www.XXXXXXXXX.com, #certs=1) System.Net Information: 0 : [3868] Associating HttpWebRequest#19515494 with ConnectStream#14993092 System.Net Information: 0 : [3868] HttpWebRequest#19515494 - Request: GET /object/incident/search?start=2292&end=99999999 HTTP/1.1 System.Net Information: 0 : [3868] SecureChannel#720107::.ctor(hostname=www.XXXXXXXXX.com, #clientCertificates=1) System.Net Information: 0 : [3868] SecureChannel#720107 - Attempting to restart the session using the user-provided certificate: [Version] V3 [Subject] CN=XXXXXXXXX_SOME_SERVICE, OU=Some Site, O="YYYY, Inc.", S=New Jersey, C=US Simple Name: XXXXXXXXX_SOME_SERVICE DNS Name: XXXXXXXXX_SOME_SERVICE [Issuer] CN=xx.yyyy.com, OU=Some Site, O="YYYY, Inc.", L=Some City, S=New Jersey, C=US Simple Name: xx.yyyy.com DNS Name: xx.yyyy.com [Serial Number] 23 [Not Before] 3/17/2010 3:26:50 PM [Not After] 3/17/2011 3:26:50 PM [Thumbprint] xxxxxxxxxxxxxxxxxxxxxxxA91E3731C36F7CC1820F52 [Signature Algorithm] md5RSA(1.2.840.113549.1.1.4) [Public Key] Algorithm: RSA Length: 1024 Key Blob: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4b e3 36 6c 11 7f 15 51 13 89 bd ea f9 3c 04 bd 97 ff f2 bb bc 95 88 4d 30 57 a8 bf 58 be 2b f5 3b 77 10 50 be 9d f7 78 2c 5b ac 7f 05 4f d0 8c 8a 39 3f 90 e0 ee 08 16 ed 45 4f.... System.Net Information: 0 : [3868] SecureChannel#720107 - Left with 1 client certificates to choose from. System.Net Information: 0 : [3868] SecureChannel#720107 - Trying to find a matching certificate in the certificate store. System.Net Information: 0 : [3868] SecureChannel#720107 - Locating the private key for the certificate: [Version] V3 [Subject] CN=XXXXXXXXX_SOME_SERVICE, OU=Some Site, O="YYYY, Inc.", S=New Jersey, C=US Simple Name: XXXXXXXXX_SOME_SERVICE DNS Name: XXXXXXXXX_SOME_SERVICE [Issuer] CN=xx.yyyy.com, OU=Some Site, O="YYYY, Inc.", L=Some City, S=New Jersey, C=US Simple Name: xx.yyyy.com DNS Name: xx.yyyy.com [Serial Number] 23 [Not Before] 3/17/2010 3:26:50 PM [Not After] 3/17/2011 3:26:50 PM [Thumbprint] xxxxxxxxxxxxxxxxxxxxxxxA91E3731C36F7CC1820F52 [Signature Algorithm] md5RSA(1.2.840.113549.1.1.4) [Public Key] Algorithm: RSA Length: 1024 Key Blob: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx 4b e3 36 6c 11 7f 15 51 13 89 bd ea f9 3c 04 bd 97 ff f2 bb bc 95 88 4d 30 57 a8 bf 58 be 2b f5 3b 77 10 50 be 9d f7 78 2c 5b ac 7f 05 4f d0 8c 8a 39 3f 90 e0 ee 08 16 ed 45 4f.... System.Net Information: 0 : [3868] SecureChannel#720107 - Certificate is of type X509Certificate2 and contains the private key. System.Net Information: 0 : [3868] AcquireCredentialsHandle(package = Microsoft Unified Security Protocol Provider, intent = Outbound, scc = System.Net.SecureCredential) System.Net Information: 0 : [3868] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = (null), targetName = www.XXXXXXXXX.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation) System.Net Information: 0 : [3868] InitializeSecurityContext(In-Buffer length=0, Out-Buffer length=118, returned code=ContinueNeeded). System.Net Information: 0 : [3868] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 19d6c1a0:25b9b10, targetName = www.XXXXXXXXX.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation) System.Net Information: 0 : [3868] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded). System.Net Information: 0 : [3868] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 19d6c1a0:25b9b10, targetName = www.XXXXXXXXX.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation) System.Net Information: 0 : [3868] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded). System.Net Information: 0 : [3868] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 19d6c1a0:25b9b10, targetName = www.XXXXXXXXX.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation) System.Net Information: 0 : [3868] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=198, returned code=ContinueNeeded). System.Net Information: 0 : [3868] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 19d6c1a0:25b9b10, targetName = www.XXXXXXXXX.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation) System.Net Information: 0 : [3868] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=ContinueNeeded). System.Net Information: 0 : [3868] InitializeSecurityContext(credential = System.Net.SafeFreeCredential_SECURITY, context = 19d6c1a0:25b9b10, targetName = www.XXXXXXXXX.com, inFlags = ReplayDetect, SequenceDetect, Confidentiality, AllocateMemory, InitManualCredValidation) System.Net Information: 0 : [3868] InitializeSecurityContext(In-Buffers count=2, Out-Buffer length=0, returned code=OK). System.Net Information: 0 : [3868] Remote certificate: [Version] V3 [Subject] CN=WWW.XXXXXXXXX.COM, OU=Domain Validated, OU=Thawte SSL123 certificate, OU=Go to https://www.thawte.com/repository/index.html, O=WWW.XXXXXXXXX.COM Simple Name: WWW.XXXXXXXXX.COM DNS Name: WWW.XXXXXXXXX.COM [Issuer] E=server-certs@thawte.com, CN=Thawte Server CA, OU=Certification Services Division, O=Thawte Consulting cc, L=Cape Town, S=Western Cape, C=ZA Simple Name: Thawte Server CA Email Name: server-certs@thawte.com DNS Name: Thawte Server CA [Serial Number] XXXXXXXXXXXX77870CAE82825BD5D44 [Not Before] 3/11/2010 7:00:00 PM [Not After] 4/28/2011 7:59:59 PM [Thumbprint] XXXXXXXXXXXXA1092D42EF0A1E504F09468C19 [Signature Algorithm] sha1RSA(1.2.840.113549.1.1.5) [Public Key] Algorithm: RSA Length: 1024 Key Blob: 30 81 89 02 8 xxx.... System.Net Information: 0 : [3868] SecureChannel#720107 - Remote certificate was verified as valid by the user. System.Net Information: 0 : [3868] ConnectStream#14993092 - Sending headers { Content-Type: application/xml; charset=utf-8 Host: www.XXXXXXXXX.com Connection: Keep-Alive }. System.Net Error: 0 : [3868] Decrypt failed with error 0X80090326. System.Net Error: 0 : [3868] Exception in the HttpWebRequest#19515494:: - The underlying connection was closed: An unexpected error occurred on a receive. System.Net Error: 0 : [3868] Exception in the HttpWebRequest#19515494::EndGetResponse - The underlying connection was closed: An unexpected error occurred on a receive. -------------------------- CODE -------------------------- main basically does this.. myWebObject wbcResponse = null; wbc = new MyCompany.myWebClient(THEUrl, THEthumbPrint); wbcResponse = wbc.getObjectData2(SOMENUMBER); - - - wcf client - - - using System.Security.Cryptography.X509Certificates; using System; using System.ServiceModel; namespace MyCompany { public class myWebClient : System.ServiceModel.ClientBase<ImyWebApi>, ImyWebApi { public myWebClient(string uri,string thumbPrint) { System.Net.WebProxy wproxy = new System.Net.WebProxy(); wproxy.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials; System.Net.WebRequest.DefaultWebProxy = wproxy; // create the channel with dynamic uri and cert System.ServiceModel.EndpointAddress myEndpoint = new System.ServiceModel.EndpointAddress(uri); base.Endpoint.Address = myEndpoint; base.ClientCredentials.ClientCertificate.SetCertificate(StoreLocation.LocalMachine, StoreName.TrustedPeople, X509FindType.FindByThumbprint, thumbPrint); } public myWebObject getObjectData2(string id) { return base.Channel.getObjectData2(id); } public queryResult query(string IncidentType, string start, string end) { return base.Channel.query(IncidentType, start, end); } } } - - - validation (i have verified that this is wired and executing properly) private static bool customXertificateValidation(object sender, System.Security.Cryptography.X509Certificates.X509Certificate cert, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors error) { if (error != System.Net.Security.SslPolicyErrors.None) { // basically let everything through for now. // There are NO errors being logged from this. log("=============================================="); log("ssl error"); log("=============================================="); log(error.ToString()); } return true; } - - myWebobject (snippet) - - - using System.Xml.Serialization; namespace MyCompany { [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.42")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)] [System.Xml.Serialization.XmlRootAttribute(ElementName = "object", Namespace = "", IsNullable = false)] public partial class myWebObject { private myWebEvent[] eventField; private float versionField; private string idField; private string objecttypeField; /// <remarks/> [System.Xml.Serialization.XmlElementAttribute(ElementName = "event")] public myWebEvent[] myWebEvent { get { return this.eventField; } set { this.eventField = value; } } - - -etc... - - - -------------------------- CONFIGURATION -------------------------- <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > <section name="myCompany.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> </sectionGroup> </configSections> <system.serviceModel> <bindings> <webHttpBinding> <binding name="Binding_ImyWeb" > <security mode="Transport"> <transport clientCredentialType="Certificate"/> </security> <readerQuotas maxBytesPerRead="40960" /> </binding> </webHttpBinding> </bindings> <client> <endpoint address="https://myCompany-eval.myWeb.org/object/" behaviorConfiguration="credentialConfiguration" binding="webHttpBinding" bindingConfiguration="Binding_ImyWeb" contract="myCompany.ImyWebApi" name="endPoint_ImyWeb" > </endpoint> </client> <behaviors> <endpointBehaviors> <behavior name="credentialConfiguration"> <webHttp/> </behavior> </endpointBehaviors> </behaviors> </system.serviceModel> </configuration> -------------------------- END -------------------------- John Lucas - Code Monkey
December 8th, 2010 4:28pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics