Use a remote web service with dropdownlist

R

royend

Hi.
I need to access a remote web service which I have created on the
domain www.abc.net. The web service is working well when used on www.abc.net
and is also accessible through the web browser responding with the
usual WSDL.

For my second domaind (www.abcd.net), I have added the Web Service as
a Web Reference (with Visual Studio, which actually created a new
folder "App_WebReferences" which automatically added a new folder for
each domain in this order: net, abc, www. The "www"-folder contains
discovery files and WSDL files for references to the web service to be
consumed in the site).

The Web Service should therefore be accessible for my dropdownlist
(whis is actually a cascadingDropDown for extra functionality), and my
code (C#) looks like this:

<asp:DropDownList ID="ddl1" runat="server" CssClass="ddl" / <ajaxToolkit:CascadingDropDown
ID="CascadingDropDown4"
runat="server"
TargetControlID="ddl1"
Category="Category"
PromptText="Choose your type."
ServicePath="http://www.abc.net/Category.asmx"
ServiceMethod="GetCategories" />

So I need to define the correct ServicePath. When used at www.abc.net,
the above is correct. However when I want to use it at my second
domain I have tried two alternatives, giving me different error
messages:
ServicePath="http://www.abc.net/Category.asmx" produces an "Access
denied" error.
ServicePath="http://www.abcd.net/Category.asmx" produces an "Method
Error 500" error.

I tried to set the service path (relative to root) to the generated
folders and files from the adding of the web service as follows:
ServicePath="../App_WebReferences/net/abc/www/Category" produces an
"Method Error 404" error.
ServicePath="../App_WebReferences/net/abc/www/Category.disco" produces
an "Method Error 404" error.
ServicePath="../App_WebReferences/net/abc/www/Category.discomap"
produces an "Method Error 404" error.
ServicePath="../App_WebReferences/net/abc/www/Category.wsdl" produces
an "Method Error 404" error.

I should add that I have copied the Category.cs-file (which generates
an .asmx-file by the server/visual at root of domain) to the second
domain for test purposes. This gave me the "Method Error 500"-error.

Hope you might help me.
Please let me know if I should add additional information to make it
easier for you to help me.

Best regards,
Royend
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top