0

it makes me crazy I can't find the reason please some help

 public FMS_FrameWork.Driver[] GetDrivers(int companyid)
    {
       return base.Channel.GetDrivers(companyid);
    }



[WebException: The underlying connection was closed: The connection was closed unexpectedly.]
   System.Net.HttpWebRequest.GetResponse() +6594148
   System.ServiceModel.Channels.HttpChannelRequest.WaitForReply(TimeSpan timeout) +55

[CommunicationException: The underlying connection was closed: The connection was closed unexpectedly.]
   System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) +10992363
   System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) +336
   FMS_FrameWork.ICommonServices.GetDrivers(Int32 companyid) +0
   FMS_FrameWork.CommonServicesClient.GetDrivers(Int32 companyid) in f:\FMS-Portal\PORTAL\App_Code\CommonSerivcesProxy.cs:1550
   Pages_Driver.checkSession() in f:\FMS-Portal\PORTAL\Pages\Driver.aspx.cs:21
   Pages_Driver.Page_Load(Object sender, EventArgs e) in f:\FMS-Portal\PORTAL\Pages\Driver.aspx.cs:45
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +92
   System.Web.UI.Control.LoadRecursive() +54
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772

here is my web.config for the servic

  <configuration>
    <system.web>
      <compilation debug="true" targetFramework="4.5" />
      <httpRuntime targetFramework="4.5" />
    </system.web>

    <system.serviceModel>
        <behaviors>
            <serviceBehaviors>
                <behavior name="">
                    <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
                    <serviceDebug includeExceptionDetailInFaults="false" />
                </behavior>
            </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
            multipleSiteBindingsEnabled="true" />
    </system.serviceModel>
</configuration>

and this is for the client and it is a website project

 <configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
  </system.web>
  <system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="debuggingBehaviour">
          <dataContractSerializer />
        </behavior>
      </endpointBehaviors>
    </behaviors>

    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_ICommonServices"/>
      </basicHttpBinding>
    </bindings>

    <client>
      <endpoint address="http://localhost:9090/Services/CommonServices.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICommonServices" contract="FMS_FrameWork.ICommonServices" name="BasicHttpBinding_ICommonServices" behaviorConfiguration="debuggingBehaviour"/>
    </client>

  </system.serviceModel>
</configuration>

what can I do to kick out this exception and my database is empty

  • 1
    Have you put any [effort](http://stackoverflow.com/questions/1459475/system-net-webexception-the-underlying-connection-was-closed-the-connection-wa?rq=1) [into](http://stackoverflow.com/questions/4259639/underlying-connection-closed-on-httpwebrequest-post-on-production-server?rq=1) [any](http://stackoverflow.com/questions/13188058/httpwebrequest-the-underlying-connection-was-closed?rq=1) [research](http://stackoverflow.com/questions/14487528/the-underlying-connection-was-closed-the-connection-was-closed-unexpectedly?rq=1)? It seems like this has been resolved here before. :) – Jon May 07 '15 at 13:44
  • yes i search a lot for solution to this problem but nothing resolve it,it makes me crazy – user3776705 May 10 '15 at 06:11

0 Answers0