托管服务提供商阻止Web服务响应-(1和1托管) [英] Hosting provider blocks webservice response - (1and1 hosting)

查看:73
本文介绍了托管服务提供商阻止Web服务响应-(1和1托管)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用ASP.NET MVC 4编写的应用程序.我可以访问远程Web服务.我将其作为WebReference添加到了解决方案中.当我在本地主机上调用它的方法都很好时,问题出在已部署的版本上.服务器提供商将其作为中型信任"运行.当我从托管应用程序调用WebService方法时,出现错误:

I have an application written in ASP.NET MVC 4. I got access to remote web service. I added it to my solution as WebReference. When i call it's methods on my localhost all works great, the problem is on deployed version. Server provider run it as "Medium Trust". When i call WebService methods from hosted application i got an error:

我认为问题出在托管服务器上的防火墙规则中,我对该服务的绑定类型是具有默认设置的"basicHttpBinding".在这种情况下,我的监听端口是随机的,那么我如何才能通过它呢?如何为WebService响应设置静态侦听端口,以便我可以要求主机提供程序为我的应用程序设置防火墙端口打开?

I think the problem is in firewall rules on hosting server, my binding type for the service is "basicHttpBinding" with defaults settings. In this case my listening port is random, so how i can get through it? How to set static listening port for WebService response, so i can ask hosing provider to set firewall port open for my application?

我的绑定配置:

    <client>
      <endpoint address="http://WebServiceURL:8585/Api" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IETRService" contract="ETRService.IETRService" name="BasicHttpBinding_IETRService"  />
    </client>

推荐答案

部署时,您应该在标准端口上侦听,我假设您从本地测试中(删除了端口:8585)才能连接到您的服务器.

When you deploy, you should be listening on a standard port, I would assume (remove the port :8585) from your local testing in order to connect to your server.

<client>
    <endpoint address="http://WebServiceURL/Api" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IETRService" contract="ETRService.IETRService" name="BasicHttpBinding_IETRService"  />
</client>

这篇关于托管服务提供商阻止Web服务响应-(1和1托管)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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