1.Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proy, restoring to default configuration, or refreshing the service.
Error is : The underlying connection was closed: The connection was closed unexpectedly.
this is my 3 file...
Iservice1.cs
[OperationContract]
List<Vehicle_Master> GetVehicle();
Service1.svc.cs
public List<Vehicle_Master> GetVehicle()
{
//Configuration.ProxyCreationEnabled = false;
var result = (from var in dcdc.Vehicle_Masters select var).ToList();
return result.ToList();
}
Web.config
<configuration>
<connectionstrings>
<add name="Database1ConnectionString1" connectionstring="Data Source=najar-pc\sqlexpress;Initial Catalog=Database1;Integrated Security=True">
providerName="System.Data.SqlClient" />
</add></connectionstrings>
<system.web>
<compilation debug="true" targetframework="4.0" />
</system.web>
<system.servicemodel>
<behaviors>
<servicebehaviors>
<behavior>
<!--
<servicemetadata httpgetenabled="true" />
<!--
<servicedebug includeexceptiondetailinfaults="false" />
</behavior>
</servicebehaviors>
</behaviors>
<servicehostingenvironment multiplesitebindingsenabled="true" />
</system.servicemodel>
<system.webserver>
<modules runallmanagedmodulesforallrequests="true" />
</system.webserver>
</configuration>
I have spend so much time but i have not solve it. please help me..