远程服务器怎样引用asax,无法添加服务。无法连接到远程服务器

我知道这是一个常见问题解答,我已经阅读了所有类似的Q和A,但我仍然不能正确。无法添加服务。无法连接到远程服务器

我在一般的Web服务和ASP.NET是一个新手。我有一个由同事编写的小WCF服务应用程序,该应用程序在他的电脑上工作并进行了演示。在我的电脑上,没有任何更改,我无法在WCF Test Client程序将它作为服务添加时接受它(下面的错误消息)。我的同事现在休假了!

项目属性设置为使用带有自动分配端口号的VS开发服务器启动WcfTestClient.exe。该项目已添加webform.aspx和Global.asax文件,这是服务所需的。

我已经运行

netsh http add urlacl url=http://localhost:51568/Service1.svc user=

我的问题是我如何才能通过WcfTestClient启动该服务,并在浏览器上的网页表单?

我已经看过各种SO回答类似的问题,但我仍然遭到拒绝。

Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata. Error: Cannot obtain Metadata from http://localhost:51568/Service1.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to ... Error URI: http://localhost:51568/Service1.svc

Metadata contains a reference that cannot be resolved: ' http://localhost:51568/Service1.svc '. There was no endpoint listening at http://localhost:51568/Service1.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. Unable to connect to the remote server No connection could be made because the target machine actively refused it 127.0.0.1:51568HTTP GET Error URI: http://localhost:51568/Service1.svc There was an error downloading ' http://localhost:51568/Service1.svc '. Unable to connect to the remote server No connection could be made because the target machine actively refused it 127.0.0.1:51568

这是我的web.config:

东西很奇怪,我对于端口号是,如果我不设置项目开始与外部程序,然后在浏览器中列出的目录在本地主机端口50345列表这是一个不同的端口号51568.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值