Method Error 12031 Cascading Dropdownlist
asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies Home Asp.Net Ajax Gridview JavaScript SQL JQuery OOPS Concepts MVC Interview Questions Trace Mobile Contact Method error 500/12031 in ajax cascadingdropdown extender | AJAX CascadingDropDown - Method Error 500 By: Suresh Dasari Dec 12, 2011 Categories: Errors , General Introduction: Here I will explain how to solve the problem "Method error 500/12031 in ajax cascadingdropdown extender" using asp.net. Description: In previous post I explained clearly about Ajax cascading dropdownlist sample. Generally during implementation of cascading dropdonlist we will see our dropdowns shows error like "Method error 500 or Method Error 12031". This error is occurred because of missing following line of code in WebService. [System.Web.Script.Services.ScriptService()] After add above line of code to our web service page code would be like this [WebService(Namespace = "http://tempuri.org/")][WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)][System.Web.Script.Services.ScriptService()]// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. // [System.Web.Script.Services.ScriptService]public class CascadingDropdown : System.Web.Services.WebService{ After add above line of code try to run application it will work for you. Still if you're getting same error try to add ValidateRequest="false" in @Page line of web page like <%@ Page ...... ValidateRequest ="false" %> Happy Coding……… If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. Subscribe by RSS Subscribe by Email 9 comments : hemalisachdev said... Hi, I have writen same with all the mention things u say, bt still its gigving error Method Error 500 February 29, 2012 at 9:30 PM hiren said... Still i m getting this error plz give some solution July 9, 2012 at 8:21 AM Anonymous said... tomra tale baal chero November 28, 2012 at 5:50 AM Anonymous said... thank i soo much.. with ur help i solved my problem in just 2min March 7, 2013 at 12:22 PM prashant tyagi said... sir i m geeting error method 500 plz sir so solved it this issue nad another thing whre i
getting Method Error 500 or 12031 In Ajax CascadingDropdown, than you may have missed to include below mentioned line of code in code behind of your asmx (webservice) file Add this line in webservice's code behind [System.Web.Script.Services.ScriptService()] It should look like this [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.Web.Script.Services.ScriptService()] public class CascadingDropDown : System.Web.Services.WebService { It should fix the error This also occurs if there is any error in your sql statements or webservice code, you need to check them as well You would also like to read Implementing Ajax Cascading DropDownList in GridView with databse in ASP.NET Have http://www.aspdotnet-suresh.com/2011/12/method-error-50012031-in-ajax.html fun Related Posts: Failed to access IIS metabase error Blogger - Add dotnetshoutout button to all posts autometically C#.NET articles - creating online examination system in asp.net using master page and sql server Tweet If you like this post than join us or share Labels: AJAX, ASP.NET, C#, DropDownList 11 comments: Anonymous said... Thanks!! April 4, 2010 at 3:11 AM raphaww said... http://csharpdotnetfreak.blogspot.com/2009/04/method-error-500-12031-ajax.html OMG thanks a lot! June 16, 2010 at 5:33 AM Anonymous said... Thanks you only solved my problem June 26, 2010 at 12:45 PM lakshmi said... method error 500 in ajax cascading dropdown i use [System.Web.Script.Services.ScriptService()] also i got that error September 28, 2010 at 7:22 PM Anonymous said... thanks... @Satish December 24, 2010 at 7:00 PM Anonymous said... That was easy, thank you! November 28, 2011 at 10:09 AM Anonymous said... Method error 500 still persist..Please help January 13, 2012 at 11:55 PM hemalisachdev said... Still that error is there Method Error 500 Pls help... March 1, 2012 at 11:21 AM @fadrianamv said... tnk!!! June 4, 2012 at 11:36 PM Anonymous said... Thanks it's working October 5, 2012 at 3:06 PM Anonymous said... still got method 500 December 20, 2013 at 8:52 PM Post a Comment Post a Comment Click here if you are facing problem in writing comment.. Newer Post Older Post Home Subscribe to: Post Comments (Atom) Subscribe by E-mail Recent Posts Loading... Find More Articles Copyright © 2008-2012 csharpdotnetfreak.blogspot.com. All Rights Reserved. The content is copyrighted to
here for a quick overview of the site Help Center Detailed answers to http://stackoverflow.com/questions/16439120/ajax-cascading-dropdown-with-method-error-500 any questions you might have Meta Discuss the workings and http://aspalliance.com/1183_Creating_a_CascadingDropDown_Using_AJAX.2 policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow method error Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up AJAX Cascading Dropdown with Method Error 500 up vote 0 down vote favorite 1 I've have a c# cascadingdropdown which works perfectly in debug locally and method error 12031 in debug mode on the live server, but I get [Method Error 500] in both drop downs when I view the page live through a browser. If I click the first drop down [Method Error 500] that then populates the second dropdown with [Method Error 500]. Here's the ASPX code:
version="1.0" encoding="utf-8"?>AspAllianceRegisterEdit My ProfileAuthor ListWrite for UsAbout AspAllianceContact UsPrivacy PolicyLink To UsAdvertiseSubscribeFree NewsletterNewsletter ArchiveRSS Syndication .NET TutorialsLearn .NETLearn WCFLearn WPFLearn ASP.NETLearn AJAXLearn SilverlightLearn Visual StudioLearn ADO.NETLearn LINQLearn C# (CSharp)Learn VB.NETLearn Web ServicesLearn ControlsLearn BizTalkLearn SharePointLearn MobileLearn SQLLearn SQL ReportingLearn Windows FormsLearn XMLLearn Crystal ReportsLearn FarPointLearn DevExpressExamplesASP.NET 2.0 ExamplesASP TutorialsLearn ASPLearn VBScriptLearn JScriptLearn SQLLearn XMLSoftware ResourcesShopping Cart EcommerceCharts and DashboardsOther ResourcesLearn JavaLearn OracleOpinion / EditorialCrystal Reports AllianceWPF ResourcesAJAX ResourcesSilverlight ResourcesFree ToolsCache ManagerSimpleCMSReviewsBook ReviewsProduct ReviewsExpert AdviceBooksASP.NET Developer's CookbookSample ChaptersBook ReviewsCommunityRegular Expressions Print Add To Favorites Email To Friend Rate This Article Creating a CascadingDropDown Using AJAX page 2 of 5 by Electronic Screw Feedback Average Rating: Views (Total / Last 10 Days): 165340/ 124 Article Contents: Introduction Creating a new ASP.NET AJAX Enabled website Creating the database for the project Downloads Summary Creating a new ASP.NET AJAX Enabled website To create a new website in Visual Studio 2005 click, File >> New >> Web Site and select ASP.NET AJAX Enabled Web Site from the available templates. I named the application as CCDFromDatabase and used C# as the coding language. I used ASP.NET AJAX 1.0 Library in this sample. The latest library can be downloaded from Microsoft site [http://ajax.asp.net/downloads/default.aspx?tabid=47]. Figure 1 Add a reference to the latest AjaxControlToolkit.dll in your project. To add a reference, right click on the Project >> Ad