如何在应用程序上托管 wcf 服务器? [英] How to host wcf server on application ?

查看:42
本文介绍了如何在应用程序上托管 wcf 服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何让 wcf 服务服务器在 iis 上运行.但是我需要在 iis 之类的东西上托管我的 wcf 服务器,但只有当我的应用程序启动并运行时,该服务才可用.

I know how to make wcf service server to run on iis. But i need to host my wcf server on something like iis but the service will be available only when my application is up and running.

我知道可以创建类似于 wcf 主机的应用程序.但在这种情况下,我将无法从其他机器(对吗?)访问此服务,因为据我所知..只有当 wcf 服务从 iis 运行时才能从其他机器访问此服务.

I know that it is possible to create application that will act like a wcf host. But in this case i will not have the access from other machine ( right ? ) to this service because as far as i know .. the access to this service from other machine can be done only when the wcf service is running from iis.

任何帮助请...10 倍

Any help please ... 10x

推荐答案

托管 WCF 服务有三种不同的类型:

Hosting WCF service has three different types:

  • Hosting in IIS
  • Hosting in Managed Application
  • Hosting in Windows Service

但在这种情况下,我将无法从其他机器访问(对?) 到此服务,因为据我所知 .. 访问此服务来自其他机器的服务只有在 WCF 服务是从 IIS 运行.

But in this case I will not have the access from other machine ( right ? ) to this service because as far as I know .. the access to this service from other machine can be done only when the WCF service is running from IIS.

如果您认为只有托管在 IIS 中的 WCF 服务可以在托管服务的机器之外访问.你完全错了.只要您的服务已启动并正在运行并且您的机器具有公共 IP 地址 你可以在任何地方访问它.

If you thought that only the WCF service hosted in IIS is accessible outside that machine where service is hosted. You are completely wrong. As long as your service is up and running and your machine has Public IP address you can access it every where.

这篇关于如何在应用程序上托管 wcf 服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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