如何在虚拟远程机器上托管wcf服务? [英] How to host wcf service on virtual remote machine?

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

问题描述

我设计了一个自托管的wcf服务。该服务在使用iis的本地系统上正常运行。现在我想在远程虚拟机上执行该服务。

当我在远程机器上安装该服务时,服务已启动,但是当我使用该服务执行应用程序时,它未连接到服务。它给出了一个例外:

位于Http:// Localhost:8080 / FileTransfer / mex的HTTP服务太忙了。

内部异常:远程服务器返回错误(503)服务器不可用



在远程虚拟机上执行应用程序需要遵循哪些步骤?

我没有虚拟机上的IIS机器。

I have designed a self-hosting wcf service. That service is working properly on local system using iis . Now I want to execute that service on "Remote virtual machine".
When i am installing that service on remote machine the service was started but when i execute the application using that service it is not connected to service. It is giving an exception :
The HTTP service located at Http://Localhost:8080/FileTransfer/mex is too busy.
Inner exception : Remote server return an error (503)Server unavailable

Which steps i need to follow to execute the application on remote virtual machine?
I dont have IIS on vitual machine.

推荐答案

假设机器远离您用来测试它的客户机:

Http:// Localhost :8080 / FileTransfer / mex

你不会再在localhost上运行了;)
Assuming the machine is remote from the client you are using to test it:
Http://Localhost:8080/FileTransfer/mex
You won''t be running on localhost any more ;)


按照步骤:

在服务器上手动托管文件:



1)在本地系统上构建WCF服务

2)将其发布到本地IIS服务器在默认网站下

3)现在打开IIS,从网站列表中选择服务名称

4)右键单击并单击Export

5)复制所有文件



在服务器端,必须安装IIS:

6)向IIS发送新应用程序 - 添加应用程序

7)输入所有详细信息(别名,物理位置等) )

3)现在打开创建的应用程序的物理位置并将文件粘贴到那里。



现在选择servicename.cs文件并单击从右侧窗格浏览。



谢谢,

Avinash
Follow steps:
Manually hosting files on server :

1) Build your WCF Service on local system
2) Publish it to local IIS server under "Default Web Site"
3) Now open IIS, and select service name from the list of sites
4) Right click and click Export
5) Copy all the files

On Server Side, IIS must be installed :
6) Fo to IIS , create new application - add Application
7)Enter all the details (Alias name , physical location etc)
3)Now open the physical location for the created application and paste the files there.

Now select servicename.cs file and click on browse from right pane.

Thanks,
Avinash


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

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