Continent:
Country:
======================================================= CountryService.asmx (code behind) ======================================================= using System; using System.Web; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Web.Services; using System.Web.Services.Proto
page... Tipper:
TipperId: https://bytes.com/topic/asp-net/answers/683921-ajax-webserivces-error-12030-a AutoPostBack="true" runat="server"/>
in Tipper.asmx (web method error service) i have written 2 functions for dropdown fill Public Function GetTipper(ByVal knownCategoryValues As String, ByVal category As String) As CascadingDropDownNameValue() Dim values As New List(Of CascadingDropDownNameValue)() Dim con As New SqlConnection("XXXX") str_qry = "SELECT distinct fld_VNo as vno method error 12030 FROM tbl_TripDetails where fld_VNO in (SELECT fld_VNo FROM tbl_SimVehicleMaster WHERE (fld_VType = 'Tipper'))" Dim ds As New DataSetDim dap As New SqlDataAdapter(str_qry, con) dap.Fill(ds) Dim tripno As Integer For Each dr As DataRow In ds.Tables(0).RowsFor i = 0 To ds.Tables(0).Rows.Count tripno = i //i have used this because result is a single column...... Next Dim tripname = dr("vno").ToString values.Add(New CascadingDropDownNameValue(tripno, tripname)) Next Return values.ToArray() End Function Public Function GetTipperid(ByVal knownCategoryValues As String, ByVal category As String) As CascadingDropDownNameValue()Dim categoryValues As New StringDictionary categoryValues = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues) Dim no As Integer no = CType(categoryValues("category"), Int32) Dim con As New SqlConnection("XXXX") Dim sqlselect As SqlCommand = New SqlCommand("select fld_tripid as tripid from tbl_TripDetails where fld_VNO=@no", con) sqlselect.CommandType = C
question and get tips & solutions from a community of 418,589 IT Pros & Developers. It's quick & easy. AJAX + Webserivces = error 12030 P: n/a kpg I have an AJAX enabled web service consumed by an AJAX enabled web app, given a zip code it returns the city and state. Tested the web service, it works fine. I created a services collection in the script manager and pointed to my web service. I call the web service from an html input button click, per MS examples. I get a 12030 error. Now it seems the web service must be in the same domain as the web app, while this is a severe limitation I figured this was the problem. So I created the web service on my localhost, I get the same error. I played around with page methods but kept getting object not defined errors so I gave up on that. (It seems the web method must be declared in the aspx file, but I still get this error.) Considering that the same domain limitation was enough to make the whole effort pointless (the web service will NOT be in the same domain as the web app) I thought I would go the traditional route and use xmlhttprequest. I've used It before in asp.net 1.1 and it worked well. So I copy my working code from a 1.1 app, change the url to point to my Web service, invoke it and get access denied. Why access denied? No doubt it's MS protecting me from myself again. Here's the code: I'm using ?wsdl just to get some xml back for testing. function Button1_onclick() { debugger; var url = 'http://localhost/webServices/ZipCode/ZipCodeService.asmx? wsdl'; // branch for native XMLHttpRequest object if (window.XMLHttpRequest) { req = new XMLHttpRequest(); req.onreadystatechange = onComplete; req.open("POST", url, true); req.send(null); // branch for IE/Windows ActiveX version } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.onreadystatechange = onComplete; req.open("POST", url, true); req.send(); } } } function onComplete(arg,usercontent) { debugger; if (req.readyState == 4) { if (req.status == 200)