wcf

Creating an SPListItem in a WCF service deployed to SharePoint

Hi all, i have the following method in a WCF service, that has been deployed to SharePoint using Shail Malik's guide: [OperationContract] public string AddItem(string itemTitle, Guid? idOfListToUse) { using (var portal = new SPSite(SPContext.Current.Site.Url, SPContext.Current.Site.SystemAccount.UserToken)) { using (var web = po...

Is there a way to do TRUE bidirectional communications over a single TCP connection in WCF?

I have a WCF server that exposed an interface that has a call-back interface it uses to send events to the clients. I rather not mark all the methods on the call-back interface as “OneWay”, as it make error tracking and logging harder. The client is written in WinForms, so the call-backs will not be processes until after the call to t...

Problem with WCF services on IIS

Hi I created WCF service and run it on WebDevelopmentServer. It works fine. Than I moved it to IIS 5.1 on Windows XP SP3. And it stop working. I have error "CityService is not defined". It's not defined because of javascript is not found. on webdevelopment server this link is working and returns javascript code http://localhost:65424/C...

Can a WCF server expose more than one service over the same TCP port?

Can I expose more than one WCF service (interface) over the same port and have a single client connect to both services with different TCP connections? I need the two services to be independent of each other, so that the response to an outstanding message on the channel to one service does not get blocked by a call-back from the other s...

What WCF binding is most performant?

I have to get the maximum throughput performance in my WCF service. In one of my tests the service below got only 50k data items per minute using NetTcpBinding. Would a disconnected binding like NetMsmqBinding improve this performance? Service and client uses WCF and run in the same machine. [ServiceBehavior(InstanceContextMode = Insta...

Easy way to deploy new WCF services

About 3 months ago I made the switch from asmx services to WCF services, since then I've had my share of headaches, but I've stuck with it, but even as a seasoned developer deployment remains a problem. Typically I hand the solution over for deployment to consultants who are not developers with years of debugging experience behind them...

How should I handle queuing wcf messages?

I am implementing a WCF service based on a 3rd party WSDL. Rather than process the messages synchronously, I want to dump the xml into a database, and have it processed by another part process. Is using the WCF Message class directly the right way to go ab out this? Or should I just let WCF deserialize the message and the re-serialize...

WCF Service call to multiple rows. How to architecture it?

Hi, Let's say I have a scenario where I have a Service that is responsible for retrieving the price of a single product given the ID and another Service that gives me the current stock position of it. It's okay when I'm looking only at one product, but what about a list page where I have 60 products? What should I do in this case? Call...

Is there any way to do custom serialization in WCF?

In my WCF solution, the server doesn't need to know the data type. The client will send a type and receive the same type. For performance reasons I think I could implement serialization manually in the client proxy, avoiding WCF builtin serialization on the server side, but there is any way to achieve the same goal just configuring WCF ...

Problems with debugging in Silverlight 4 using Out of Browser and WCF RIA Services

With Visual stuido 2010, it's simple to set up SL4 to debug with an out-of-browser installed app. I followed the instructions from here and everything seems to set up fine. Debugging from the browser runs the program just fine, but running from the OOB program gives a different result. After starting, the screen will go blank and then...

Threads in WCF service

Hi, there is a piece of code: class WCFConsoleHostApp : IBank { private static int _instanceCounter; public WCFConsoleHostApp () { Interlocked.Increment(ref _instanceCounter); Console.WriteLine(string.Format("{0:T} Instance nr " + _instanceCounter + " created", DateTime.Now)); } private sta...

WCF and SQL Server: changes in DB are displayed only after app restarts

I'm developing a client-server app using WCF and Linq2Sql. My server-side program exposes to the clent an interface that provides methods of reading from and writing to my SQL Server DB. But when the client writes some date into DB, perhabs waites some time, and then tries to read that data from DB, it seems like no data has been written...

Problem integrating WCF with Sharp architecture

I'm working with an application which uses wcf and sharp architecture, I'm trying to create a service to write to the database. Here is my service: [ServiceContract] public interface IFacilitiesWcfService : ICloseableAndAbortable { [OperationContract] void AddFacility(string facility); } [AspNetCompatibilityRequirements(Requir...

C# generated proxy method different than original Java service method

Hi, I have a Java service that has the following method signature: @WebMethod(operationName = "getContactList") public MyListClass getContactList(@WebParam(name = "myList") MyListClass myList) throws IllegalArgumentException { return myList; } public class MyListClass implements Serializable{ Lis...

How to get data serializer used by WCF operation in runtime

Hi, Is there a chance to get a data contract serializer used by operation (DataContractSerializer/NetDataContractSerializer/XmlSerializer etc) in runtime (for instance using operation behaviour). What I want to achieve is to create some diagnostic code that would serialize messages (in message inspector) using currently attached seriali...

Public WCF service requires authentication, despite no security being specified

I have published a WCF service (MyService.svc) on an ASP.NET site, in a sub-folder called WebServices. When running on the local ASP.NET web server it works fine. When published to an IIS-run site and I try to access, for example, /WebServices/MyService.svc/jsdebug, I get 401 Unauthorized. The rest of the site works fine. Does anyone h...

Masking sensitive information when logging from IClientMessageInspector

I'm using WCF (.NET 3.5) to communicate with a server using SOAP. When running in debug mode, I use System.ServiceMode.Dispatcher.IClientMessageInspector and log4Net to log the request content. public object BeforeSendRequest(ref Message request, IClientChannel channel) { log.Debug(request); } My difficulty is that sometimes t...

asp.net Ajax Timer to poll a WCF service

I am using a asp:Timer control to poll a service every 10 seconds. I know the timer is working as if I comment out the service call the time will update the panel perfectly. However when the service call is enabled the timer will update the panel a few times correctly but then it will start to hang. I believe it's due to a bottle neck...

How to ensure that the WCF ChannelFactory uses Binding settings in xml configuration (MaxArrayLength is ignored)

How to ensure that the WCF ChannelFactory uses Binding settings in xml configuration (MaxArrayLength is ignored) Hi, I am new to Wcf and and writing my first Wcf service and client. I prefer not to use tools to generate config; I would rather write the config myself. The problem I am trying to solve is of a client communicating with a s...

WCF services using the same port from different processes?

I know you can create multiple services on the same port within a single process. We have the situation where we are assigned a port to use for all traffic but the architecture doesn't currently support starting all wcf services from a single process. Obviously, all services have different endpoint addresses. Is there a way to add mult...