Error is : The underlying connection was closed: The connection was closed unexpectedly.
[OperationContract] List<Vehicle_Master> GetVehicle();
public List<Vehicle_Master> GetVehicle() { //Configuration.ProxyCreationEnabled = false; var result = (from var in dcdc.Vehicle_Masters select var).ToList(); return result.ToList(); }
<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> <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment --> <servicemetadata httpgetenabled="true" /> <!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information --> <servicedebug includeexceptiondetailinfaults="false" /> </behavior> </servicebehaviors> </behaviors> <servicehostingenvironment multiplesitebindingsenabled="true" /> </system.servicemodel> <system.webserver> <modules runallmanagedmodulesforallrequests="true" /> </system.webserver> </configuration>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)