Note that there are some explanatory texts on larger screens.

plurals
  1. POerror on returning a class by wcf
    primarykey
    data
    text
    <p>I've been struggling with this error for a while:</p> <blockquote> <p>An error occurred while receiving the HTTP response to ....8332/Service1.svc. 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.</p> </blockquote> <p>I traced the error and apparently it's something to do with the binding or the connection that I can't figure out how to solve. ..I am putting the class and the config files below.please guide me.thanks in advance.</p> <pre><code> [DataContract] public class filepack { string filesize = "0"; int accesspermitid =0; System.IO.Stream str ; [DataMember] public System.IO.Stream Filestr { get { return str; } set { str = value; } } [DataMember] public string Filesize { get { return filesize; } set { filesize = value; } } [DataMember] public int Accesspermitid { get { return accesspermitid; } set { accesspermitid = value; } } } &lt;configuration&gt; &lt;startup&gt; &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /&gt; &lt;/startup&gt; &lt;system.serviceModel&gt; &lt;behaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="debugbeh"&gt; &lt;dataContractSerializer /&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;/behaviors&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="BasicHttpBinding_IService1" maxBufferSize="500000000" maxReceivedMessageSize="500000000"&gt; &lt;security mode="None"&gt; &lt;message algorithmSuite="Default" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address="http://localhost:8332/Service1.svc" behaviorConfiguration="debugbeh" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IService1" contract="vcpservice.IService1" name="BasicHttpBinding_IService1" /&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; &lt;?xml version="1.0"?&gt; &lt;configuration&gt; &lt;system.diagnostics&gt; &lt;trace autoflush="true" /&gt; &lt;sources&gt; &lt;source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true"&gt; &lt;listeners&gt; &lt;add name="sdt" type="System.Diagnostics.XmlWriterTraceListener" initializeData="c:\\logclientHOST.svclog" /&gt; &lt;/listeners&gt; &lt;/source&gt; &lt;/sources&gt; &lt;/system.diagnostics&gt; &lt;appSettings&gt; &lt;add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /&gt; &lt;/appSettings&gt; &lt;system.web&gt; &lt;compilation debug="true" targetFramework="4.5" /&gt; &lt;httpRuntime targetFramework="4.5"/&gt; &lt;/system.web&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;basicHttpBinding&gt; &lt;binding name="mybinding" closeTimeout="00:10:00" maxBufferPoolSize="52428800" maxBufferSize="500000000" maxReceivedMessageSize="500000000" /&gt; &lt;/basicHttpBinding&gt; &lt;/bindings&gt; &lt;diagnostics&gt; &lt;messageLogging logMalformedMessages="true" logMessagesAtTransportLevel="true" /&gt; &lt;/diagnostics&gt; &lt;behaviors&gt; &lt;endpointBehaviors&gt; &lt;behavior name="NewBehavior0"&gt; &lt;dataContractSerializer /&gt; &lt;/behavior&gt; &lt;/endpointBehaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name=""&gt; &lt;serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" httpGetBinding="webHttpBinding" httpGetBindingConfiguration="" /&gt; &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt; &lt;dataContractSerializer maxItemsInObjectGraph="2147483646" /&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;protocolMapping&gt; &lt;add binding="basicHttpsBinding" scheme="https" /&gt; &lt;/protocolMapping&gt; &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /&gt; &lt;/system.serviceModel&gt; &lt;system.webServer&gt; &lt;modules runAllManagedModulesForAllRequests="true"/&gt; &lt;!-- To browse web app root directory during debugging, set the value below to true. Set to false before deployment to avoid disclosing web app folder information. --&gt; &lt;directoryBrowse enabled="true"/&gt; &lt;/system.webServer&gt; &lt;/configuration&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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