<system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="RestBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceDebug includeExceptionDetailInFaults="true"/> <dataContractSerializer maxItemsInObjectGraph="2147483647"/> </behavior> </serviceBehaviors> </behaviors> <services> <service name="WcfService1.Service1" behaviorConfiguration="RestBehavior"> <endpoint address="" binding="webHttpBinding" contract="WcfService1.IService1"></endpoint> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" ></endpoint> </service> </services> <protocolMapping> <add binding="webHttpBinding" scheme="https" /> </protocolMapping> <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" /> </system.serviceModel>
//USed to make request to URI WebRequest myRequest = WebRequest.Create("http://localhost:50715/Service1.svc/GetAllEmployee"); //Provides response from a URI. WebResponse myResponse = myRequest.GetResponse(); //USed to Serialize and Deserialize instance of a type into an XML stream DataContractSerializer RecData = new DataContractSerializer(typeof(List<clsDataContracts.clsEmployee>)); var CollectionEmployees = RecData.ReadObject(myResponse.GetResponseStream()); this.lstEmpData.DataContext = CollectionEmployees;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)