catch (WebException ex) { // handels the connection error exception anlong with web response error string message = ex.Message; HttpWebResponse response = (HttpWebResponse)ex.Response; if (null != response) { message = response.StatusDescription; response.Close(); } //end MessageBox.Show(message, "Error"); } Cursor.Current = Cursors.Default;
From link1[^]:Security Token Service Error: Secondly when updating the Security Token Service, in my default install I found that there was no <system.web> tag, and so placing the config after the </system.net> as instructed by Bill, caused the following error when trying to login: ProtocolException: The content type text/html; charset=utf-8 of the response message does not match the content type of the binding (application/soap+msbin1). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. Once I enclosed my <membership> and <rolemanager> tags in a <system.web> </system.web> all was good. Thanks to this thread[^] for that solution.
<membership>
<rolemanager>
<system.web> </system.web>
From link2[^]:Ah --- found it. The ServiceModel section in the website's web.config was set to customBinding. Changed it so it matched what the client was sending, and now it works beautifully.
web.config
customBinding
From link3[^]:Try remove the binaryEncoding tag. You can only use one type of encoding. So you need to remove either TextEncoding or the BinaryEncoding element
binaryEncoding
TextEncoding
BinaryEncoding
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)