Yes, a struct can be used as a DataContract. For example :-
[DataContract]
struct EmployeeInfo
{
[DataMember]
public int id;
[DataMember]
public string name;
[DataMember]
public DateTime joining_date;
}
Thanks and Regards
Akiii |
NOTE: This is objective type question, Please click question title for correct answer. |
No, SOAP envelope is not created in WebHttpBinding . The information is trasmitted through HTTP or HTTPS.
Thanks and Regards
Akiii |
NOTE: This is objective type question, Please click question title for correct answer. |
NOTE: This is objective type question, Please click question title for correct answer. |
NetNamedPipesBinding binding is used.
Thanks and Regards
Akiii |
ServiceHost s = new ServiceHost(typeof(EmployeeReservations));
s.AddEndpoint(typeof(EmployeeReservations), new BasicHttpBinding(),
"http://www.google.com/employee/emp.svc");
EmployeeReservations is the name of the contract.
http://www.google.com/employee/emp.svc is the address of the web service.
Thanks and Regards
Akiii |
|
Even though defining endpoints programmatically is possible, the most common approach
today is to use a configuration file associated with the service. Endpoint definitions embedded in code are difficult to change when a service is deployed, yet some endpoint characteristics, such as the address, are very likely to differ in different deployments. Defining endpoints in config files makes them easier to change, since changes don?t require modifying and recompiling the source code for the service class.
Thanks an Regards
Akiii |
Configuration information for all services implemented by a WCF-based application is
contained within the system.serviceModel element. This element contains a services element that can itself contain one or more service elements.
Thanks and Regards
Akiii |
To encrypt sensitive data in WCF configuration file, use aspnet_regiis.exe tool.
Example: If you want to encrypt Connection String section of WCF config file, use -pe that means provider encryption .
aspnet_regiis -pe "connectionStrings" -app "/MachineDPAPI"
-prov "DataProtectionConfigurationProvider"
-pe means provider encryption of configuration section.
-app means your application's virtual path.
-prov means provider name
For more info: http://msdn.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx |
NOTE: This is objective type question, Please click question title for correct answer. |
NOTE: This is objective type question, Please click question title for correct answer. |
WCF Data Services are used when you want to expose your data model and associated logic through a RESTful interface. It includes a full implementation of the Open Data (OData) Protocol for .NET to make this process very easy.
WCF Data Services was originally released as ‘ADO.NET Data Services’ with the release of .NET Framework 3.5.
Thanks and Regards
Akiii |
WCF One Way Contract are methods/operations which are invoked on the service by the client or the server in which either of them do not expect a reply back. For example :-
If a client invokes a method on the service then it will not expect a reply back from the service.
Thanks and Regards
Akiii |
One way contract is used to ensure that the WCF client does not go in a blocking mode . If your WCF operation contracts are returning nothing and they are doing some heavy process then it is better to use one way contract.
Thanks and Regards
Akiii |