wcf

Java WCF SOAPFaultException: Object reference not set to an instance of an object.

I'm attempting to communicate from a Java client to a .NET WCF service hosted in a Windows service on a remote machine. I'm able to access the wsdl file no problem, but when actually communicating, the remote function never gets called. Instead, I get the following error: Jul 28, 2010 2:32:51 PM org.apache.catalina.core.ApplicationCon...

How to change default WCF page returned in browser?

The old ASP.NET ASMX Web services used to produce a Web page that allowed a user to navigate to the various methods and invoke them (as long as the parameters were all simple types). WCF web services produce a much less useful page (You have created a service... blah, blah, blah...). My question is two part... Can I get WCF to produce ...

Can I prevent a specific datamember from being deserialized?

I have a datacontract like this [DataContract] class MyDC { [DataMember] public string DM1; [DataMember] public string DM2; [DataMember] public string DM3; } and sometimes I want to prevent DM2 from being deserialized when being returned from an OperationContract. Something like this: [OperationContact] pu...

wcf connection closed notification

I am setting up a nettcp WCF connection between a client and a server as a reliable session with a 7 day timeout. The client is monitoring a process on the server. Most of the activity is the service raising callbacks to the client. If the service crashes, how can the client detect this and display a "connection failed" message? Do I nee...

WCF Serialization

I have a class like so [DataContract] public MyClass { private string _Name; private bool _NameIsModified = false; public string Name; { get { return _Name; } set { _Name = value; _NameIsModified = true; } } } When a clients requests this class via a WCF service modifies the objects and sends it...

CallBack in WCF?

How we use CallBack in WCF fluently with events and delegates? If Client give any request or any conditions matches of client then services automatically fire the event which condition or request given from client. how is it possible? ...

WCF Store data in memory?

We use dictionary to store the data in memory but the data in memory is increased then exception fire of Fault stage. how to handle this problem. ----------IServices------------ [ServiceContract] public interface IMyService { [OperationContract()] Dictionary<int, Car> getCarList(); } ----------Services------------ public cla...

wcf forces chars escaping in response

Hi, All I want to return unescaped html in the WCF response, therefore I need CDATA section to be included in the response all the time. I realized I have no chance with DataContractSerializer. So I have tried to mark my operation with [XmlSerializerFormat] and implement IXmlSerializable in the response class. I see that my serializ...

What is the best way to store files in a (asp.net + wcf) web application

Hello everyone, I'm creating a web application using asp.net & WCF as 3 tier architecture, which is mostly looks like a social website. Users can register with the system and they can upload their profile images, documents, video clips etc. So, what i want to know is what is the best way to store those files? In the wcf side or web appli...

Why can't I trace just errors on the service side of my WCF?

I have a wcf service that sometimes creates errors like "The InnerException message was 'Maximum number of items that can be serialized or deserialized in an object graph is '65536'". I know how to fix this particular problem, but now I want to create a trace that saves only Errors (and Critical errors) to the log. The problem is that m...

what is service metadata and why it's necessary to publish?

There is ABC (addres, binding, contract) = endpoint. I thought this information is enough to communicate with clients and vice versa. But what is metadata and mex? ...

How to get rid of XmlIgnoreAttribute() when creating proxy dynamically from wsdl?

I am using WebClient to read wsdl from URI. WebClient client = new WebClient(); Stream wsdlStream = client.OpenRead(wsdlURI); ServiceDescription wsdl = ServiceDescription.Read(wsdlStream); Then I set Namespace and CompileUnit and use ServiceDescriptionImporter's GenerateCodeFromCompileUnit method to generate .cs class file. Then I co...

Copy the RequestMessage at IParameterInspector.BeforeCall() on WCF Service

Hi all, I have WCF service with IParameterInspector class which suppose to store the message for each incoming message. I need to extract values from the inputs parameters. In order to get the message I'm trying to access Blockquote OperationContext.Current.RequestContext.RequestMessage Blockquote and than call to CreateBuffe...

Dynamicaly add encrypted WCF message header

We can add Message header to WCF message by adding MessageHeader attribute like this [MessageContract] public class HelloResponseMessage { [MessageHeader(ProtectionLevel=EncryptAndSign)] public string SSN { get { return extra; } set { this.extra = value; } } } First question is, how secure is ...

WCF Async Calls Polling or Flagging - Best Practice

I'm working on this Silverlight 3.0 Project that is completely filled with Async Calls to a Web Service. At the Main Page it fetches some needed data in order for the application to work correctly using 3 Async Calls. Right now the application does not disable any controls while executing those calls meaning a user can interact with it w...

.NET Outlook Add-in and WCF/Inter-process communication

Hi, I need a tip/advice/recommendation. I'm finishing up a Outlook Add-in developed in C#. I would like this add-in to communication with another application (let's call it Client.exe). Client.exe and the add-in will always be running on the same computer. Client.exe is a single instance application. What would be the easiest/most c...

Duplex WCF service - Direct call and callback do not use same channel

Hi, My goal is to reach a WCF service behind a firewall with no incoming ports opened. The solution I chose is to host a duplex WCF service on the public side, that has as callback the same contract that was used if no firewall was involved. It worked if I used netTcpBinding but since I need streamed communication I had to use the cust...

WCF Authentication and Socket Aborted Exception

Hello, here's the setup for the project. I have a WCF Service that is hosted on a net.tcp binding in buffered mode and ReliableSession enabled. The binding is configured to use TransportWithMessageCredential security. The certificate is a self signed certificate that I am identifying using the Thumbprint. The UserNameValidator is a cu...

Where do I get my WCF service to handle X509 certificates? C#.NET

Hello all I've knocked up a WCFservice and a client. I also have a class to validated X509 certificates. Here is a snippet of the Web.config file of the service: <behavior name="HelloWorldWFC2.Service1Behavior"> <serviceCredentials> <serviceCertificate findValue="Service" x509FindType="FindBySubjectName" storeLocation=...

WCF Web service for automated xml request and response

I would like to create wcf web service for consuming third party webservice for accepting xml and responding to the xml request. ...