web service call failed: 500 using ajax hovermenu and web service with ascx file

I am using a hovermenu extender on an image button. The hovemenu extender calls a web service and returns back information that I write to the panel that displays. A portion of the code is below. This works when the Page is an aspx page but when I move it to an ascx page I get web service call failed. I do have the ascx page in a folder called controls/pages off of the root but both the default.aspx page and the bedinfo.asmx page are on the root. I don't think I have a path problem.

I can include more complete code, there are actually 50 images with 50 hovermenu extenders and one panel that I update dynamically witht the webservice. 

ASCX PAGE Snippits (/controls/pages/bed_4South.ascx)

<
asp:ImageButton ID="S45001" style="left:258px; POSITION: absolute; TOP: 164px" runat="server" ImageUrl="~/img/spacer.gif" />

<asp:Panel ID="ptpanel_menu" runat="server" CssClass="popupMenu">

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

</asp:Panel>

 <ajaxToolkit:HoverMenuExtender ID="S45001_hover" DynamicContextKey="S45001" TargetControlID="S45001" runat="Server" PopupControlID="ptpanel_menu" PopupPosition="Bottom" DynamicControlID=Label1 DynamicServicePath="BedInfo.asmx" DynamicServiceMethod="GetPt" PopDelay="10" HoverCssClass="popupHover" OffsetX="6"/>

Bedinfo.asmx <Script.Services.ScriptService(), WebService(Namespace:="http://tempuri.org/")> _

<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _

Public Class BedInfoInherits System.Web.Services.WebService

 

<WebMethod()> _

Public Function GetPt(ByVal contextKey As String) As String

 

... Stuff here to create a string to pass back

Return CStr(sqlReturn)

End Function

Default.aspx 

<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server" >

</asp:ScriptManager>

<uc1:_4SO id="_4SOUTH" runat="server"/>

</form>

 

 

0
cicijay
1/10/2009 1:45:50 AM
asp.net.networking-webservices 2181 articles. 0 followers. Follow

2 Replies
1273 Views

Similar Articles

[PageSpeed] 29

One question: the path to the ascx is Root/controls/pages and your application’s folder is something like Root/MyApplication? If so you do have a cross-domain problem, even if the application and the webservice are on the same machine they also have to be under the same folder, this means that the ascx should be under MyApplication, but if your application is in the Root then you are ok since controls/pages is also under Root. 

 


If this post helped you please remember to set it as Answer so it can help others.
0
mrmercury
1/12/2009 5:43:09 PM

I moved the ascx file into the same folder as you suggested and it works.

Thank You!

 

0
cicijay
1/13/2009 12:51:31 AM
Reply:

Similar Artilces:

'web service call failed: 500' using ajax hovermenu and web service
Hi there, I'm using a hovermenuextender attached to a templatefield of a gridview, and everything seemed to work fine.. however I've moved on to add dynamic attributes to the hovermenu. Now I get the error "web service call failed: 500" in place of the output I want (on the hovermenu's panel). When accessing the web service I created (directly through the browser) everything works fine.. here's my hovermenuextender dynamic attributes DynamicContextKey='<%=eval("refnumber") %>' DynamicServiceMethod="GetS...

Problem calling Web Service using the DynamicPopulate Extender
Hi, I'm quite new to ASP.Net AJAX so please forgive my ignorance.  I have downloaded and installed the RC1 version and am following through some of the tutorial videos.  I am having a problem with the Dynamic Populate Extender example.  I have created some asp controls with onclick events calling a javascript function.  From there I am attempting to use a dynamic populate extender control to call a web service - it's a function declared on that ASPX page as the tutorial explains in necessary and decorated with the System.Web.Services.WebMEthod AND System.Web.Script.Serv...

DynamicPopulateExtender: Web Service call failed: 12152, Web Service call failed: 12031
Hi, I'm using a DynamicPopulateExtender to take the value of a SELECT dropdown and pass it to an onpage web service (defined with <System.Web.Services.WebMethod()> _ '<System.Web.Script.Services.ScriptMethod()>) and as PUBLIC SHARED FUNCTION myfunction(contextKey as string) as string. The function returns the html for a listbox. Everything seems to fire properly on the client but when the web service is called by the Javascript function, I get Web Service call failed: 12152 or Web Service call failed: 12031 Any pointers would be appreciated.  Do...

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

Ajax call web services failed after convert web site into web project
Hi Guys I have one web site application and use ajax call web services. it is working very well. 1. Master page set up scriptmanager with webservices path. 2. Web service inside web site application under app_code named ajaxwebservice.cs 3. Javascript call ret=ajaxwebservice.method(id, oncomplete(),ontimeout(),onerror()); But after I convert web site into web application project, the ret=ajaxwebservice.method(id, oncomplete(),ontimeout(),onerror()); failed, the ajaxwebservice in undifined error. I use the same web.config, master page, I put my ajaxwebservice.asmx and ajaxwebservic...

Cannot call a web service from java script using ajax in .net 3.5 web applications
As like 2005 .net websites i tried to consume a web service from client side java script  using Ajax script manager in  .net 3.5 (2008) version web application it was not working, Event it works with 3.5 web sites, What i have to do to solve the issue. Thanks in advance Hi, can you create the least amount of code to reproduce it and post it? This gives us the ability to check out your code and better guide you. Also please check out this article: Create a Simple WCF Web Service and Use In JavaScript With Visual Studio 2008 and .Net 3.5.  Grz, Kris.Read my blog. Handy Fire...

Troubleshoot Web Service; Ajax AutoComplete events do not appear to not fire; Ajax web service appears to not work. .NET
Folks, I had the situation that Ajax AutoComplete events in the web service did not fire after I copied a project out of a folder, renamed it and moved it to a server. The fix was hard to find but easy to solve. I had some web service modules in an ASMX file that provided AutoComplete entries -- i.e., after the user keys in 2 or 3 characters, the list of possible entries with those leading characters is displayed for the user to select. To solve the problem, look at the web service's directive, not the code-behind or the ASMX designer.  Do a right-mouse-click...

Calling a Web Service from a Web Service
Hello,I was looking for some feedback on calling a web service from within a web service. I've heard that it's not good practice (or not possible). I have a scenario where I think it might make some sense.Within our infrastructure, we've created a web service that handles incoming updates on the statuses of all processes. This has proven to be a good thing since it allows applications to communicate across server to make status updates. It's also used by third party developers and applications to communicate with our infrastructure.Along these lines ... we are planning to create a new compon...

change a web reference to a web service in the config file of an object used by a windows service
In my solution (visual studios 2005), I have a windows service and a business object.  The business object has a web reference to a web service.  I maid the web reference dynamic and it created an applicationSettings section in the appconfig:<configuration>           <applicationSettings>        <Objects.Properties.Settings>            <setting name="Objects_LookupService_auth"        &nbs...

Can you call a web service from a web service?
I am trying to create a web service that itself consumes a 3rd party web service outside of our corporate firewall - so basically a web service consuming another web service.  I can consume this outside web service directly in an ASP.NET application without a problem.  But because the code is long and cumbersome, I wanted to provide our GUI developers an easy way to get all of the data they need from one source.  So I thought I could create an internal web service that would do a lot of things (query internal systems, for example) as well as consuming this external service.&nb...

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="http://www.dynix.com/schema/book">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

web service call failed: 500 while using the dynamicpopulateextender
hey all -  i downloaded tutorial #24 re: DPE with UC http://www.asp.net/learn/ajax-control-toolkit/tutorial-24-vb.aspx got the sample code to run just fine ok - but then i wanted to customise it and found that if changed the servicemethod name to just something as simple as "getDate2" (from "getDate") i get the above error can anyone tell me whats up with this? i mean if need be - ill just keep the getDate name but im worried that this is indicative of a bigger more hidden problem (and yes i did change the method name in the asmx file as well) thanks for y...

Consuming Web service from .net 3.5 web application using ajax
Hi , Before in .net 2005 ,I use to consume the  web service from client side via Ajax and java script. that's just adding web service inside the script manger services.But  it was not possible with .net 2008 version WEB APPLICATION   , Even it works well with .net 2008 web sites. Please help me to solve the issue. I have no idea what you mean. Please post the code that "does not work". NC...   I have the same problem.  I have a .NET 3.5 Web Application not Web Site.  I fully qualify the web service with the namespace i,e,  &n...

Changing URL in web.config for web service
I added a web reference to asmx file. In web.config - it adds - undefinedadd key="CoreService.CoreServices" value="http://test/CoreServices.asmx I then change it to <add key="CoreService.CoreServices" value="http://test2/CoreServices.asmx"/> But CoreService.CoreServices still looks for http://test/CoreServices.asmx.  What else do i have to change? I think CoreService.CoreServices are hard coded into the source code.  Girijeshhttp://www.girijesh.in/ I think CoreService.CoreServices are hard coded into the source code.  Girijeshhttp://www.girijesh.in/ So no ...

Web resources about - web service call failed: 500 using ajax hovermenu and web service with ascx file - asp.net.networking-webservices

top scoring links : AndroidAnything
... about getting in trouble for posting anything pirated/piracy related? Feel free to, like we said, post anything! More info at the bottom hovermenu. ...

DropDown Sample
Samples HOME Accordion AjaxFileUpload AlwaysVisibleControl Animation AreaChart AsyncFileUpload AutoComplete BalloonPopup BarChart BubbleChart ...

rising submissions : AndroidAnything
... about getting in trouble for posting anything pirated/piracy related? Feel free to, like we said, post anything! More info at the bottom hovermenu. ...

promoted links : AndroidAnything
... about getting in trouble for posting anything pirated/piracy related? Feel free to, like we said, post anything! More info at the bottom hovermenu. ...

Everything Android related. Anything at all!
... about getting in trouble for posting anything pirated/piracy related? Feel free to, like we said, post anything! More info at the bottom hovermenu. ...

newest submissions : AndroidAnything
... about getting in trouble for posting anything pirated/piracy related? Feel free to, like we said, post anything! More info at the bottom hovermenu. ...

most controversial links : AndroidAnything
... about getting in trouble for posting anything pirated/piracy related? Feel free to, like we said, post anything! More info at the bottom hovermenu. ...

gilded : AndroidAnything
... about getting in trouble for posting anything pirated/piracy related? Feel free to, like we said, post anything! More info at the bottom hovermenu. ...

Ajax Control Toolkit Tutorials - ASP.NET Ajax Library
ASP.NET Home Get Started Learn WEB APPLICATIONS Web Forms MVC Web Pages/Razor Mobile Single Page Apps Common ASP.NET Features WEB SERVICES / ...

AreaChart Sample
Samples HOME Accordion AjaxFileUpload AlwaysVisibleControl Animation AreaChart AsyncFileUpload AutoComplete BalloonPopup BarChart BubbleChart ...

Resources last updated: 12/18/2015 5:55:34 AM