Search Results

Search found 9370 results on 375 pages for 'wcf rest contrib'.

Page 78/375 | < Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >

  • Is there a limit to the number of DataContracts that can be used by a WCF Service?

    - by Chris
    Using WCF3.5SP1, VS2008. Building a WCF service that exposes about 10 service methods. We have defined about 40 [DataContract] types that are used by the service. We now experience that adding an additional [DataContract] type to the project (in the same namespace as the other existing types) does not get properly exposed. The new type is not in the XSD schemas generated with the WSDL. We have gone so far as to copy and rename an existing (and working) type, but it too is not present in the generated WSDL/XSD. We've tried this on two different developer machines, same problem. Is there a limit to the number of types that can exposed as [DataContract] for a Service? per Namespace?

    Read the article

  • How do I restrict the WCF service called by an ASP.NET AJAX page to only allow calls for that page?

    - by NovaJoe
    I have an AjaxControlToolkit DynamicPopulate control that is updated by calls to a WCF service. I know I can check the HttpContext in the service request to see if a user of the page (and thus, the control) is authenticated. However, I don't want anyone clever to be able to call the service directly, even if they're logged in. I want access to the service to be allowed ONLY to requests that are made from the page. Mainly, I don't want anyone to be able to programatically make a large number of calls and then reverse-engineer the algorithm that sits behind the service. Any clever ideas on how this can be done? Maybe I'm over-thinking this? Thanks in advance.

    Read the article

  • How to make IIS wait for WCF service gets ready?

    - by Kamarey
    I have a WCF service hosted in IIS 7. It takes some minutes until this service finish to load its data and ready for external calls. Data loads in internal thread. The problem is that from IIS point the service is ready just after it was activated (by some call), and it process a request without waiting for data to be loaded. Is it possible to tell IIS that the service is still loading and make this service unavailable for requests? No problem if such request will throw an exception.

    Read the article

  • Is it weird or strange to make multiple WCF Calls to build a ViewModel before presenting it?

    - by Nate Bross
    Am I doing something wrong if I need code like this in a Controller? Should I be doing something differently? public ActionResult Details(int id) { var svc = new ServiceClient(); var model = new MyViewModel(); model.ObjectA = svc.GetObjectA(id); model.ObjectB = svc.GetObjectB(id); model.ObjectC = svc.GetObjectC(id); return View(model); } The reason I ask, is because I've got Linq-To-Sql on the back end and a WCF Service which exposes functionality through a set of DTOs which are NOT the Linq-To-Sql generated classes and thus do not have the parent/child properties; but in the detail view, I would like to see some of the parent/child data.

    Read the article

  • How to host your own http-like server using ServiceHost?

    - by Ole Jak
    I use ServiceHost for hosting WCF cervices. I want to host near to my WCF services my own tcp programm (like WCF service but with out WCF) for direct sockets operations (like lien to some sort of broadcasting TCP stream) I want to use ServiceHost for somehow simplyfiing proces of creating my TCP sender\listener, to somehow control namespaces (so I would be able to let my clients to send TCP streams directly into my service using some nice URLs like www.example.com:34123/myserver/stream?id=1 or www.example.com:34123/myserver/stream?id=222 and so that I will not be bothered with Idea of 1 client for 1 socket at one time moment, BTW I realy want to keep my WCF services on the same port as my own server or what it is...) Can any body please hrlp me with this?

    Read the article

  • WCF web.config is getting overwritten after every compilation?

    - by AJ
    Hi I have a Silverlight application calling a WCF service. SimplehttpBinding stuff. Every I make changes to silverlight xaml code, the web.config gets refrshed also. Even if make any changes to web.cofig file, they get overwritten too. Its as if, some other process is writing these files. Why is that happening? How can I make sure that it does not get overwritten after every compile? Please advise. THanks AJ.

    Read the article

  • WCF and a developer key like Google map API. What exactly am I looking for?

    - by Scott
    I want to allow access to a WCF service to only those requests that contain a developer key. This is similiar to how the Google Maps API works. Register for a developer key and include that key in your requests. Anyone can get a key. How you get a key is undecided but is being discussed. For now, we'll email you a key. The service is up and running so I will be adding this on. I just need to know what I'm looking for so I can figure out what I need to do. Makes sense, right?!?! What is this scheme called? What should I search for? Any suggested links / books / whitepapers?

    Read the article

  • Writing WCF messages to a text log in configurable directory.

    - by Arsh
    Hello everyone, I have a WCF web service that is deployed at IIS. Part of the web service is to validate the inputs using EntLib 4.1 For ex, the string values can be of specific length and so on. In case of the validation being failed a fault exception is raised and the service is supposed to write the message in log file. How do I go about creating the log file to a location that can be configured from a config file. Basically how do we write messages from IIS (since the service is hosted at IIS, I am assuming that that will be the source !!!!) Regards.

    Read the article

  • WCF: How to find out when a session is ending?

    - by TomTom
    I have a WCF application that is using sessions. Is there any central event to get thrown when a session ends? How can I find out when a session is ending WITHOUT (!) calling a method (network disconnect, client crashing - so no "logout" method call)? The server is hosted as: [ServiceBehavior( InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Reentrant, UseSynchronizationContext = false, IncludeExceptionDetailInFaults = true )] Basically because it is using a callback interface. Now, I basically need to decoubple the instance created from the backend store when the session terminates ;) Any ideas?

    Read the article

  • A problem with .NET 2.0 project, using a 3.0 DLL which implements WCF services.

    - by avance70
    I made a client for accessing my WCF services in one project, and all classes that work with services inherit from this class: public abstract class ServiceClient<TServiceClient> : IDisposable where TServiceClient : ICommunicationObject This class is where I do stuff like disposing, logging when the client was called, etc. some common stuff which all service classes would normally do. Everything worked fine, until I got the task to implement this on an old system. I got into a problem when I used this project (DLL) in an other project which cannot reference System.ServiceModel (since it's an old .NET 2.0 software that I still maintain, and upgrading it to 3.0 is out of the question). Here, if I omit where TServiceClient : ICommunicationObject then the project can build, but the ServiceClient cannot use, for example, client.Close() or client.State So, is my only solution to drop the where statement, and rewrite the service classes?

    Read the article

  • Where best to instantiate and close a Silverlight-enabled WCF Service from the Silverlight app?

    - by Yttrium
    When using a Silverlight-enabled WCF service, where is the best place to instantiate the service and to call the CloseAsync() method? Should you say, instantiate an instance each time you need to make a call to the service, or is it better to just instantiate an instance as a variable of the UserControl that will be making the calls? Then, where is it better to call the CloseAsync method? Should you call it in each of the "someServiceCall_completed" event methods? Or, if created as a variable of the UserControl class, is there a single place to call it? Like a Dispose method, or something equivalent for the UserControl class. Thanks, Jeff

    Read the article

  • How can I tell that a NetTcp-based WCF connection was interrupted?

    - by mafutrct
    A WCF service is based on NetTcpBinding. It may happen that the client silently vanishes, leaving the server thinking that it is still connected. I'm currently using a thread that pings all connected client to see if they are still alive, and removes disconnected clients. Is a ping thread the correct way to solve the issue, or is there a better, possibly event-based way? Do I have to surround every code that communicates with the client by try/catch and remove it from the list of connected clients additionally?

    Read the article

  • Is there a way to expose multiple WCF services through a single endpoint?

    - by mafutrct
    I currently offer a service with many methods via WCF. I'd like to refactor so the single service is split into multiple classes, each offering a different set of functionality. However, I'd prefer to still have a single connection to the client. Is this possible? I guess the answer is No, so how should I solve this issue? Is there a workaround? Or is my idea completely stupid and I should change the design of the application?

    Read the article

  • How do I setup a WCF Data Service with an ADO.NET Entity Entity Model in another assembly?

    - by lsb
    Hi! I have an ASP.NET 4.0 website that has an Entity Data Model hooked up to WCF Data Service. When the Service and Model are in the same assembly everything works. Unfortunately, when I move the Model to another "shared" assembly (and change the namespace) the service compiles but throws a 500 error when launched in a browser. The reason I want to have the Model in a common assembly (lets call it RiaTest.Shared) is that I want share common validation code between the client and service (by checking "Reuse types in referenced assemblies" in the Advanced tab of the Add Service Reference dialog). Anyway, I've spent a couple of hours on this to no avail so any help in the regard would be appreciated...

    Read the article

  • WCF: What happens if a channel is established but no method is called?

    - by mafutrct
    In my specific case: A WCF connection is established, but the only method with "IsInitiating=true" (the login method) is never called. What happens? In case the connection is closed due to inactivity after some time: Which setting configures this timeout? Is there still a way for a client to keep the connection alive? Reason for this question: I'm considering the above case as a possible security hole. Imagine many clients connecting to a server without logging in thus preventing other clients from connecting due to bandwidth problems or port shortage or lack of processing power or ... Am I dreaming, or is this an actual issue?

    Read the article

  • Can I find out what WCF methods are supported on the endpoint before calling it?

    - by alord1689
    I have a versioning issue with a WCF service contract in which one of the many endpoints which are called for the operation is missing one method from the contract. My question is, how can I make sure the command is available on the client before attempting to call it? I tried: foreach (var od in proxy.Endpoint.Contract.Operations) { if (od.Name == "MyMethodName") { hasMethod = true; break; } } Unfortunately, this is using the contract from the calling app and does not actually describe the implementations on the endpoint itself. As a result, it returns true even though the endpoint has failed to implement the command.

    Read the article

  • How to access the service instance from host object in WCF?

    - by user1048677
    I am trying to incarnate some sort of ad hoc WCF service. I already managed to launch it and make it call its own web methods as some other guy's methods. The issue that I am facing is instance management. I have set [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] so it now has a global instance with the same properties for all clients. But besides that I need it to call other services of its kind while listening to incoming requests from clients (similar crazy services). While debugging I noticed that the ServiceHost's constructor calls the constructor of the service class. So, I assumed it has access to the global instance of this class and I need to find a way to call methods of this instance. Please don't ask what I have been smoking, I just have to make it ad hoc.

    Read the article

  • WCF: Is there a way to return an object that is able to execute on the server?

    - by mafutrct
    Coming from a Java background, this is the way I'm thinking: The server provides an object to the client. This object should be able to execute on the server. Server: private string _S = "A"; public interface IFoo { void Bar(); } private class Foo : IFoo { void Bar() { _S = "B";} } public IFoo GetFoo() { return new Foo(); } Client: IFoo foo = serverChannel.GetFoo(); foo.Bar(); Is this possible? Or is my understanding wrong and this is not how it works in WCF? What would be a better design?

    Read the article

  • How to write an unit test for WCF behaviors?

    - by katie77
    I am new to unit testing. How do I write a unit test for a method when I am extending a WCF behavior. Since I am not sure of when the class is being instantiated, or I can not change the method signature. In the behavior implementation, I am getting the header and looking up a value in the config. public class IncomingValidator : IDispatchMessageInspector { public object AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext) { // Grab the header and see if one of the particular values(read from config) is there. } public void BeforeSendReply(ref Message reply, object correlationState) { } }

    Read the article

  • Best in-memory cache of DB objects for Silverlight [closed]

    - by Jon
    Hi, I'd like to set up a cache of database objects (i.e. rows in a table) in memory in silverlight, which I'll do using WCF and linq-to-sql. Once I have the objects in memory, I'm planning on using MSMQ to receive new objects whenever they have been modified. It's a somewhat complex approach but the goal is to reduce trips to the database and allow instant data communication between Silverlight applications that are connected to the MSMQ. My Silverlight applications are meant to be long-running and the amount of data to be cached will not be large. I'm planning on saving the in-memory cache using local storage. Anyway, in order to process the updated objects that come in, I'd like to know if the user has changed the existing object. Could I use some event relating to data-binding to set a flag indicating that the object has changes? Maybe there's a better way to do the cache entirely? Thanks!

    Read the article

  • Imitating Exchange Server's "RBAC AuthZ" in my own application... (is there something similar?)

    - by makerofthings7
    Exchange 2010 has a delegation model where groups of winrm cmdlets are essentally grouped into roles, and the roles assigned to a user. (Image source) This is a great & flexible model considering how I can leverage all the benefits of PowerShell, while using the right low level technologies (WCF, SOAP etc), and requiring no additional software on the client side. (Image source) Question(s) Is there a way for me to leverage Exchange's delegation model in my .NET application? Has anyone attempted to imitate this model? If I must start from scratch, how would I go about imitating this approach?

    Read the article

  • How to structure a project that supports multiple versions of a service?

    - by Nick Canzoneri
    I'm hoping for some tips on creating a project (ASP.NET MVC, but I guess it doesn't really matter) against multiples versions of a service (in this case, actually multiple sets of WCF services). Right now, the web app uses only some of the services, but the eventual goal would be to use the features of all of the services. The code used to implement a service feature would likely be very similar between versions in most cases (but, of course, everything varies). So, how would you structure a project like this? Separate source control branches for each different version? Kind of shying away from this because I don't feel like branch merging should be something that we're going to be doing really often. Different project/solution files in the same branch? Could link the same shared projects easily Build some type of abstraction layer on top of the services, so that no matter what service is being used, it is the same to the web application?

    Read the article

  • Solutions for software using many calls to a server

    - by Val
    I am developing software that uses many calls to a server. On a client side it's a Silverlight application. Almost every time a user clicks on a button in it, it sends 1-5 WCF calls to a server. There can be up to dozen or so users at a time. The server is a database server that serves data to a client. I am an intermediate level developer and am thinking about caching some data and syncing my changes from time to time. Are there any official solutions or technologies for it, like, patterns and such?

    Read the article

  • What is a good design pattern / lib for iOS 5 to synchronize with a web service?

    - by Junto
    We are developing an iOS application that needs to synchronize with a remote server using web services. The existing web services have an "operations" style rather than REST (implemented in WCF but exposing JSON HTTP endpoints). We are unsure of how to structure the web services to best fit with iOS and would love some advice. We are also interested in how to manage the synchronization process within iOS. Without going into detailed specifics, the application allows the user to estimate repair costs at a remote site. These costs are broken down by room and item. If the user has an internet connection this data can be sent back to the server. Multiple photographs can be taken of each item, but they will be held in a separate queue, which sends when the connection is optimal (ideally wifi). Our backend application controls the unique ids for each room and item. Thus, each time we send these costs to the server, the server echoes the central database ids back, thus, that they can be synchronized in the mobile app. I have simplified this a little, since the operations contract is actually much larger, but I just want to illustrate the basic requirements without complicating matters. Firstly, the web service architecture: We currently have two operations: GetCosts and UpdateCosts. My assumption is that if we used a strict REST architecture we would need to break our single web service operations into multiple smaller services. This would make the services much more chatty and we would also have to guarantee a delivery order from the app. For example, we need to make sure that containing rooms are added before the item. Although this seems much more RESTful, our perception is that these extra calls are expensive connections (security checks, database calls, etc). Does the type of web api (operation over service focus) determine chunky vs chatty? Since this is mobile (3G), are we better handling lots of smaller messages, or a few large ones? Secondly, the iOS side. What is the current advice on how to manage data synchronization within the iOS (5) app itself. We need multiple queues and we need to guarantee delivery order in each queue (and technically, ordering between queues). The server needs to control unique ids and other properties and echo them back to the application. The application then needs to update an internal database and when re-updating, make sure the correct ids are available in the update message (essentially multiple inserts and updates in one call). Our backend has a ton of business logic operating on these cost estimates. We don't want any of this in the app itself. Currently the iOS app sends the cost data, and then the server echoes that data back with populated ids (and other data). The existing cost data is deleted and the echoed response data is added to the client database on the device. This is causing us problems, because any photos might not have been sent, but the original entity tree has been removed and replaced. Obviously updating the costs tree rather than replacing it would remove this problem, but I'm not sure if there are any nice xcode libraries out there to do such things. I welcome any advice you might have.

    Read the article

< Previous Page | 74 75 76 77 78 79 80 81 82 83 84 85  | Next Page >