一个很奇怪的问题

miaoliujun 2003-08-25 01:22:32
我把webservices做成一个安装程序

在两台机器上分别安装,我的机器的ip是235,另一台是234。这个程序是在235上开发的。

分别安装后,两台机器输入“http://localhost/web/service.asmx”都可以的。在234上输入“http://192.168.1.234/web/service.asmx”也是可以的。但在我的机器上输入“http://192.168.1.235/web/service.asmx”会出现“测试 测试窗体只能用于来自本地计算机的请求。 ”的提示。在我的机器上输入“http://192.168.1.234/web/service.asmx”会出现“Test The test form is only available for requests from the local machine.”的提示。在其他的机器上输入“http://192.168.1.234/web/service.asmx”也会出现“Test The test form is only available for requests from the local machine.”的提示。

我现在想知道的是:
1、为什么234的机器上用ip可以调用,我的机器上用ip不可以调用,是不是framework的配置问题。
2、我怎么才能在不同的机器上调用我的服务,比如说在234上输入“http://192.168.1.235/web/service.asmx”,或者 比如说在235上输入“http://192.168.1.234/web/service.asmx”。

附:当然我在开发的时候也会出现这样的情况,在输入ip的情况下无法调试。

请各位大牛多多指教。
谢谢
...全文
29 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
miaoliujun 2003-08-26
  • 打赏
  • 举报
回复
ok,thx a lot.
saucer 2003-08-26
  • 打赏
  • 举报
回复
what os are you using? what version of .NET are you using?

try to modify your machine.config (normally in :\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG
)

uncomment those two lines:

<webServices>
<protocols>
<add name="HttpSoap1.2"/>
<add name="HttpSoap"/>
<!-- <add name="HttpPost"/> -->
<!-- <add name="HttpGet"/> -->
<add name="HttpPostLocalhost"/>
<add name="Documentation"/>
</protocols>
</webServices>


==>

<webServices>
<protocols>
<add name="HttpSoap1.2"/>
<add name="HttpSoap"/>
<add name="HttpPost"/>
<add name="HttpGet"/>
<add name="HttpPostLocalhost"/>
<add name="Documentation"/>
</protocols>
</webServices>

12,163

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧