In WCF land, you can specify a Namespace prefix for anything that has a [DataContract] like so:
[DataContract(Namespace="MyApp")] public class whatever...
However if you wanted to apply a common namespace to ALL data contracts assembly-wide, you can use the ContractNamespaceAttribute:
/* in AssemblyInfo.cs */
[assembly: ContractNames...
I hear that WCF is the new standard for communication across the network and applications in .net. The idea seems to make sense as well, provide standard interfaces for programs to communicate.
Here is my situation, I have a .net app i want to communicate to a ruby application though pipes. On the .net side (server) I would like to use ...
Hello,
I'm having a tough time with NetTcpBinding.
When I run my WCFservice,I get this...
==============================================================
System.InvalidOperationException: Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http].
...
I'm getting the following error when I try multiple end points..
System.ServiceModel.AddressAlreadyInUseException: The TransportManager failed to listen on the supplied URI using the NetTcpPortSharing service: the service failed to listen.
at System.ServiceModel.Channels.SharedConnectionListener.SharedListenerProxy.Register()
at S...
I have an application hosting a WCF service (net.tcp) that receives and sends data. Is there a way to know how much data has been transferred since the host was started?
...
I have a WCF Service talking to a web application. In the web.config files I want to encrpyt the connetion string section.
I'm using
aspnet_regiis -pe "connectionStrings" -app "/WebAppFolder"
for the web applications web.config and this works fine.
But when I do the same for the WCF service I get an internal server error when I try a...
I have a working ChangeTrackingList implementation which does its job just fine, but I'd like to "filter" its contents when sending it from the client back to the server so that it only includes the changes. Getting the changes is easy, as my list exposes a GetChanges method for just that purpose. How can I interrupt the DataContractSeri...
To consume WCF services, we dynamically create channels using the following pattern.
Dim subscriptionsService As ISubscriptionsService = ProfileChannelFactory.Create(Of ISubscriptionsService)()
Dim result As Subscription() = Nothing
Try
result = subscriptionsService.GetSubscriptions(New GetSubscriptionsRequest()).Sub...
I have WCF service that I can upload files.
XElement upload = service.UploadFiles(id, File.ReadAllBytes(filePath));
This works, but I am just wondering if it is the best way to upload each of them one by one when you have many (about a thousand) small files (15~20K). How can we compare "Chunky" versus "Chatty" approaches?
1) Is it be...
Is the advice given in this oft-cited MSDN article still considered sound for converting a .NET Remoting application to WCF?
I notice that the article references the deprecated ServiceBehavior attribute ReturnUnknownExceptionsAsFaults, so I question whether people have found other discrepancies or other approaches better suited to intr...
I have a WCF service client and it was generated using the /async argument with svcutil.exe, so it uses the asynchronous programming model. When I make multiple asynchronous requests with a single client though it serializes the execution of those requests.
Here is an example that shows how I am executing the parellel requests.
[TestM...
I'm hosting a WCF service inside a windows hosted service.
When I start the WHS, I get the following error:
The ChannelDispatcher at 'net.tcp://mysecreturl/' with contract(s) '"IClass"' is unable to open its IChannelListener.
System.InvalidOperationException: A registration already exists for URI 'net.tcp://mysecreturl/Indexer/'.
...
Suppose I have a WCF service and a method in the contract
<ServiceContract()> _
Interface IThingService
'...
<OperationContract()> _
Function GetThing(thingId As Guid) As Thing
End Interface
where Thing is an ordinary class with ordinary properties, except for one member:
Public Class Thing
' ...
Public Property Photos() As ...
Hi,
i've a WCF client wicht refers to multiple services hosted in the same machine. like this example
<client>
<endpoint address="net.tcp://localhost:8731/TrackingService" binding="netTcpBinding" ...
</endpoint>
<endpoint address="net.tcp://localhost:8731/CommonService" binding="netTcpBinding"...
</endpoint>
</client>
is ...
I have a server with a SQL2008 Database and IIS7. I created a WCF service, that access the SQL-Server and returns the resultset in form of a List<T>.
My problem is, that I get timeouts when accessing the service from my client, although the query should not take too long (about 1 sec in SQL-manager) it fetches 17.256 lines.
When I con...
I've got some WCF services (hosted in IIS 6) which use the Enterprise Library (4.0) Validation Application Block. If a client submits a message which fails validation (i.e. gets thrown back in a ValidationFault exception), I'd quite like to be able to log the message XML somewhere (using code, no IIS logs). All the validation happens bef...
Hello,
I have developed a small WCF service which handles HTTP request.
I want to be aware of every fault that happens:
everything that causes 500 Internal Server Error from the contracts view
everything that causes a CommunicationException from the bindings view (I've written a custom one but am using standard ones also)
The err...
Using the DataContractSerializer, I can serialize an object graph, while maintaining object references by setting "PreserveObjectReferences". This works great for most of my object graph, but there is one spot where I have to do the serialization myself. Is there any way for me to hook into the reference preservation system myself? How c...
I've written an application that uses some serial port hardware directly, and abstracted the serial commands out into a object.
I'd like to use that object remotely from another application on another machine on the network, but I'm not sure where to start. I previous used TCP and made up some commands to send over the network to cont...
I have a WCF test service and a test client in the same solution. The service is configured to run on localhost (Ie, "http://localhost:8731/Design_Time_Addresses/MyService/Service") I run the client app and it correctly invokes the service and gets back the correct answer. I've verified via logs that it's definitely running the service t...