Search Results

Search found 3630 results on 146 pages for 'wcf interoperability'.

Page 37/146 | < Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >

  • WCF Custom WSDL XmlSerializerOperationBehavior

    - by Jeff
    Hi, I have code that builds a custom WCF wsdl on the fly. In one particular scenario, the WSDL exported should use the XmlSerializerOperationBehavior as the IWsdlExportExtension as opposed to the default DataContractSerializerOperationBehavior IWsdlExportExtension. However, every time I try this from the WSDL generation code, I get a null reference exception from the ExportBody method of the XmlSerializerMessageContractExporter (which is used internally in System.ServiceModel by the XmlSerializerOperationBehavior ExportContract method). I've reflector'd it and I can't see anything obviously wrong. For some reason, .NET also doesn't want to work with source stepping in this scenario... Simply, the most basic way I can reproduce this is var c = ContractDescription.GetContract(typeof(IMyService)); foreach (var op in c.Operations) { op.Behaviors.Remove(typeof(DataContractSerializerOperationBehavior)); op.Behaviors.Insert(0, new XmlSerializerOperationBehavior(op)); } new WsdlExporter().ExportContract(c); // throws NullReferenceException Does anyone have any ideas on this? Thanks very much.

    Read the article

  • WCF - Network Cost

    - by Mubashar Ahmad
    Dear Devs I have a wcf service deployed on IIS with basicHttpBinding and aspNetCompatibilityEnabled=true I have a test client as well which invokes multiple service functions simultaneously. To check the performance of service call on client and server I calculated the Avg time it takes to complete a service request on client(in proxy code) and on server as well. after a test of 8 hrs (server and client were on the same machine) i came to know that average response time on client is around 34ms where as the Avg execution time on server is around 3ms so the difference is 31ms. I would like to know why every call is taking 31ms is it justified? and how can i reduce this?

    Read the article

  • msmq binding wcf

    - by pdiddy
    I have some messages in my queue. Now I notice that after 3 tries the service host faults. Is this a normal behavior? Where does the 3 times comes from? I thought it came from receiveRetryCount. But I set that one to 1. I got 20 messages in my queue waiting to be processed. The WCF operation that is responsible to process the message supports transaction so if it can't process the message it will throw so that the message stays in the queue. I didn't think that it would of Fault the ServiceHost after a number of retry, is this part documented somewhere? I'm running MSMQ service on my winxp machine. I'm more interested in documentation indicating that the service host will fault after a number of retry. Is this part true?

    Read the article

  • WCF, 4.0, Bidirectional...

    - by TomTom
    ...what options are there now with .NET 4.0, in a way that does support NAT for the client side (i.e. client behind NAT). I would prefer to use something HTTP based, but that is a weak condition - I think mid term I will have some non http communication outside WCF anyway, so proxy traversal is something I could delay. Pre .NET 4.0 there was the issue that basically the server-client channel would be opened from the server, which made NAT something non-traversable. Polling is not acceptable - we talk time sensitive information here. So, what are my options now?

    Read the article

  • WCF: limit number of calls per hour - per user

    - by Eric Eijkelenboom
    Hi guys, I've got a WCF service (basicHttpBinding, basic authentication, IIS 6.0) on which I want to restrict the number of calls per hour - on user basis. For example, max 1000 calls per user, per hour (a la Google Maps, etc). I also want to implement some sort of subscription mechanism, so that users can upgrade their call-limit across various 'price plans'. I know that I could achieve this with a custom Inspector, backed by a DB containing some sort of 'subscription' table and a counter, but I'd like to avoid reinventing the wheel. Does anyone have experience doing this? Are there 3rd party projects/libraries that support this out of the box? Thanks. Eric

    Read the article

  • Custom Types in WCF Rest

    - by user316341
    I am using the Rest Singleton WCF Service temple from the Rest Starter Kit. The temples uses sample item as its sample Item. i am attempting to replace that sample ITem with a custom type from web reference in my ASP.Net project .dll. The types and name spaces are found and i can replace the sample item in the code. when i run the application i get this error: "Exception has been thrown by the target of an invocation." when this line is executed "return new SingletonServiceHost(serviceType, baseAddresses);" <%@ ServiceHost Language="C#" Debug="true" Service="SAUDServices.Service" Factory="SAUDServices.AppServiceHostFactory"%> using System; using System.ServiceModel; using System.ServiceModel.Activation; using Microsoft.ServiceModel.Web.SpecializedServices; using Stretchatyourdesk; namespace SAUDServices { class AppServiceHostFactory : ServiceHostFactory { protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses) { return new SingletonServiceHost(serviceType, baseAddresses); } } }

    Read the article

  • referencing a WCF web service

    - by ErnieStings
    Our current project uses an asmx service. We want to keep this service for now, but would like to add an additional wcf service for ajax calls. I followed a procedure i found online to set up the service and it works fine with javascript in aspx files within that particular project but i'm unsure how to reference it in javascript files in a different project (in the same solution). If someone could point me in the right direction it would be much appreciated. Thanks, Shawn EDIT: i wish to make calls in javascript similar to the following: function Button1_onclick() { var service = new AjaxServices.TestService(); service.wcfTest(4, onSuccess, null, null); } function onSuccess(result){ document.getElementById("ajaxPlaceHolder").innerHTML = "<p>" + result + "</p>"; } // ]]> but i'm willing to explore the jQuery option as well.

    Read the article

  • WCF Client Proxy State

    - by RemotecUk
    Hi, how do I test the state of my proxy before making calls to my WCF service. I have a duplex channel created using a duplex channel factory. Before making any calls to the server I want to check the state of the proxy object created from the channel factory. I saw this in a book... (to be used in immediate window) ? ((ICommunicationObject)flsProxy).State But it gave this exception... Cannot obtain fields or call methods on the instance of type 'System.ServiceModel.ICommunicationObject' because it is a proxy to a remote object. Would be grateful for any ideas how this can be tested, or is it better to just catch exceptions. Thanks.

    Read the article

  • Serializing an object into the body of a WCF request using webHttpBinding

    - by Bert
    I have a WCF service exposed with a webHttpBinding endpoint. [OperationContract(IsOneWay = true)] [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "/?action=DoSomething&v1={value1}&v2={value2}")] void DoSomething(string value1, string value2, MySimpleObject value3); In theory, if I call this, the first two parameters (value1 & value 2) are taken from the Uri and the final one (value3) should be deserialized from the body of the request. Assuming I am using Json as the RequestFormat, what is the best way of serialising an instance of MySimpleObject into the body of the request before I send it ? This, for instance, does not seem to work : HttpWebRequest sendRequest = (HttpWebRequest)WebRequest.Create(url); sendRequest.ContentType = "application/json"; sendRequest.Method = "POST"; using (var sendRequestStream = sendRequest.GetRequestStream()) { DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(MySimpleObject)); jsonSerializer.WriteObject(sendRequestStream, obj); sendRequestStream.Close(); } sendRequest.GetResponse().Close();

    Read the article

  • Cannot we pass Hash table in WCF services?

    - by Thinking
    I have just odne something like [ServiceContract] public interface IService1 { [OperationContract] Hashtable MyHashTable(); // TODO: Add your service operations here } and implemented as public Hashtable MyHashTable() { Hashtable h = new Hashtable(); for (int i = 0; i < 10; i++) h.Add(i, "val" + i.ToString()); return h; } When I am trying to run the service , I am getting the error "This operation is not supported in WCF test client" Why so? Thanks

    Read the article

  • Setting the Identity/Principal from a MessageInspector in WCF

    - by Robert Wagner
    I am developing a WCF service that receives the user's credentials in the SOAP header. These credentials are read on the server side using a MessageInspector. So far so good. I want to set the Thread.CurrentPrincipal to a custom principal (CustomPrincipal), but when I do this from the MessageInspector, it gets overridden by the time the service is invoked. When is the best time to set the principal? Also what is the best way to pass the principal, identity or credentials from the inspector to that location?

    Read the article

  • WCF Service and Properties

    - by Karnalta
    Hi all, Here is my question, I have a solution with 4 projects in it for a WCF Service : DLL Library : Service Interface. DLL Library : Service Code. Form Application : Service hosting application. Form Application : Service client application. I'd like to have certain properties of the service accessible for the hosting application but not for the client one. If I declare a property in the client interface they will both have access to it. In fact, my service manage user identity login and keep a list of all user currently logged in. I'd like to be able to show this list in the Hosting application, like a debugging tool. But I don't want the service client to be able to access to this list. How can I do ? Thank in advance.

    Read the article

  • WCF Host as windows service faults

    - by pdiddy
    I have this WCF service running as a window service. I have in my code that everytime it faults it will restart the service. Now I'm having the issue where the host faults, it tries to restarts, then faults again, but at some point it just stop the service. Wondering why it stop the service? Is this something handled by the OS that it detects the service has faulted a number of time within a certain time it will just stop the service because it faulted too many time ?

    Read the article

  • How to: WCF XML-RPC client?

    - by mr.b
    I have built my own little custom XML-RPC server, and since I'd like to keep things simple, on both server and client side, what I would like to accomplish is to create a simplest possible client (in C# preferably) using WCF. Let's say that Contract for service exposed via XML-RPC is as follows: [ServiceContract] public interface IContract { [OperationContract(Action="Ping")] string Ping(); // server returns back string "Pong" [OperationContract(Action="Echo")] string Echo(string message); // server echoes back whatever message is } So, there are two example methods, one without any arguments, and another with simple string argument, both returning strings (just for sake of example). Service is exposed via http. Aaand, what's next? :) P.S. I have tried googling around for samples and similar, but all that I could come up with are some blog-related samples that use existing (and very big/numerous) classes, which implement appropriate IContract (or IBlogger) interfaces, so that most of what I am interested is hidden below several layers of abstraction...

    Read the article

  • How do I do client-side validation in WPF using WCF RIA Services

    - by lsb
    Hi! I've created a WCF RIA Service that I'd like to use with a WPF application. I've added several System.ComponentModel.DataAnnotations validation rules on the entities meta-data, all which work great on the server when I call .SubmitChanges(changeSet) from the client. I'd also like to validate my entities on the client side before I sumbit my changes to the server but I have no idea how to do so. Any help in this regard would be greatly appreciated! Thanks....

    Read the article

  • call WCF Service from SSL Enabled website

    - by Usama Khalil
    how can i call service from a ssl enabled website to a WCF service with basicHTTPBinding. i am getting the error The requested service, 'http://10.5.1.111/HRMSService/VehicleMaintenance/VehicleMaintenance.svc/test' could not be activated. See the server's diagnostic trace logs for more information. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ServiceModel.ServiceActivationException: The requested service, 'http://10.5.1.111/HRMSService/VehicleMaintenance/VehicleMaintenance.svc/test' could not be activated. See the server's diagnostic trace logs for more information. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using

    Read the article

  • EndpointNotFoundException when working through tutorials in Learning WCF

    - by Nicholas
    I am working through the book Learning WCF and on the first tutorial lab HelloIndigo I am receiving the following error. Could not connect to http://localhost:8000/HelloIndigo/HelloIndigoService. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:8000. It appears in the Client project on the line string s = proxy.HelloIndigo(); EndpointAddress ep = new EndpointAddress("http://localhost:8000/HelloIndigo/HelloIndigoService"); IHelloIndigoService proxy = ChannelFactory<IHelloIndigoService>. CreateChannel(new BasicHttpBinding(), ep); string s = proxy.HelloIndigo(); Console.WriteLine(s); Console.WriteLine("Press <ENTER> to terminate Client"); Console.ReadLine(); I have intensively googled on this but I am none the wiser. Can anyone explain the issue and how to remedy?

    Read the article

  • WCF passing data types

    - by Jonathan D
    writing a WCF soap server which is going to be working with a flex client. what the best way of passing the result of a sql select statement? with pro's and con's would be good :D I know I can define data contracts, however defining lots of these for every sql statment is going to take a long time. i'm doing this with SQL server 2000, VS2010 and flex sdk 3/4. apart form that there isn't really that many other requirements that couldn't be moved at present. Thanks for the help

    Read the article

  • WCF Windows service permissions problem

    - by Elad
    I have created a WCF service and hosted it using Windows Services host. To install the project I created an installation project (as described here). In the tutorial, it says to define in the ProjectInstaller.cs the serviceProcessInstaller1 Account property to be Network Service. When using this setting the service did not started on the server. When I tried to start the process manually, it immediately return to stopped state. After when I changed the Account to LocalSystem the service works properly. My questions are: Any ideas why it won't work with Network Service account? What are the security implications of using a server with LocalSystem account? This server is used locally in the intranet as a reporting server for other servers.

    Read the article

  • WCF extensions without including the assembly version

    - by Marc Gravell
    As discussed here, I'm trying to add a WCF endpoint-extension; I've got it working, but I need to include the full assembly details: <extensions> <behaviorExtensions> <add name="protobuf" type="ProtoBuf.ServiceModel.ProtoBehaviorExtension, protobuf-net, Version=1.0.0.275, Culture=neutral, PublicKeyToken=257b51d87d2e4d67"/> </behaviorExtensions> </extensions> What I would like to do (to avoid issues when updating etc, especially for samples) is to include just the names: <add name="protobuf" type="ProtoBuf.ServiceModel.ProtoBehaviorExtension, protobuf-net"/> (which is what you might expect from standard assembly-naming conventions) However, if I do this, I get a big error: Parser Error Message: An error occurred creating the configuration section handler for system.serviceModel/behaviors: Extension element 'protobuf' cannot be added to this element. Verify that the extension is registered in the extension collection at system.serviceModel/extensions/behaviorExtensions. Is it possible (and if so: how) to add an extension without having to specify the assembly-version?

    Read the article

  • WCF does not generate the properties

    - by BDotA
    I have a .NET 1.1 ASMX and want to use it in a client WinForms app. If i go wit the old way and add it as a "WebRefrence" method then I will have access to two of its properties which are "url" and "UseDefaultCredentials" and it works fine. But if I go with the new WCF way and add it as a ServiceReference I still have access to the methods of that ASMX but those two properties are missing. what is the reason for that? so for example in the old way ( adding WebReference) these codes are valid: TransferService transferService= new TransferService(); transferService.Url = "http://something.asmx"; transferService.Credentials = System.Net.CredentialCache.DefaultCredentials; string[] machines = transferService.GetMachines(); But in the new way ( adding Service Reference ) using(TransferServiceSoapClient transferServiceSoapClient = new TransferServiceSoapClient("TransferServiceSoap")) { transferServiceSoapClient.Url = "someUrl.asmx"; //Cannot resolve URL transferServiceSoapClient.GetMachines(new GetMachinesRequest()); transferServiceSoapClient.Credentials = .... // //Cannot resolve Credentials }

    Read the article

  • WCF Callback Contract Fiddler Debugging

    - by DavyMac23
    I'm trying to debug a WCF self-hosted service utilizing callbacks. Every 1/2 I make a callback to a SL3 app to display the latest changes (yes, there are tons of changes every 1/2 second). There are 3 services, one has new data every 1/2 second, one has new data every second, and another has new data every hour. I've set all of my timeouts, Send, Receive, Open and Close to 2 days 23 hours and 23 minutes, but I still get time out errors on the service side when I go to issue the callback. I'm using Fiddler and I notice that my service that has new data every hour is still showing up every 10 seconds. Fiddlier shows a Body length of -1, then 10 seconds later it changes to 0 and the response is HTTP 200, but the overall elapsed time is 10 seconds. What's going on here?

    Read the article

  • Windows Azure Queues, WCF, MSMQ integration

    - by user104295
    Hi there, I have a scenario where I need a desktop console app to communicate with a Windows Azure Queue... the most important thing is that the message is received by the server eventually. Also, the desktop app may be disconnected from the Internet sometimes. In the traditional WCF+MSMQ approach you'd be able to send a message which would be cached in MSMQ until MSMQ could reach the Server's MSMQ and send the message. What's the equivalent when Windows Azure is the server-side? Is it possible for the same approach to be used, where MSMQ just communicates with a Windows Azure Queue rather than an MSMQ on a Windows Server? Maybe Windows Azure Queue is the wrong approach? I have heard about something called message buffer, but don't know what this is (yet!). thanks for your help Kris

    Read the article

  • WCF on Win Server 2008 and IIS7 with only net.tcp binding hide IIS features

    - by Nicola Celiento
    Hi all, I've installed HTTP Activation and Non-HTTP Activation IIS's features for Framework.NET 3.0 under WCF Activation feature. I'm trying to remove http and https bindings (under default Web Site) from IIS Manager and leave others (net.tcp, net.msmq, etc.) but if I close and re-open IIS manager I not found any icons in the right panel (Feature View). The only feature I see is IIS Manager Permissions. It's right I don't see them? I hope you can help me. Thank you in advance!

    Read the article

  • WCF Service Memory Leaks

    - by Mubashar Ahmad
    Dear Devs I have a very small wcf service hosted in a console app. [ServiceContract] public interface IService1 { [OperationContract] void DoService(); } [ServiceBehavior(InstanceContextMode=InstanceContextMode.PerCall)] public class Service1 : IService1 { public void DoService() { } } and its being called as using (ServiceReference1.Service1Client client = new ServiceReference1.Service1Client()) { client.DoService(new DoServiceRequest()); client.Close(); } Please remember that service is published on basicHttpBindings. Problem Now when i performed above client code in a loop of 1000 i found big difference between "All Heap bytes" and "Private Bytes" performance counters (i used .net memory profiler). After investigation i found some of the objects are not properly disposed following are the list of those objects (1000 undisposed instance were found -- equals to the client calls) (namespace for all of them is System.ServiceModel.Channels) HttpOutput.ListenerResponseHttpOutput.ListenerResponseOutputStream BodyWriterMessage BufferedMessage HttpRequestContext.ListenerHttpContext.ListenerContextHttpInput.ListenerContextInputStream HttpRequestContext.ListenerHttpContext Questions Why do we have lot of undisposed objects and how to control them. Please Help

    Read the article

< Previous Page | 33 34 35 36 37 38 39 40 41 42 43 44  | Next Page >