Search Results

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

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

  • Using custom DataContractResolver in WCF, to transport inheritance trees involving generics

    - by Benson
    I've got a WCF service, in which there are operations which accept a non-generic base class as parameter. [DataContract] class Foo { ... } This base class is in turn inherited, by such generics classes as [DataContract] class Bar : Foo { ... } To get this to work, I'd previously have to register KnownTypes for the Foo class, and have these include all possible variations of Bar (such as Bar, Bar and even Bar). With the DataContractResolver in .NET 4, however, I should be able to build a resolver which properly stores (and restores) the classes. My questions: Are DataContractResolvers typically only used on the service side, and not by the client? If so, how would that be useful in this scenario? Am I wrong to write a DataContractResolver which serializes the fully qualified type name of a generic type, such as Bar1[List1[string, mscorlib], mscorlib] ? Couldn't the same DataContractResolver on the client side restore these types?

    Read the article

  • WCF NetTcpBinding Buffered vs Streamed performance problems

    - by DxCK
    I wrote a WCF service that should transform any size of files, using the Streamed TransferMode in NetTcpBinding, and System.IO.Stream object. When running performance test, i found significant performance problem. Then I decided to test it with Buffered TransferMode and saw that performance is two times faster! Because my service should transfer big files, i just can't stay in Buffered TransferMode because of memory management overhead on big files at the server and client side together. Why is Streamed TransferMode slower than the Buffered TransferMode? What can i do to make Stremed performance better?

    Read the article

  • How to migrate deploy RESTful WCF Web Service from IIS 6.0 to IIS 7.0

    - by Chris Lee
    Hi all, I have a WCF Restful Web Service. It works find under VS and IIS 6.0. Now I want to move it to another work station with IIS 7.0 on it. I tried to copy all the deploy file from IIS 6 to IIS 7, but it cannot be accessed by other client, except for the request from it's own machine. I don't know what's wrong and I tried to enable the anonymous access. Please help me. Thanks.

    Read the article

  • WCF "DataContext accessed after Dispose"

    - by David Ward
    I have an application with numerous WCF services that make use of LINQ-To-SQL as the data access model. I am having lots of problems with the "DataContext accessed after Dispose" exception. I understand what this exception is and that it is occurring because I have not "initialised" the data that is trying to be accessed. I've read many articles that suggest that I called ToList() on any arrays before the parent object is returned by the service. My issue is that I am getting this exception and I don't know where it is originating from and therefore I don't know what hasn't been initialised. Can anyone advise how best to identify the root cause? (I have used the MS Service Trace Viewer and this doesn't seem to give me any further information)

    Read the article

  • CommunicationException with 'not recognized sequence' message in WCF.

    - by brain_pusher
    Hello, I get a CommunicationException while using WCF service. The message is: The remote endpoint no longer recognizes this sequence. This is most likely due to an abort on the remote endpoint. The value of wsrm:Identifier is not a known Sequence identifier. The reliable session was faulted. The exception is thrown in a moment after a contract method was called. Before calling contract method the channel state is Opened. I restore my service client after catching this exception and for some time it works fine. But then this error occures again. It seems like some timeout is exceeded, but I can't understand which one exactly. I use wsHttpBinding with reliableSession enabled. The InactivityTimeout is set to half an hour and I'm sure it's not exceeded, because exception is thrown earlier.

    Read the article

  • Enum in WCF RIA Services Object

    - by Blake Blackwell
    Is it possible to have an enum with WCF RIA Services? When I check the generated code for my custom POCO class I don't see the enum property generated. Here is an example of what I'm trying to do: public class Legend { public enum ViewStateType { OnExpanded = 1, OnContracted = 2, OffExpanded = 3, OffContracted = 4 } [Key] public Guid LegendId { get; set; } [EnumDataType(typeof(ViewStateType))] public ViewStateType ViewState { get; set; } } I tried with and without the EnumDataType attribute.

    Read the article

  • What is the advantage of WSDualHttpBinding in WCF?

    - by schmoopy
    How much benefit would there be to using WSDualHttpBinding with IIS hosted service vs. a client poll that calls the WCF service, assuming in the latter the service cached the data in question? This scenerio would be for a notify type of service where the clients need to be notified by the service when an event occurs. Specifically, what advantages would WSDualHttpBinding provide over polling? ie: Less network traffic, faster to design, easier to maintain, more control ??? From what i understand, WSDualHttpBinding is less scalable than client polling, so why use it at all? Edit: As Matt supplied, time critical can be one reason for the duplex binding. Here is what i have so far: WSDualHttpBinding adv: can get immediate response w/o waiting on polling timer dis: less scalable than WsHttpBinding dis: less firewall friendly I'll add to this based on comments, please let me know if i state anything incorrectly. thanks for you input :-)

    Read the article

  • In my WCF service with IXmlSerializable class, I get ArrayOfXElement[] instead of ObservableCollecti

    - by Scott
    I have an existing class (I didn't write) that implements IXmlSerializable. I decided to create a WCF service so my Silverlight application could access this class. I return the class as List. In the generated proxy, instead of an ObservableCollection like I'm expecting, I get ArrayOfXElement[]. If I remove the IXmlSerializable attribute, I get an the ObservableCollection. I don't quite understand what is happening, but I just want my SL app to receive an ObservableCollection. Is my only choice to create a DTO class and send back a list of those? Any advice?

    Read the article

  • The resource cannot be found. WCF .svc file

    - by Akshat Goel
    I am making a WCF service. System Config: Widnows 7, ASP.NET 3.5, IIS 7.0 Server Config: IIS7, ASP.NET 3.5 It works fine on my system, but when i deploy this on the server i get following error The resource cannot be found. when i try accessing my .svc file. Please help me out in this. My server is with GoDaddy, so i have no control on the server. I have to do everything in my code only. Please help.

    Read the article

  • How to use WIX to deploy and run WCF service

    - by Giampaolo
    Hi I am trying to make an installer which deploys my wcf service, at the moment it is creating the virtual directory, but when i try connect my app to it, i get a CommunicationException was unhandled by user code The remote server returned an error: NotFound. I notice that if i create a virtual directory manually that it will connect and work, so i'm assuming IIS is doing something behind my back which is making it work. This is the code i am using to create the virtual directory,please note this is inside a iis:WebSite tag if more information is needed please let me know. <iis:WebVirtualDir Id="VAWebService" Directory="VAWebService" Alias="VAWebService" > <iis:WebApplication Id="VAWebService" Name="VAWebService" AllowSessions="yes" WebAppPool="VA_AppPool" /> <iis:WebDirProperties Id="MyWebSite_Properties" AnonymousAccess="yes" WindowsAuthentication="no" DefaultDocuments="service1.svc" AccessSSL="yes" AccessSSL128="yes" AccessSSLMapCert="yes" AccessSSLNegotiateCert="yes" AccessSSLRequireCert="yes" Read="yes" Write="yes" Execute="yes" Script="yes" /> </iis:WebVirtualDir> Does any one know how to fix this? any help would be appreciated. Thanks

    Read the article

  • Implementing automatic logout in silverlight and wcf due to user inactivity

    - by rubin-attack
    I have a WCF web-service and a Silverlight app displaying data from that service. In my service I'd like to implement automatic logout of the user, if no service methods were invoked during a period of time (for example 20 minutes). I'm thinking about smth like that: Dictionary<User,TimeSpan> Inactivity When a service method is invoked i reset the TimeSpan. But what will happen, if 20 minutes pass, and I call the Logout method (which clears all User caches), and suddenly the User returns from lunch)) and presses a button in his Silverlight app? Obviously he'll get an error. Is there any way to avoid this, or all my concept is wrong? Maybe there's a better way to logout the user automatically?

    Read the article

  • WCF/C# Unable to catch EndpointNotFoundException

    - by Paul Jones
    Hi all, I have created a WCF service and client and all works until it come to catching errors. Specifically I am try to catch the EndpointNotFoundException for when the server happens not to be there for whatever reason, I have tried performing a simple try catch block catching the specific error and the communication exception it derives from and I've tried catching just Exception. None of these succeed in catching the exception, however I do get A first chance exception of type 'System.ServiceModel.EndpointNotFoundException' occurred in System.ServiceModel.dll in the output window when the client tries to open the service. Any ideas as to what I'm doing wrong?

    Read the article

  • Hooking into AppInitialize with WCF service

    - by Mark
    Hi, Im having issues with my WCF service. I need to do a windsor container injection pre application_start and noticed i can use the AppInitialise method. It works on visual studio debug but when I deploy to IIS the code does not get fired.. I initialized the class as follows public static class Class1 { public static void AppInitialize() { IWindsorContainer container; container = new WindsorContainer("windsor.xml"); container.AddFacility(); container.Resolve(); } } Is there any special task i need to do to get this to work on IIS. Im using version 6. Thanks!

    Read the article

  • WCF Windows Service TimeOut

    - by rmdussa
    I have a client application developed in .net seding a request to wcf service and supposed to send reponse .if execution time with in 1 minute,there is no error,if it exceeds 1 minute the error is Inner exception: This request operation sent to net.tcp://localhost:18001/PitToPort/2008/01/30/StockpileService/tcp did not receive a reply within the configured timeout (00:01:00). The time allotted to this operation may have been a portion of a longer timeout. This may be because the service is still processing the operation or because the service was unable to send a reply message. Please consider increasing the operation timeout (by casting the channel/proxy to IContextChannel and setting the OperationTimeout property) and ensure that the service is able to connect to the client how to increase the time out and how?What is the best solution.

    Read the article

  • WCF REST Compression

    - by PhilJ
    I have a REST service that returns a large chunk of XML, about 150k worth. e.g. http://xmlservice.com/services/RestService.svc/GetLargeXML Therefore I want to compress the response from the server, as GZIP should reduce this to something much smaller. Having searched everywhere I cannot for the life of me find an example of how to perform compression for WCF REST services. Help!! NOTE: My service is hosted by a third party and I CANNOT do this via IIS as it is not supported by them.

    Read the article

  • WCF client service call very slow

    - by JohnIdol
    I have a WCF client (running on Win7) pointing to a WebSphere service. All is good from a test harness but when my calls to the service originate from an HttpHandler or a standard aspx page the calls are extremely slow (it takes up to 10 times longer) and not just the first time. If I send the exact same envelopes through Soap-UI or without an HttpHandler it's all good. If the envelope is the same the only thing left is the HttpHeader. What should I be looking for and is there some config setting that might do the trick? Any help appreciated!

    Read the article

  • Tutorial: Simple WCF XML-RPC client

    - by mr.b
    Update: I have provided complete code example in answer below. 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? :)

    Read the article

  • OData and custom WCF WebGet methods

    - by reinier
    I've created an OData endpoint (using entity framework, WCF data service) and added a custom test WebGet test method like so: [WebGet(UriTemplate = "{text}")] public IQueryable<string> SplitString(string text) { if (text == null) throw new DataServiceException("text not specified"); var result = (from s in text.Split('-') orderby s select s); return result.AsQueryable(); } and a config line: config.SetServiceOperationAccessRule("SplitString", ServiceOperationRights.All); However, no matter how I specify the url, I can not get the text param to be filled out. (it is always null). so: http://localhost/myservice.svc/SplitString/testtext does not work. What is the correct url format (or UriTemplate) one should use? The only examples I found of odata and WebGet only have an example method which doesn't have any parameters.

    Read the article

  • Strange error occurring when using wcf to run query against sql server

    - by vondip
    Hi all, I am building an asp.net application, using II6 on windows server 2003 (vps hosting). I am confronted with an error I didn't receive on my development machine (windows 7, iis 7.5, 64 bit). When my wcf service tries launching my query running against a local sql server this is the error I receive: Memory gates checking failed because the free memory (43732992 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element. and ideas??

    Read the article

  • Cannot connect to one of my WCF services, not even with telnet

    - by Ecyrb
    I have six wcf services that I'm hosting in a windows service. Everything works great on my machine (Windows 7) but when I try it in production (Windows Server 2003) I cannot connect to one of my six services, ReportsService. I figured I must have a typo, but everything looks right. I've even rewritten that section of the config file just to be sure. I've turned on WCF tracing, but it never shows the call to my service; nothing helpful in there. I tried connecting to the port (9005) with telnet, but it failed. I can connect to all other services (ports 9001-4 and 9006) just fine. I thought that maybe there was a problem with port 9005, so I changed it to 9007 and still couldn't connect. I had one of my working services host on 9005 and it actually worked fine. So I'm pretty sure there's nothing wrong with the port or any firewall settings. Whatever port I tell ReportsService to use fails. Now I'm out of ideas. It seems like it's not hosting that one service, but I cannot get any information about why or what's wrong. Any ideas on what I could try to get that information? Or what might be wrong? The unhandled System.ServiceModel.EndpointNotFoundException I get when running my client is: Could not connect to net.tcp://localhost:9005/ReportsService. The connection attempt lasted for a time span of 00:00:01.0937430. TCP error code 10061: No connection could be made because the target machine actively refused it 172.0.0.1:9005. . My host's config file contains: <!-- Snipped other services to simplify for you. --> <endpoint binding="netTcpBinding" bindingConfiguration="customTcpBinding" contract="ServiceContracts.IReportsService" /> <endpoint binding="netTcpBinding" bindingConfiguration="customTcpBinding" contract="ServiceContracts.IUpdateData" /> IReportService is the one I'm having trouble with. I get a proxy to IReportsService with the following code, where Server is the name of the hosting machine: return new ChannelFactory<IReportsService>("").CreateChannel(new EndpointAddress(string.Format("net.tcp://{0}:9005/ReportsService", Server))); My client config file contains: <system.serviceModel> <bindings> <netTcpBinding> <binding name="customTcpBinding" maxReceivedMessageSize="2147483647"> <readerQuotas maxNameTableCharCount="2147483647" maxStringContentLength="2147483647"/> <security mode="None"/> </binding> </netTcpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="ServiceBehavior"> <serviceMetadata httpGetEnabled="True"/> <serviceDebug includeExceptionDetailInFaults="True" /> <serviceThrottling maxConcurrentCalls="30" maxConcurrentInstances="30" maxConcurrentSessions="1000" /> </behavior> </serviceBehaviors> </behaviors> <services> <!-- Snipped other services to simplify for you. --> <service behaviorConfiguration="ServiceBehavior" name="WcfService.ReportsService"> <endpoint address="ReportsService" binding="netTcpBinding" bindingConfiguration="customTcpBinding" contract="ServiceContracts.IReportsService" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:9005" /> </baseAddresses> </host> </service> <service behaviorConfiguration="ServiceBehavior" name="WcfService.UpdateData"> <endpoint address="UpdateData" binding="netTcpBinding" bindingConfiguration="customTcpBinding" contract="ServiceContracts.IUpdateData" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:9006" /> </baseAddresses> </host> </service> </services> </system.serviceModel> I've tried to keep things simple with the code snippets above, but if you would like to see more just ask and I'd be happy to provide anything that'll help.

    Read the article

  • profiling WCF services with visual studio profiler

    - by ashish.s
    I am trying to profile a WCF service using visual studio profiler. So i created a profile by choosing asp.net application, and gave it the url of the web service. When i launch the session, it launches a web page to the site. I then run my unit test using another visual studio client, but the test always fails with with communication exception, and the process that performance analyze is attached to exits out. if i run the test again, it attached the process again, but the tests still fails with communication exception. This is throwing my report off since its only accounting for the startup work that the application is supposed to do. can someone point out what i am doing wrong ?

    Read the article

  • WCF REST vs. ADO.NET Data Services

    - by ray247
    Hi there, Could someone compare and contrast on WCF Rest services vs. ADO.NET Data Services? What is the difference and when to use which? Thanks, Ray. Edit: thanks to the first answer, just to give a bit background on what I'm looking to do: I have a web app I plan to put in the cloud (someday), the DAL is built with ADO.NET Entity Framework. And, I need to figure which web service data access technology would best fit my case.

    Read the article

  • WCF Global(.asax) Behavior

    - by Theofanis Pantelides
    Hi, I want to create a global option that when a REST call contains &format=json to output the response as a JSON string. If I enter the following String in my method it works: WebOperationContext.Current.OutgoingResponse.Format = WebMessageFormat.Json; However, if I add this line, anywhere in my Global.asax file, I get a nullException for Current Context: String format = ""; if (HttpContext.Current.Request.QueryString["format"] != null) format = HttpContext.Current.Request.QueryString["format"]; if (String.Equals("json", format, StringComparison.OrdinalIgnoreCase)) System.ServiceModel.Web.WebOperationContext.Current.OutgoingResponse.Format = System.ServiceModel.Web.WebMessageFormat.Json; The exception is triggered here: System.ServiceModel.Web.WebOperationContext.Current Anyone know how I can add this functionality globally (WCF)?

    Read the article

  • WCF binding programatically and adding metadata excange

    - by totem
    Hi, My problem is im trying to enable mex on a service that uses net.tcp binding. that binding is for localhost port 5000, when i want to enable mex on the same port, and have it avilable for http i have to enable the HttpGetEnabled on the Service host. All this works well but when i try to add the binding it fails becuase the binding is "net.tcp://localhost:5000/test". is there a way to enable mex on the same port but with a diffrent uri? Without enableing NetTcpPortSharing. I dont think the code is the issue since i can add the MEX on a diffrent port through the code an it works fine, the question is how to have net.tcp://localhost:5000/test as the WCF tcp based enpoint and net.tcp://localhost:5000/test/mex as the http mex endpoint that gives the WSDL for the TCP endpoint. thanks, Totem

    Read the article

  • NHibernate WCF Rest IIS7 Fails with Security Exception

    - by RyanFetz
    Here is the error: System.TypeInitializationException: The type initializer for 'NHibernate.Cfg.Environment' threw an exception. --- System.Security.SecurityException: Request for ConfigurationPermission failed while attempting to access configuration section 'hibernate-configuration'. To allow all callers to access the data for this section, set section attribute 'requirePermission' equal 'false' in the configuration file where this section is declared. --- System.Security.SecurityException: Request for the permission of type 'System.Configuration.ConfigurationPermission, System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' failed. at System.Security.CodeAccessSecurityEngine.Check(Object demand, StackCrawlMark& stackMark, Boolean isPermSet) at System.Security.CodeAccessPermission.Demand() at System.Configuration.BaseConfigurationRecord.CheckPermissionAllowed(String configKey, Boolean requirePermission, Boolean isTrustedWithoutAptca) We have the trust level set to Full. Note also that we also have a web site that runs the SAME Nhibernate code and has NO issues. Only the WCF REst Web Service Application has this error? Any Thoughts as to WHY this is a problem?

    Read the article

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