wcf

What is a good way to structure my webapp object model?

I'm struggling to decide on a good way to structure my object model / web services in a webapp I'm working on. We have a common issue where different pages need a slightly different view of a standard object. For example, we have Team and an Organization types where an Organization can have one-to-many Teams. On one page all I need is...

Exposing WCF Services Via HTTP when not hosted in IIS

Like the title says, we need to set up WCF services between a .NET app, and a Adobe AIR app. We don't want to run IIS on the machine, and would much prefer to install and run the WCF services hosted within a windows service. However, I am uncertain of doing that will let us use HTTP as the transport, of does that only work within IIS? I...

Unity: Using same datacontext in application_BeginRequest?

Hi there, Previously i managed to setup my unity to provide a new DataContext each time to my Repository project. It works great. But for example, I am in a WCF method which opens up 2 services which in turn opens up 2 repositories (repository pattern).. i was hoping to be able to reuse the same datacontext within the same wcf method....

WCF ChannelFactory vs generating proxy

Hi, Just wondering under what circumstances would you prefer to generate a proxy from a WCF service when you can just invoke calls using the ChannelFactory? This way you wont have to generate a proxy and worry about regenerating a proxy whne the server is updated? Thanks ...

Swapping ASP.NET DataProvider from RDBMS to WCF

I have a client that is pushing for all data access to go over SOAP web services. No, I don't know why; I guess they like to keep their processors warm with all the XML building and parsing. Anyway... I have to move an existing web app programmed using a DataProvider on Oracle to WCF. I haven't written the web service yet. Are their any ...

WCF: Managing loads of hosting console apps!

Hi there, I now have a scenario where I have 6 console apps on my server which each host a WCF service. It's getting messy and I am now thinking about having a windows app (probably WPF) which hosts each service in a separate thread. This would mean there's a central place to manage the services as well. I'm just wondering if anyone h...

WCF Callback implementation: Service is consistently returning a null operation context

I'm currently attemping to display the progress of an SSIS package that's running on the server by implementing a callback in WCF. This is working to a point; basically the OperationContext.Current is returning null after a few listener events have already happened (roughly 30 seconds after the initial SSIS package execute call). Here's...

is wcf rest weboperationcontext.current thread safe?

Hi, I'm currently returning a stream from all my WebGet/WebInvoke decorated methods from WCF. And I also get a stream as input. I do this because I want flexibility with response & input content types. This is primarily because I need flexibility when parsing the input - it cannot be easily serialized / deserialized. However I then use...

WCF client certificare not valid

I try to send a message to MSMQ using WCF. I want to use Transport security and sign messages. However, when I set clientcertificate credentials and try to send message, an error is being thrown: "An error occurred while sending to the queue: The user certificate is invalid. (-1072824276, 0xc00e002c)". Certificate is stored in LocalMachi...

Unable to host WCF service correctly in IIS7

I have a WCF Service library written in .NET 4.0. I have a WCF application (in order to host this service in IIS) within the same solution. It contains the WCF library assembly reference and a service.svc file pointing to the service from the library along with a web.config that is a replica of the WCF service library's app.config. The W...

.net windows service as a state server

Hi there, i'd like to create a windows service that would be accessible via WCF from a web application. The workflow would be: Windows Service starts and would hold a default value in memory. A web app would connect the windows service via wcf and take the value and after some processing set the value back in the memory. In a while wo...

Performance implications of turning MTOM on for a WCF service

Would there be any noticeable performance hit if MTOM is turned on for a WCF service that isn't actually transferring any binary over the wire? ...

Hooking into the Transport layer of WCF

I want to prepend the following text to the response body of a WCF operation: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="transform.xslt" type="text/xsl" ?> Problem is that the Message class uses XML Readers and Writers to specify the contents of the message. Inserting this text as the first line after the tag makes...

WCF FluentNhibernate Session managment and cache

hello, i'm trying to understand how and if its possible to keep a session open on a wcf service. the problem is that if i select an entity and pass it to the client and than return it to the server with the same session, i get an exception cause session dont know this entity any more (the reference changed because of wcf). so i have t...

WCF AddServiceReference causing custom tool error, not producing proxy

A problem with "Add Service Reference", and actually with SvcUtil over all its features. In order to reproduce you just need to add an OperationContract with argument or returning the following class : [XmlSchemaProvider("MySchema")] public class MyStructure : IXmlSerializable { private XmlElement e; private static void Func(ob...

Control over wcf proxy class name generated using svcutil.exe

Is there a simple command line switch or a trick to renaming the generated class name when running svcutil.exe to generate a client proxy? ...

How does a WCF server inform a WCF client about changes? (Better solution then simple polling, e.g. Comet or long polling)

see also "WCF push to client through firewall" I need to have a WCF client that connect to a WCF server, then when some of the data changes on the server the clients need to update its display. As there is likely to be a firewall between the clients and the server. All communications must be over HTTP The server can not make an...

WCF service certificate and client side endpoint identity - why it doesn't work?

[Update] - I attach also full config files, for service, and for client (outside of here, not to flood the topic) I'm having situation pretty much identical to the one outlined in this question, however my question is somewhat different. I'm using NetTcpBinding with security set to TransportWithMessageCredential I'm using Password/Use...

How do I setup a project to use WcfSvcHost.exe and WcfTestClient.exe

I am trying to write my first WCF project. I have created a project of type WCF library. In the video I am working from, when F5 is pressed (start debugger) the WCF test client starts up. What do I have to do to my project settings to get the WcfTestClient to start up? ...

Deploying a TCP based WCF service, that's hosted in a Windows service

I've finished writing a WCF service that uses TCP. It is meant to run on a Windows 2003 Server, which doesn't have WAS available, so I've written a Windows service to host my WCF service. It works great on my development machine. Now, how do I get these two services onto the Windows 2003 Server? Do I just copy the WCF service there a...