2

I've created a web server control, it works fine. Problems start when I try calling an external web service. I am using a script manager and it's directed to the following location --> http:\localhost\UserNamesData.asmx.

My server control creates some html controls as well some javascript code. When the user clicks a submit button The javascript calls the external web service. I am using a script manager to register the service reference.

Now this seems to work when I put the web service inside the project in which the server control is later registered in (Meaning in my website) and when inline script is set to true. Though it does not work when my web service is not in the same project as my website.

I am using aspnet and c# 3.5

I have no idea what might cause it to act this way. Any thoughts?

4

1 回答 1

0

不确定这是否有帮助,但您必须确保 web 服务与包含 scriptmanager 的页面位于同一域中(有关详细信息,请参阅此页面)。

也许如果您可以发布一些示例代码,它会更容易提供帮助。

于 2009-07-18T21:17:35.640 回答