wcf

how to use the IDataContractSurrogate for sending System.Net.Mail.MailMessage in WCF?

Hello, Can someone guide me towards implementing the IDataContractSurrogate for the MailMessage class in .Net Framework? I'm currently trying to pass the MailMessage class as an object and it doesn't work...it throws the following exception... Type 'System.Net.Mail.MailAddress' cannot be serialized. Consider marking it with the...

Windows authentication in Java

Hi, I am developing a java application (running on a Linux server) that needs to connect to a .net WCF web service configured to use Windows authentication only. It seems to work fine when I run the app on my Windows desktop. Is there any way to make it work from the Linux server? ...

Get empty objects over WCF with entity framework

Hi! I've a WCF Service, that uses entity framework (with POCO objects). One methods returns a list of users. It was working correctly, but another method cannot insert anything because the database wasn't having "IDENTIY" setted on the primary key. Since I've done that, regenerate the EDMX model, I've a problem to get my list of user...

Impersonation using WCF

Hi, I am trying to expose via WCF Web services, functions that access SQL server (via Entity Framework) using the user's credentials (this is a client/dba requirement because of audit triggers etc. Gave up trying to convince them not to use user's credentials) I am having trouble getting WCF to implement impersonation. (in fact its bee...

How to create java client using AXis 1.4 for consuming WCF service using wsHttpBinding

Hi, I have created a java client for consuming WCF service using axis 1.4. If i use basicHttpBinding than everything works fine, but if i use wsHttpBinding than i am getting following error:- Did not understand "MustUnderstand" header(s):{http://www.w3.org/2005/08/addressing}Action AxisFault faultCode: {http://www.w3.org/2003/05/soap-...

Will WCF automatically encode my XML conent?

E.g. the WCF Service creates an XDocument with an element like this: string content = &lt;Wibble&gt"; XDocument message = new XDocument( new XELement("ElName", content) ); Our clients are stating that they get the above back as: <ElName><Wibble></ElName> We've not found any decode code in our WCF service or their client code. I t...

WPF, Entity Framework, and SQLCE

Hi all I'm developing a WPF application, and some guidance would be appreciated. The application needs to store some data locally. The data doesn't need to be shared, but multiple users can log into the application, each with a different profile. Can anyone advise me on the wisdom of using the Entity Framework 4.0 with SQLCE in this con...

wcf service, IIS timing out upon response

Here is the exact issue: I have a client app calling a wcf service, in both the client app and the wcf service i have set the time outs to be over 3 hrs. when the service runs about 20 min there is no issue but more than than it times out in a weird way. I started debugging the service to see what actually happens since the time outs s...

Can WCF be used to have a REST API URL like http://yourhost.com/{service-contract}.{binding}?op={target-method}?

I'm wondering if I can use WCF so that the client can set the appropriate binding by just changing the URL. Some examples: URL: http://yourhost.com/orders.json?op=getall Description: get all orders as JSON. URL: http://yourhost.com/orders.xml?op=getall Description: get all orders as XML. URL: http://yourhost.com/orders.soap?op=get...

Use RequiresRole in RIA Services for DataForm commands

So I have a DataForm in my WCF RIA Services application. I want all authenticated users to be able to cycle through the data. I want people of role Edit to be able to Edit and Add entries and people with role Delete to be able to delete entries. I'm unsure how to accomplish this. The best I can think of is in the initialization to c...

WCFTestClient - how can I add username and pass?

Hi All, I'm using the WCFTestClient to debug a service. This normally works like a charm. This particular service is using SSL and I need to pass the user name and password. I can right click and edit the config file, but I do not see a place where I can inject the user name and password. On the normal client app for this service, we pro...

static ChannelFactory in Global.asax.cs throws CommunicationObjectFaultedException

Hello, I am using the following code in my Global.asax.cs file: public static readonly IMyCommunicationService GlobalCommunicationChannel = new ChannelFactory<IMyCommunicationService>("NetTcpBinding_IMyCommunicationService").CreateChannel(); From every website I am accessing the static var "GlobalCommunicationChannel". That ...

WCF & ASP.NET Membership Provider

I know for WCF to work with a membership provider you have to explicitly configure it: (e.g. http://www.codewrecks.com/blog/index.php/2009/09/08/use-aspnet-membership-provider-with-a-wcf-svc-service/) But if you already have the ASP.NET site using it, can't you prevent anonymous access to the service simply by doing the following? <l...

Workflow 4.0, WCF and non-"WCF Workflow Service" definitions

Is it possible to create a WCF workflow using the standard (Activity template) Workflow activity templates? And, if so, where can I find some samples that DO NOT use the standard WCF service template (WCF Workflow Service template)? Explanation: I'm trying to discover, load and run workflows at runtime, including workflows with WCF ac...

RESTful web services

I am new to RESTful web services. We are taking the REST route for building our public web services to be consumed by out clients.And i had a few questions. Are there any kind of limitation with pure REST webs services? and if yes then would a hybrid REST web service take care of those limitations? I am thinking about using SSL + Hash...

WCF: How do you handle the UnknownMessageReceived message?

Currently I have this: Private Sub AamServiceHost_UnknownMessageReceived(ByVal sender As Object, ByVal e As UnknownMessageReceivedEventArgs) Handles Me.UnknownMessageReceived m_Log.Write(m_Name & " has received an unknown message. The message will be ignored.", Severity.ErrorTaskFailed) End Sub I see there is a e.Message propert...

What is WCF? and what can it do?

I looked up WCF and i cant exactly figured out what it is. I found this page and it seems to be a way for an app to allow other applications to call functions. Sort of loading a DLL and calling functions but using TCP instead and not loading a DLL but forcing a user to run an app. I am still confused about it. Can someone explain what i...

Datacontact for Castle.Proxies.EntityProxy failed

How to send Castle.Proxies.EntityProxy via WCF Channel? How to set the proxy as KnownType? ...

Asynchronous WCF Web Service Load Testing

I see several other questions about load testing web services. But as far as I can tell those are all synchronous load testing tools. (Meaning they send a ton of requests but the go one at a time.) I am looking for a tool where I can say, "I want 100 requests to be launched at the exact same time". Now, I am new to the whole load tes...

How can I detect WCF breaking changes in my CI build

I want to automatically test if my WCF operation and data contracts have breaking changes between CI builds. EDIT: I am thinking of this as an automated integration test. Additive changes to the WCF contracts should not fail the test. Breaking changes should fail the test. I want to know the moment its broken. Additive changes don't br...