I was curious if someone could outline which types of WCF contract (interface) changes on the server side would break a client trying to send in a message, and why. I believe WCF can handle certain discrepancies, but I'm not sure exactly what you can change safely, and what you can't.
Add/remove parameters from an OperationContract?
A...
I am creating an application in which i made a WCF service and now a DataContract Class which have some DataMebers in the ServiceContract I am using that DataContract Class No I am able to access the operationContracts but now I want to access the DataMember of the DataContract Class in the silverligh XAML.CS page Please Suggest How
...
Hi there,
I am fairly new to WCF and just have a question on how to correctly get MessageContract inheritance working. A simplified version of my setup is as follows - a "base" message type, and then another "test" message which inherits from it.
[MessageContract]
public abstract class BaseMessage
{ }
[MessageContract]
public class Te...
Take for example a project with 10 services and 20 methods on each service.
All services inherit from a base services which has a security check. The first thing each method does is to make a call to the security check. This throws a security exception if there is a problem.
Question is: Do I need to specify a FaultContract on each met...
I have a WCF web service that has a method that returns a generic collection. Now, my question is: Should I expose it as ICollection<T>, List<T>, IList<T>, IEnumerable<T> or something else?
I suppose that List<T> is out of the question since I want to avoid CA1002 errors, but the underlying type will be a List<T>.
I am really interes...
Thus for used ajax enabled wcf services to get records from DB and display it in client without using AsyncPattern property of OperationContractAttribute....
When should i consider AsyncPattern property?
Sample of my operationcontract methods,
[OperationContract]
public string GetDesignationData()
{
DataSet dt = GetDes...
I have declared two service contracts as follows:
[ServiceContract]
public interface IContract1
{
[OperationContract]
double Add(int ip);
}
[ServiceContract]
public interface IContract2
{
[OperationContract]
double Add(double ip);
}
I have a class which implements these two contracts. I have created two endpoints for ...
I was wondering if it was better in WCF to use multiple operation contracts or to have only one operation contract with a polymorphic data contract.
Let me give you a small example :
[OperationContract]
action1Answer action1(action1data a);
[OperationContract]
action2Answer action2(action2data a);
or
[OperationContract]
actionAnswe...
I am currently looking to design some WCF services and wanted to get the community's opinion on the best way to handle operation / data contracts.
I have 2 basic operation contracts, the first creates a quote and the second adds an item to a quote (and calculates totals behind the scene).
The first takes in customer information and sto...
I've been given the task of creating a .net interface for a table that will be retrieved a database.
One of the obvious things that the interface must do is retrieve data from the table.
So.... I could write a function that simply does Select * from MyTable; and then returns the result. However, the table has ten columns and someone u...
Hi,
I wonder how I can specify a parameter of an OperationContract method in WCF as required so that the generated xsd contains minOccurs="1" instead of minOccurs="0".
Example:
[ServiceContract(Namespace = "http://myUrl.com")]
public interface IMyWebService
{
[OperationContract]
string DoSomething(string param1, string p...
Currently I have a service that uses a UserNamePasswordValidator to authenticate the client user. The code for the validation goes as follows:
public override void Validate(String userName, String password)
{
if (userName == null) || (password == null)
throw new FaultException("Username and/or password not specified....
Is it possible to read cookies in the OperationContract of a wcf service? I am trying to read a cookie value in the contract method, but its always empty. If I read the same cookie from a .aspx page, the value is present. Any ideas?
...
Here is a trivial example that is supposed to return "Hello World" string. However, a browser displays something like SGVsbG8gV29ybGQ=. Which is the right way to return plain text from an oldskul-style service?
please know that:
I can't return a string: three Unicode characters will be automatically prepended and the legacy HTTP clien...