HELP! Strange error when calling web service from web page.

Hey there.

I have a .NET 1.1 web service that does a simple query of our AD implementation. I'm trying to consume it in an simple .NET 2.0 webpage, but am having a terrible time wiring up this particular web service.

I have a GridView (GV) that is bound to an ObjectDataSource (ODS). At runtime, the ODS reads in the QueryString to get the passed query criteria (i.e. "MyPage.aspx?SearchText=(sn=A*)").

When I run the web page I get the following error:

Exception has been thrown by the target of an invocation.

I cannot seem to pinpoint why this is happening. The webservice runs perfectly fine if I call up the ASMX file and run the method. I see the results as expected.

I tried an alternative way - where I create a dataset at runtime and just populate it with the results from the web service and databind the GridView to the dataset. The problem with this approach is I would have to write the paging/sorting code out by hand (which I do not want to deal with). When I run the web page with this setup, it works fine but the paging/sorting doesn't work (because the dataset is not saved in ViewState as it would be with the ODS in my desired structure above).

Can someone please help me out with how to fix the error - or some other solution?


8/7/2006 2:31:39 PM 7071 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 19

I discovered the web service method wasn't handling a couple of "Nothing" values that could occur (the method is leveraged across a few apps). The original exception was "Unknown Error (800X...something blah blah)."

But the error wasn't getting handed off to the consuming web app (for some reason)... can't tell why. Somehow it got changed to the error I quoted in the first post.

Anyway, I tweaked the web service method to account for the possible Nothing values and all seems well with the universe again. Whew.

8/7/2006 4:20:58 PM

Similar Artilces:

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...

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...

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: Hope this helps....

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="">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

difference of calling web services and calling web page
Dear all,  What is the difference of call a web services instead of calling a aspx page which is also programming can accept parameters and return results? Webservice -- Soap protocol Webapplication  -- HTTP protocol Webservices are of two Major types Xml & SOAP HttpWebServices Basic difference is in usage and implementation. We use a webservice inside a website. it is added as a reference or we can call it through HttpWebRequests and Response objects. Webpages are the components that have presentation and logic, while web services provide the service that we...

Ajax error calling Web Service from Web Application Project vs Web Site
I am implementing the code from the Asp.Net Ajax Video Demo “How Do I: Make Client-Side Network Callbacks with ASP.NET AJAX?”  The Web page is generating a javascript error (‘SimpleService’ is undefined) and is unable to recognize the Web service.  The downloaded examples work, however I have created the Demo (both the page and the web service) in a Web Application Project, rather than a Web Site.  The demo uses a Web site.  Because of this the page does not recognize the Web service. To ask the question another way: What needs to be done differently in a Web Service...

How i create web services & call web services?
Give me the solution of how i create webservices & call it and what is purpose of web services ?? PlsGuree  >how i create webservicesVery much the same as creating a new web site site - it is just a different project type. > & call it andAdd a web reference to an existing project to consume the web service.>what is purpose of web services ??To send and receive data.Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. &...

.NET web services Vs Java Web Services
Hello, does anyone know of a book or good source of information that compares .NET and Java Web Services? (I would like soemthing neutral if possible). I am thinking of approaching this subject for my dissertation? Many Thanks Rob Hi Rob, Last year I had to give a powepoint presentation on Web Services. I noticed some good books at barnes and noble that discussed the subject. These books were specific to Java and discussed Web Services in a very clear fashion. They gave some elementary examples that were easy to understand. I have not yet had the pleasure of creatin .NET Web Servi...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

Unable to call web service from web page
 I know this has probably been asked dozens of times before but as it's a fairly general, simple question I'm not sure what to search under.I have a very simple web service that I want to make a callback to (from an AJAX.NET ScriptManager). At this stage all it returns is the out-of-the-box Hello World string. The web service, DataService.asmx, is as follows:[WebService(Namespace = "")][WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)][System.Web.Script.Services.ScriptService()]public class DataService : System.Web.Services.WebService{&nbs...

Web Site Project: How to configure web service URL in web.config (web service defined in a referenced DLL)
I have a web site that references a business logic DLL project. In the business logic project, there is a web service defined in its app.config file something like this: <applicationSettings>  <MyNamespace.BLL.Properties.Settings>    <setting name="MyNamespace_BLL_MyServer_ServiceName" serializeAs="String">    <value>http://blah.blah.blah.asmx</value>  </setting>  </MyNamespace.BLL.Properties.Settings></applicationSettings> When the web site is published, the web ...

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...

web web web
Name: bahadir Email: Product: Firefox 2 Beta 2 Summary: web web web Comments: web sayfası yapmak Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 ...

Web resources about - HELP! Strange error when calling web service from web page. -

Strange - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Star Wars: Peter Sumner recalls 'a strange little American sci-fi movie'
George Lucas, Harrison Ford and Alec Guinness were all on set when the only Australia worked on the sci-fi classic.

NSW captain Paul Gallen says it would be 'strange' for Queensland to turn to Kevin Walters as coach
NSW skipper Paul Gallen believes it would be a &quot;little bit strange&quot; for his Queensland counterparts to offer Kevin Walters the coaching ...

San Bernardino shooting: Strange and surreal scenes inside the home of alleged terrorists
In almost three decades in journalism, you would think you'd have seen it all. The best, and the worst, that the profession, and those who it ...

Sydney FC fans' desertion felt very strange, says Tony Pignata, as A-League stoush with FFA continues ...
The vibe at the Sydney Football Stadium was all-but dead on Friday, just as fans declared football in this country would be if they continued ...

FBN’s Strange Inheritance Host Discusses Her Favorite Destinations
FBN’s Strange Inheritance will air it’s mid-season finale tonight at 9 p.m. ET and to celebrate, host Jamie Colby is featured in a variety of ...

Marvel calls ‘Doctor Strange’ a ‘mind-trip action film’ in new featurette
Of all the films releasing during Phase 3 of the Marvel Cinematic Universe, none are more mystifying than Doctor Strange . He's not only one ...

PUTIN THE IMMORTAL: Strange Pictures Fuel Rumors That Russian President is a Vampire
Well, it's on the Internets and it's The Daily Mail , so the story has got to be true . A photograph from almost 100 years ago has some on social ...

Strange Bedfellows: Clinton, Rubio Align Against Sanders, Cruz on Foreign Policy
You won't believe who agrees with whom when it comes to dealing with Middle East dictators

The Strange Lives of the Farook-In-Laws
New light is being shed on the "quiet" life of Islamic terrorists Syed Rizwan Farook and Tashfeen Malikand a strange web of in-laws.

Resources last updated: 12/21/2015 8:25:02 AM