创建wcf服务作为Web和窗口服务 [英] Create wcf service as a web and window service both

查看:112
本文介绍了创建wcf服务作为Web和窗口服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Guys,



我正在尝试创建一个wcf服务,它将作为Web和Windows服务工作。

其实,我已经创建了包含安装程序的wcf服务。它工作正常。

但是要调用wcf服务方法,我需要在我的应用程序中添加服务引用。

但我需要使用wcf服务方法调用通过jquery链接,而不是通过引用服务对象。

并且还想启用跨域ajax调用来发出GET和POST请求。



任何人都可以为此提供一些解决方案。



提前谢谢。

Hello Guys,

I am trying to create a wcf service which will work as a web and windows service both.
Actually, I have created the wcf service in which I included the installer. And it works fine.
But to call a wcf service method, I need to add a service reference in my application.
But I need to call the wcf service methods using the links through jquery, not by referring the service object.
And also wants to enable the cross domain ajax call to make GET and POST requests.

Can anybody has some solution for this.

Thanks in advance.

推荐答案

有几种方法来做到这一点。您可以创建一个WCF服务并创建一个将使用该Web服务的Windows服务。请参阅此链接



有四种方法可以部署WCF服务

1)在IIS中托管,

2)WAS(Windows激活服务)

3)自托管

4)Windows服务



你可以看到这个链接我在网络服务和WCF服务之间的差异中找到了



希望这有助于
There are several ways to do this. you can create a WCF service and make one windows service which will use that webservice. see this link .

there are four ways to deploy the WCF service
1) Hosted in IIS,
2) WAS(windows activation service)
3)Self hosting
4)Windows services

you can see this link I found in deference between web service and WCF services

Hope this helps


这篇关于创建wcf服务作为Web和窗口服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆