Hi All,
I am unit testing a WCF service.
The flow goes like this.
Application(Client) insert command to the DB through Webservice1. This is done using duplex pattern.(with callbacks).
WebService1 inserts the command to DB and this Webservice1 invokes another webservice2 about the arrival of new command.(Duplex pattern).
Webservice2 ...
I have a service that implement the Async pattern:
[OperationContract(AsyncPattern = true)]
IAsyncResult BeginLoadDocument(Byte[] value, AsyncCallback callback, object state);
Boolean EndLoadDocument(IAsyncResult asyncResult);
The "BeginLoadDocument" run a private method "CallBack" in the service side using a ThreadPool:
public IAsy...
I'm considering to host WCF Rest Service that i've built on IIS 7. The URL to access my service will be something like
api.mycompany.com/applicationName/Service.svc/users/1347
Recently, i've been looking to some REST API implementation with a clean URL like Yahoo API
social.yahooapis.com/v1/user/{guid}/contacts
I'm wondering what wi...
Hey,
I have services on my application and when I test it on localhost everuthing was ok. But when I publish it I have problem with base Address property. What should I put there ?
My web.config part:
<services>
<service name="WcfService1.Service1" behaviorConfiguration="metadataBehavior">
<endpoint address="" binding="basicHttpB...
I'm a little unclear on what the proper way is to use DuplexChannelFactory in WCF. Following from convention, I have explicit Connect/Disconnect methods on my service contract to aid in management of the proxies, but I'm a little unclear as to what the client should be doing.
Here's my impression of how things work. When initiating the ...
With an object like this:
[DataContract]
public class SampleItem
{
private int _id;
[DataMember(IsRequired = true)]
public int Id
{
get { return _id; }
set { _id = value; }
}
private string _stringValue;
[DataMember()]
pu...
We are providing WCF services to various clients, one of them is getting the following error. After googled, I found that since client exceeded its idle time, they have to regenerate the proxy again in order to make another call. Now my question, My understanding of this problem is correct? How to make service call withour regenerating t...
Hi,
I have two instances of a WCF service exposing NetTcpBinding endpoints in the application tier, which are consumed by the application tier (heavy traffic website). I need to load balanced these instances under a single VIP. Considering the tcpNet connection pooling, it is recommended to configure the load-balancer as sticky IP, and...
I've been looking for this answer, and all I found was this link, but when I attempted to follow the tutorial I failed hard. What I need is to connect my Silverlight application to a database, just to show informations from a specific table. As I don't want to use the same ORM for my page and my silverlight app, I created a new WCF webse...
Hi All,
I have a wcf service hosted in iis. The endpoint uses wsHttpBinding.
I have a lot of clients that are using the service.
The internet connection is unstable.
The clients uses the service to insert data in db.
What is the best practice of exception handling in the client.
Is it good choise to use the using statemen and initi...
We currently have a WCF Service which is beginning to reach it's limits performance wise.
We have decided to add another server which will host another instance of the WCF Service.
We have web applications which must communicate with a specific server based on context... e.g. If the web application is dealing with objects from ServiceI...
I have a WCF server using a netTcpBinding and a client. When I run them locally they work fine.
If I put the server on a Windows Server 2008 machine and try to run it, it fails unless I change the address to localhost, but no clients can connect to it.
I can run the client from the server to connect to a Windows Xp machine running th...
I have a simple WCF service that we are developing... We are hosting in IIS7 on WinServer2k8 (though i cant get it to work in IIS7 on Win7 either)
I want multiple endpoints for the same service contract but have the endpoints behave differently. For example I want one endpoint to return data as XML and another to return data in SOAP mes...
I'm using SAML 2.0 and have figured out how to add my token to the soap header when using transport security (https) - see this post, but now I need to do this over http without the digital signature on the SAML token. When i use this binding:
private static System.ServiceModel.Channels.Binding BuildCustomBindingPIX_SAML()
{
...
I have a net.tcp WCF service, and I would like the OS to pick the port that it should listen on. So I have set the port to 0 in my URI, and netstat confirms that the OS has picked a port in the 5000 range.
How can I find the actual port that has been picked, in code, inside the service process?
Some code to show what I have tried:
Ty...
Hi All,
I Need by service contract to return the xml/json result depending on the request type.I also need a kind of helper function which will convert my result set (i am using linq to sql) so that i do not need to create the xml format for the result set by iterating through the table row many times.What is the suitable way to do that...
What are possible options to transfer a lot of data from one computer to another not in the same LAN. The amount of data is about 100Mb unzipped and 2Mb zipped? Another requirement is that when I create a server for this (with C#) Java clients should be able to consume it.
Does WCF support something like this? But if Java clients won't...
Hi All,
I have a wcf client.
What is the best way of handling connections ?
Is it to open and close every time you need to contact the service:
void doSomething(){
MyService service = new MyService();
//try
service.doThis(10);
...
service.doThat(20);
service.Close()
// catch
}
Or should I...
What is the best workflow taken when connection error occurs.
Let say we have a client that connects to the middle tier.
class MyClient{
...
void callServer(){
try{
middletier.saveRecord(123);
}catch(...){
// log the error
// what to do next (notify the user, take the same step again)?
...
Hi All
I'm using a custom message that inherits the System.Servicemodel.Channels.Message.
My custom message get IEnumerable collection which pulled from a database.
The WCF service is transactional (which is already tested).
MS-DTC is enabled.
Problem is, that when the protected override void OnWriteBodyContents(XmlDictionaryWriter...