Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2008

Tip: Looking for answers? Try searching our database.

Use a remote web service with dropdownlist

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
royend - 16 Feb 2008 19:16 GMT
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
Peter Bromberg [C# MVP] - 16 Feb 2008 22:24 GMT
Royend,
this is not really a C# language group question. You can try the ASP.NET
newsgroup, or better yet, the AJAX forums on the ASP.NET site.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com 

> Hi.
> I need to access a remote web service which I have created on the
[quoted text clipped - 54 lines]
> Best regards,
> Royend

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.