Note that there are some explanatory texts on larger screens.

plurals
  1. POWCF webservice - can't use it in production
    primarykey
    data
    text
    <p>I have a webservice, that gives me a list of mails to send. It works fine on localhost, but not in production.</p> <p>My webservice should be accessible without any limit at all. It's not safe at all, but frankly, at this point, I don't care about it at all.</p> <p>I got these errors : </p> <ul> <li><code>The caller was not authenticated by the service</code>, which I resolved with this : <a href="http://forums.asp.net/t/1324170.aspx" rel="nofollow">http://forums.asp.net/t/1324170.aspx</a></li> <li><code>Incoming binary negotiation has invalid ValueType</code>, resolved using this : <a href="http://social.msdn.microsoft.com/Forums/en/wcf/thread/4b014224-d5d9-41d0-9441-48ccd2fb44cd" rel="nofollow">http://social.msdn.microsoft.com/Forums/en/wcf/thread/4b014224-d5d9-41d0-9441-48ccd2fb44cd</a></li> <li><code>The request for security token has invalid or malformed elements</code>, resolved using this : <a href="http://www.vistax64.com/indigo/151689-wcf-security-request-security-token-could-not-satisfied.html" rel="nofollow">http://www.vistax64.com/indigo/151689-wcf-security-request-security-token-could-not-satisfied.html</a></li> </ul> <p>I've been at it the whole day, and I fear I don't remember which modification I did for which error.</p> <p>The latest error I got is... a lame timeout, without innerexception. But, the funny thing is : I have configured every timeout to be 10 hours, and I get the timeout after a few seconds.</p> <p>My web.config (server) has this (actually, it has 4 webservices, but I left only the one I'm trying to use now) :</p> <pre><code>&lt;system.serviceModel&gt; &lt;bindings&gt; &lt;wsHttpBinding&gt; &lt;binding name="wsHttpBinding" allowCookies="true" maxReceivedMessageSize="20000000" maxBufferPoolSize="20000000" useDefaultWebProxy="true"&gt; &lt;security mode="Message"&gt; &lt;transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;binding name="NoSecurityBinding" allowCookies="true" maxReceivedMessageSize="20000000" maxBufferPoolSize="20000000" useDefaultWebProxy="true"&gt; &lt;security mode="Message"&gt; &lt;transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /&gt; &lt;message clientCredentialType="Windows" negotiateServiceCredential="true" establishSecurityContext="true" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/wsHttpBinding&gt; &lt;/bindings&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="CentresInteretBehavior"&gt; &lt;serviceMetadata httpGetEnabled="true" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" httpHelpPageEnabled="true" /&gt; &lt;serviceCredentials&gt; &lt;windowsAuthentication allowAnonymousLogons="true" /&gt; &lt;/serviceCredentials&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;services&gt; &lt;service behaviorConfiguration="CentresInteretBehavior" name="CentresInteret"&gt; &lt;endpoint address="" binding="wsHttpBinding" contract="ICentresInteret" bindingConfiguration="NoSecurityBinding"&gt; &lt;identity&gt; &lt;dns value="localhost" /&gt; &lt;userPrincipalName value=".\ASPNET" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /&gt; &lt;/service&gt; &lt;/services&gt; &lt;/system.serviceModel&gt; </code></pre> <p>My app.config (client) has this (same thing : multiple WS, only one called) :</p> <pre><code>&lt;system.serviceModel&gt; &lt;bindings&gt; &lt;wsHttpBinding&gt; &lt;binding name="WSHttpBinding_ICentresInteret" closeTimeout="10:00:00" openTimeout="10:00:00" receiveTimeout="10:00:00" sendTimeout="10:00:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="20000000" maxReceivedMessageSize="20000000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="200000000" maxArrayLength="200000000" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="10:00:00" enabled="false" /&gt; &lt;security mode="None"&gt; &lt;transport clientCredentialType="Windows" proxyCredentialType="None" realm="" /&gt; &lt;message clientCredentialType="Windows" negotiateServiceCredential="false" algorithmSuite="Default" establishSecurityContext="true" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/wsHttpBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address="http://www.ourserver.com/WebServices/CentresInteret.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ICentresInteret" contract="CentresInteretService.ICentresInteret" name="WSHttpBinding_ICentresInteret"&gt; &lt;identity&gt; &lt;dns value="localhost" /&gt; &lt;userPrincipalName value=".\ASPNET" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; </code></pre> <p>The server trace gets me this, after just a few seconds (about 10-15) on the red line (please ask me if you need another line) :</p> <pre><code>&lt;E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent"&gt; &lt;System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system"&gt; &lt;EventID&gt;131076&lt;/EventID&gt; &lt;Type&gt;3&lt;/Type&gt; &lt;SubType Name="Error"&gt;0&lt;/SubType&gt; &lt;Level&gt;2&lt;/Level&gt; &lt;TimeCreated SystemTime="2011-11-28T17:46:26.6525694Z" /&gt; &lt;Source Name="System.ServiceModel" /&gt; &lt;Correlation ActivityID="{f624ff35-a8ae-4636-bd46-2138207af7a1}" /&gt; &lt;Execution ProcessName="w3wp" ProcessID="20424" ThreadID="7" /&gt; &lt;Channel /&gt; &lt;Computer&gt;SRV-WEB-01&lt;/Computer&gt; &lt;/System&gt; &lt;ApplicationData&gt; &lt;TraceData&gt; &lt;DataItem&gt; &lt;TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error"&gt; &lt;TraceIdentifier&gt;http://msdn.microsoft.com/fr-FR/library/System.ServiceModel.Diagnostics.TraceHandledException.aspx&lt;/TraceIdentifier&gt; &lt;Description&gt;Traitement d’une exception.&lt;/Description&gt; &lt;AppDomain&gt;/LM/W3SVC/4/ROOT-1-129669759749681489&lt;/AppDomain&gt; &lt;Exception&gt; &lt;ExceptionType&gt;System.Net.WebException, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/ExceptionType&gt; &lt;Message&gt;Le délai d'attente de l'opération a expiré.&lt;/Message&gt; &lt;StackTrace&gt; à System.Net.HttpWebRequest.GetResponse() à CentresInteret.RecupererContenuMail(Int32 contact_id, Int32 frequence_id, Int32 organisme_id) dans D:\...\App_Code\WebServices\CentresInteret.vb:ligne 181 à CentresInteret.GetEmails(Boolean PrendreEnCompteFrequence) dans D:\...\App_Code\WebServices\CentresInteret.vb:ligne 87 à SyncInvokeGetEmails(Object , Object[] , Object[] ) à System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp;amp;amp; outputs) à System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp;amp;amp; rpc) à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp;amp;amp; rpc) à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp;amp;amp; rpc) à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp;amp;amp; rpc) à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp;amp;amp; rpc) à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp;amp;amp; rpc) à System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) &lt;/StackTrace&gt; &lt;ExceptionString&gt; System.Net.WebException: Le délai d'attente de l'opération a expiré. à System.Net.HttpWebRequest.GetResponse() à CentresInteret.RecupererContenuMail(Int32 contact_id, Int32 frequence_id, Int32 organisme_id) dans D:\...\App_Code\WebServices\CentresInteret.vb:ligne 181 à CentresInteret.GetEmails(Boolean PrendreEnCompteFrequence) dans D:\...\App_Code\WebServices\CentresInteret.vb:ligne 87 à SyncInvokeGetEmails(Object , Object[] , Object[] ) à System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp;amp;amp; outputs) à System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp;amp;amp; rpc) à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp;amp;amp; rpc) à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&amp;amp;amp; rpc) à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&amp;amp;amp; rpc) à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&amp;amp;amp; rpc) à System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp;amp;amp; rpc) à System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) &lt;/ExceptionString&gt; &lt;/Exception&gt; &lt;/TraceRecord&gt; &lt;/DataItem&gt; &lt;/TraceData&gt; &lt;/ApplicationData&gt; &lt;/E2ETraceEvent&gt; </code></pre> <p>Please please pretty please, have an idea. I'm all out of them. And I'm going slightly mad.</p> <p>Thanks !</p> <p><strong>Edit</strong> : solved ! In CentresInteret.vb at line 181, there is :</p> <pre><code> Dim req As HttpWebRequest = WebRequest.Create(pageModele) req.Timeout = 10000 Dim resp As HttpWebResponse = req.GetResponse() ' throws the error </code></pre> <p>I added a zero in the timeout, and now it works ! Apparently, 10 seconds of timeout weren't enough...</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload