servicehost

WCF threading - non-responsive UI

天大地大妈咪最大 提交于 2019-11-30 07:31:10
I'm trying to configure some WCF stuff. Currently, I have a server which allows remote users to download files, and client. In the server, I use a ServiceHost class. I assume it should be running on a separate thread, however, the server UI (WinForms) becomes locked when someone downloads a file. Is there a way to manage the WCF threading model? Thank you! You should add a ServiceBehaviorAtttribute to the class implementing your service and set its UseSynchronizationContext property to false. This will cause calls to your service to be processed on their own thread. Example: [ServiceBehavior

WCF: What is a ServiceHost?

非 Y 不嫁゛ 提交于 2019-11-30 02:44:09
As I'm currently learning to use WCF Services, I am constantly encountering tutorials on the internet which mention using a ServiceHost when using a WCF Service. What exactly is this ServiceHost ? In my current project I am using a WCF Service and having a reference to it from my app and whenever I want to consume it from my app I just instantiate its ServiceClient like such: new MusicRepo_DBAccess_ServiceClient(new InstanceContext(instanceContext), customBinding, endpointAddress); And then access my web methods ( OperationContract s) from that instance (obviously opening it before consuming

Problem with type of service in ServiceHost directive in wcf service

百般思念 提交于 2019-11-29 22:11:45
I am developing a simple wcf service for test. When I test this service with my local IIS 7.5, then it works properly. But when I host it in web IIS, I receive this error: The type 'WcfServiceLibrary1.Service1', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found. And my ServiceHost is: <%@ ServiceHost Language="C#" Debug="true" Service="WcfServiceLibrary1.Service1" %> Please help me resolve this problem Because I couldn't find this suggested in any of

WCF service in Azure worker role slow on first request after being idle

家住魔仙堡 提交于 2019-11-29 15:43:32
We have an Azure worker role that exposes a RESTful WCF service (using System.ServiceModel.Web) through a ServiceHost. The performance is irreproachable on massive traffic, but it seems like the response time is significantly higher (more than five seconds) on the first request when the role has been idle for some time. Does anyone know what might cause this? David Makogon The default AppPool timeout is 20 minutes. Might you be running into this? If so, you can add something like this to a startup script to change the timeout: %windir%\system32\inetsrv\appcmd set config -section

WCF: What is a ServiceHost?

谁说胖子不能爱 提交于 2019-11-29 00:23:10
问题 As I'm currently learning to use WCF Services, I am constantly encountering tutorials on the internet which mention using a ServiceHost when using a WCF Service. What exactly is this ServiceHost ? In my current project I am using a WCF Service and having a reference to it from my app and whenever I want to consume it from my app I just instantiate its ServiceClient like such: new MusicRepo_DBAccess_ServiceClient(new InstanceContext(instanceContext), customBinding, endpointAddress); And then

WCF service: app.config versus attributes or a mixture of both

邮差的信 提交于 2019-11-28 01:27:47
In a WCF application we have a servicecontract with attributes: namespace We.Work { [ServiceContract(Namespace = "We", Name = "IWork", SessionMode = SessionMode.NotAllowed)] public interface IWork an implementation of the servicecontract with attributes: namespace We.Work { [ServiceBehavior(Name = "Work", Namespace = "We", IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple, ReleaseServiceInstanceOnTransactionComplete = false )] public class WorkImplementation : IWork a servicehost (windows service or console

WCF service: app.config versus attributes or a mixture of both

▼魔方 西西 提交于 2019-11-27 04:48:18
问题 In a WCF application we have a servicecontract with attributes: namespace We.Work { [ServiceContract(Namespace = "We", Name = "IWork", SessionMode = SessionMode.NotAllowed)] public interface IWork an implementation of the servicecontract with attributes: namespace We.Work { [ServiceBehavior(Name = "Work", Namespace = "We", IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple,