Showing posts with label WCF Service. Show all posts
Showing posts with label WCF Service. Show all posts

You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent.

Step1: before using WCF serive you have to add  Two XML files in C:\Inetpub\wwwroot

1. clientaccesspolicy.xml :


2. crossdomain.xml:

Proceed Further..

by Asp.net-C#.Net · 0

The type 'Systemat.Software.Services.PopsyWS.PopsyWebService',


You need to add a reference in the web site project to the WCF project.


Publish and check the out put



Proceed Further..

by Asp.net-C#.Net · 0

Unable to cast object of type 'System.Data.Linq.DataQuery`1[Customer]' to type 'System.Data.D...

Depending on your requirements and current implementation, you could also return a list of your custom type (Customers) - that will also change:

- your method signature
- references to that method and your code that processes a DataTable instead, at the receiving end
..as such these are part of a larger 'layer' etc
Re: Unable to cast object of type 'System.Data.Linq.DataQuery`1[Customer]' to type 'System.Data.D...

Proceed Further..

by Asp.net-C#.Net · 0

How can we do security in WCF?

In WCF there are two types of Security, transport level security and message level security.

Transport Security: Transport level security happens at the channel level. Transport level security is the easiest to implement as it happens at the communication level. WCF uses transport protocols like TCP, HTTP, MSMQ etc and every of these protocols have their own security mechanisms. One of the common implementation of transport level security is HTTPS. HTTPS is implemented over HTTP protocols with SSL providing the security mechanism. No coding change is required it’s more of using the existing security mechanism provided by the protocol.

Proceed Further..

by Asp.net-C#.Net · 0

DataContract and DataMember in WCF


A data contract is an abstract description of a set of fields with a name and data type for each field. The data contract exists outside of any single implementation to allow services on different platforms to interoperate. 

A data contract is a formal agreement between a service and a client that abstractly describes the data to be exchanged.

We need to include System.Runtime.Serialization reference to the project. This assembly holds the DataContract and DataMember attribute.

Proceed Further..

by Asp.net-C#.Net · 0

what is service contract and operation contract in WCF

In WCF Service contract means ,it is the name of the attribute which is applied to an interface in a WCF service which is similar to the [WebServcie] attribute in the Webservice. 

Where as, Operation Contract means it is the name of the attribute which is applied to a method inside the interface of a wcf service which is similar to the [WebMethod] in WebService. 


Proceed Further..

by Asp.net-C#.Net · 0

Configure the WCF Service to Use basicHttpBinding

In this step, you configure your WCF service endpoint to use basicHttpBinding.
  1. Right-click the Web.config file of the WCF service and then click Edit WCF Configuration.
If you do not see the Edit WCF Configuration option, on the Tools menu, click WCF Service Configuration Editor. Close the WCF Service Configuration Editor tool that appears. The option should now appear on the web.config context menu.

Proceed Further..

by Asp.net-C#.Net · 0

Choosing the right WCF binding


Choosing the right WCF binding
A WCF binding is the endpoint component that defines how the client needs to communicate with the service. It groups settings such as underlying transport protocol, security requirements, and message encoding.

Proceed Further..

by Asp.net-C#.Net · 0

Choosing EndPoint Bindings In WCF

  • If you require your service to be consumed by clients compatible with SOAP 1.1, use basicHttpBinding for interoperability
  • If you require your service to be consumed within the corporate network, use netTCPBinding for performance
  • If you require your service to be consumed over the internet and the client is a WCF compatible, use wsHttpBinding to reap full benefits of WS* specifications
  • If you require your service to be accessible only in the same machine, use netNamedPipeBinding
  • If you require your service to be queue messages, use netMsmqBinding
  • If you require your service to act as server as well as client in a peer to peer environment, utilise netPeerTcpBinding setting

by Asp.net-C#.Net · 0

WCF Service Binding


Before we learn the ABC of WCF, we need to know how a WCF service is made accessible to the clients.

A WCF service allows communication through an Endpoint. And the endpoint is the only point of communication of the WCF service that enables message exchange with the client as shown in Fig 1.


Proceed Further..

by Asp.net-C#.Net · 0

WCF vs ASP.NET Web services


Introduction
In this post I will explain the Difference between ASP.NET web service and programming WCF services like ASP.NET web services. It also discusses how we use the both technologies for developing the web services.
The development of web service with ASP.NET relies on defining data  and relies on the XmlSerializer to transform data to or from a service.
Key issues with XmlSerializer to serialize .NET types to XML
§  Only Public fields or Properties of .NET types can be translated into XML.
§  Only the classes which implement IEnumerable interface.
§  Classes that implement the IDictionary interface, such as Hash table can not be serialized.
The WCF uses the DataContractAttribute and DataMemeberAttribute to translate .NET FW types in to XML.

Proceed Further..

by Asp.net-C#.Net · 0

WCF InterviewQuestions




What is WCF?

Windows Communication Foundation (WCF) is an SDK for developing and deploying services on Windows. WCF provides a runtime environment for services, enabling you to expose CLR types as services, and to consume other services as CLR types.

WCF is part of .NET 3.0 and requires .NET 2.0, so it can only run on systems that support it.

Proceed Further..

by Asp.net-C#.Net · 0

Labels

Topics