开发者

Retrieving data received by the server using WCF Web Services

开发者 https://www.devze.com 2023-04-01 11:29 出处:网络
I\'d like to use a web service (created in my main thanks to new ServiceHost(typeof(..)) ) and I would like to r开发者_StackOverflowetrieve data received by my server to process it in my main.

I'd like to use a web service (created in my main thanks to new ServiceHost(typeof(..)) ) and I would like to r开发者_StackOverflowetrieve data received by my server to process it in my main.

I've begun with a simple event handler but it is impossible because I have to create an instance instead of using typeof.

Is there another solution?


You can use a singleton WCF service. You need to decorate the service class with [ServiceBehavior] and specify InstanceContextMode.Single, and then you pass an instance of the service class to the ServiceHost constructor.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号