无法访问子文件夹中的WebService [英] Cannot Access WebService in a Subfolder
问题描述
大家好,
我在以下文件夹中有一个aspx页面.
~/modules/personnel/create/createstaffrecord.aspx
在以下文件夹中还有一个Web服务.
~/services/CacheService.asmx
我尝试了以下操作,但没有任何效果:
(1). url: ''../services/CacheService.asmx/GetSelectedCountryId''
(2). url: ''../../services/CacheService.asmx/GetSelectedCountryId''
(3). url: ''../../../services/CacheService.asmx/GetSelectedCountryId''
(4). url: ''services/CacheService.asmx/GetSelectedCountryId''
请问我该如何运作.
Hi Guys,
I have an aspx page in the following folder.
~/modules/personnel/create/createstaffrecord.aspx
And a web service in the following folder.
~/services/CacheService.asmx
I tried the following but did not get any of it working:
(1). url: ''../services/CacheService.asmx/GetSelectedCountryId''
(2). url: ''../../services/CacheService.asmx/GetSelectedCountryId''
(3). url: ''../../../services/CacheService.asmx/GetSelectedCountryId''
(4). url: ''services/CacheService.asmx/GetSelectedCountryId''
How do I get it working please.
Thanks in anticipation.
推荐答案
尝试使用''/services/CacheService.asmx/GetSelectedCountryId".如果那不起作用,请启动调试并浏览到asmx文件,以确保没有运行时错误将其停止.
Try using ''/services/CacheService.asmx/GetSelectedCountryId''. If that doesn''t work, start up debugging and browse to the asmx file to make sure there''s not a run-time error that''s stopping it.
我解决了通过将代码放在〜/modules/personnel/create/createstaffrecord.aspx.aspx.vb文件中,然后像这样引用它:
CreateStaffRecord.aspx/GetSelectedStateId
I solved it by placing the code in the ~/modules/personnel/create/createstaffrecord.aspx.aspx.vb file and now referred to it like this:
CreateStaffRecord.aspx/GetSelectedStateId
这篇关于无法访问子文件夹中的WebService的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!