Is it a good practice to define DataContracts in an enterprise level assembly and then reference them in WCF service projects as opposed to defining them at the individual WCF service solution level? All of the WCF examples that I have seen have avoided that topic and have only defined DataContracts in the service solution. Some programm...
A common issue for WCF appears to be how the hostname is resolved within the wsdl for the links to other files. The issue is that the machine name of the computer is placed into the wsdl to link the other wsdl files, so if you visit http://myhost/service.svc it may point to the rest of the wsdl on another location, ie http://mypc/service...
We're using about 7 services at the moment. There quite large.
Does anyone have any experience with the single responsibility principle and WCF services? Does this mean that you'll end up with lot's of small contracts? If so, how do you manage these in your application?
...
I have a C# WCF REST Service which allows the addition of a bookmark, by sending an HTTP POST request with the bookmark serialised in XML. I have specified the operation contract for the service, which picks up the xml and automatically deserialises the object for me. My problem is that the deserialisation only works correctly if the XML...
I need to make calls to a legacy SOAP API that only supports DIME, but DIME is not supported in WSE 3.0.
Unfortunately, WSE 2.0, which supports DIME, is not supported in conjunction with Visual Studio 2005.
I understand the reasons for moving to MTOM, but the need to communicate with legacy services does not disappear because a new sta...
Hi,
My wcf service's web.config looks like this:
How can I confirm that it is using the settings correctly?
I still get this timeout error sometimes even though I have configured the binding to use:
SendTimeout = 10 minutes etc. ?
<system.serviceModel>
<services>
<service behaviorConfiguration="MyService.MyServiceBehavior"...
What are the best practices for handling security i.e. Authorization and Authentication in Web Application?
I am working on a web application, using WCF as SOA, there are more chances that in future individual component in my application can be integrated with some third party application. I am looking for a solution by which I can hand...
I've got some RESTful services running in a pure WCF context (i.e. ASP.NET compatibility is not enabled, and thus there is no HttpContext.Current object available).
The URLs to the services are rewritten at the start of the request using an IHttpModule (which at that point does have an HttpContext and rewrites it using HttpContext.Curre...
I have a legacy service I'm looking to update to WCF and one of it's behaviours is to allow clients to POST a request that has something like:
MyService.asmx/ProcessDocument
With Post data looking like:
request=<big block of xml>
Now in the ASMX days this service accepted a single string parameter i.e:
public void ProcessDocument(st...
Hi,
what user account does my .net wcf service run under when I am hosting it in iis 7?
Is it the IUSR_machine account?
What is the easiest way for me to run under a different account? (just for this service, don't want other things hosted in my IIS to be effected).
...
I'm trying to come up with a simple, easy to use design pattern for error handling in a .net wcf service (specifically a silverlight enabled wcf service). If an exception gets thrown in the service method the silverlight application will see a CommunicationException stating "The remote server returned an error: NotFound ---> " and possib...
I'd like to setup a WCF service to send emails. The System.Net.MailMessage doesn't seem to be serializable, and cannot be passed in a [DataContract]
The error I receive is
Type 'System.Net.Mail.MailAddress'
cannot be serialized. Consider marking
it with the DataContractAttribute
Any suggestions?
...
Hi,
Does hosting a WCF service require any special configuration on IIS6?
...
While I can find lots of article advocating SOA, or WCF, my question is that what should not be exposed as service, is there any lessen that we learn from SOA failure. WCF is a way to implementing SOA, if we use WCF, does that means we are implementing SOA. For sure there are lots people using C# writing unmaintainable code.
Thanks
Fred...
Hi,
I have a WCF service which works 100% in the synchronous (blocking) mode and I now need to rework a call so that it uses the async pattern.
The service uses authentication and performs a chunked file transfer from client to server so I have reworked it to use the 'Begin' async prefix to kick off the call.
Now I'm testing for error...
I am trying to implement encryption for my WCF service. I am aware that there are several options out there for me to do this. I am not interested in them. I would like to use a password to regenerate repeatable RSA keys. These keys will then be used to exchanged AES keys which will be used to encrypted the actual passed data.
I think I...
For example, I know that the WCF style web services don't rely so much on Session/Application/Request/Response as web services did. Are there any other gotchas I should keep in mind when writing web services today with the intention of making them WCF services as soon as my organization lets me use WCF?
I don't think I'm interested writ...
What are the minimal settings i need to do for a streamlined WCF config in the app.config?
The default one is this:
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
byp...
See also this question: http://stackoverflow.com/questions/447071/can-i-pass-a-system-net-mailmessage-to-a-wcf-service
I'd like to add attachments to the mail being sent. Attachments are either files on the local disc, or dynamically created Streams. A WCF contract can contain a Stream, but only when all arguments are of type Stream. So...
I'm working with WCF at the moment and attempting to implement a custom security model based around an API key and signature (similar to how Facebook/Flickr/OAuth etc. work).
There are a while bunch of classes like ServiceAuthorizationManager, SecurityToken, SecurityTokenValidator, IAuthorizationPolicy and so on, but I can't seem to fin...