.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

ajaxToolkit:CascadingDropDown and WCF and [Method 404 Error]

Posted By:      Posted Date: October 20, 2010    Points: 0   Category :ASP.Net


I am new to WCF issues and I'm trying to populate an <ajaxToolkit:CascadingDropDown> control  by using a wcf service . I have used 'Ajax-Enabled WCF' template ( VS 2008) for creating my service. there is no error in building time but when i open my dropdown there is only one item and that is  [Method 404 Error] .

I have searched for hours to find a solution but no  use. I will be thankful if anyone can help me out Crying




View Complete Post

More Related Resource Links

AjaxToolkit's CascadingDropDown control is throwing Method Error 404 in Hybrid system environment (

Hi Experts, We have an Asp.net web application, which is deployed in shared hosting environment. On shared hosting environment initial request to this web application is handled by Linux server and then based on the requested page the Linux server is redirecting request to web server on windows OS. Now, in our web application, we have used ajaxToolkit's CascadingDropDown control to populate three levels of categories. In the hybrid system described above, the CascadingDropDown control is throwing Method Error 404. I would appreciate if some body can guide on how to resolve this issue. The sample of code snap shot is mentioned below. ********************************************************************* Aspx file. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ <asp:DropDownList ID="ddlMajorLevelCategory" runat="server" Width="250px" ToolTip="Select Major Level Category" TabIndex="1"                            SkinID="h6BlueArial"> </asp:DropDownList>   <ajaxToolkit:CascadingDropDown ID="ccMajorCategory" runat="server" TargetControlID="ddlMajorLevelCategory" Category="M" PromptText=&qu

Sys.Net.WebServiceFailedException: The server method '' failed with the following error:



Let's say we have 2 time consuming functions, aaa and aaa1 inside a aspx page.

        public static string aaa(int i)
            return i.ToString();

        public static string aaa1(int i)
            return i.ToString();



        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
        <span id="displayspan"></span>
        <br />
        <input type="button" value=

Jscript error: Object does not support property or method


 Hi, i have little knowledge on javascript but i need to use this code get from somewhere for a jquery to work.

I face this "Jscript runtime error: Object does not support property or method" whenever im trying to run this page.

In my experience, im get this error msg 9 out of 10 times i use javascript in my system.

Im using Microsoft Visual web developer 2008, i wonder if this is related to my problem, i not sure there is anything i need to add as reference or update anything.

But anyway, in short, i just couldn't use javascript code when using this development tool because of this sort of error.

Anyway, it happen that last time i tried use the same type of jquery code in another project and it seems to work well without an error.

But now when im try to use it again in this recent project i created, it come out with this error and i have no idea how to solve it even look through google and this forum.

It doesn't really seems like its the code problem itself although im not sure, because any javascript code just couldn't work.

So below is my code that i need to use.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
<script type="text/javascript" src=&quo

The remote server returned an error: (405) Method Not Allowed.



{System.Net.WebException: The remote server returned an error: (405) Method Not Allowed.
   at System.Net.WebClient.UploadFile(Uri address, String method, String fileName)
   at System.Net.WebClient.UploadFile(Uri address, String fileName)
   at System.Net.WebClient.UploadFile(String address, String fileName)
   at Test.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\WebSite1\Test.aspx.cs:line 35}

Windows application, automated process will run on local user system...
trying to upload a file to website folder. website address:

System.Net.WebClient wc = new WebClient();
wc.UploadFile(website address, "c:/1.pdf");

Getting error from above line.. Am doing something wrong??
I dont want to use ftp or share folder logic..
is there any other way to upload the files to server??

Ajax Cascading drop down method error 500!


Sorry to trouble you all with something that has already been posted a million times but I have tried everything I can and stuck with for about 10 days now. Please help. I have created 2 tables Categories, Subcategories.

Categories table has Category_ID(Primary Key) and "Category" fields. Subcat table has SubcatID(Primary Key, Sub_cat and Category_ID(Foreign Key). Here's the code of the asmx file.

Service methods used in ASPX file ServiceMethod="GetVendors" and ServiceMethod="GetContactsForVendor". Please help me find the source of the method erro 500 and I will be very greatful.

<%@ WebService Language="VB" Class="CascadingDropdown1" %>

Imports System.Web.Script.Services

Imports AjaxControlToolkit

Imports System.Web

Imports System.Web.Services

Imports System.Web.Services.Protocols

Imports System.Collections.Generic

Imports System.Collections.Specialized

Imports System.Data.SqlClient

<ScriptService()> _
Public Class CascadingDropdown1
Inherits System.Web.Services.WebService

<WebMethod()> _
Public Function GetVendors(ByVal knownCategoryValues As String, ByVal category As String) As Cascadi

PUT method gives error 400 "Bad Request" in WCF REST Service Application

I am trying to learn WCF REST Services through http://blogs.msdn.com/endpoint/archive/2010/01/14/updating-state-in-wcf-webhttp-services.aspx , It's a link of Part 3 of 12 part blog series. Now I am trying the same stuff given in the part 3 with my own Entities and Entity Model instead of what is given in the blog. Here is my full project I am working on .. http://cid-9e3f62c0688824b0.skydrive.live.com/self.aspx/.Public/pronerveEPMS.zip For comparision with the code shown in the Blog I am following, you can download the zip file of the project from the same link given here at starting (At the end of the blog and before comments starts). And here is the method in Program.cs file of console project in my application that raises the exception.....        private static Role UpdateRole(HttpClient hc, Role role1)        {            Console.WriteLine("Updating Role {0} : ",     role1.RoleID);            Console.WriteLine();            string updateURI = "Roles/" + role1.RoleID.ToString();            HttpContent content = HttpContentExtensions.CreateDataContract(role1);            using (HttpResponseMessage response = hc.Put(upd

Method error 500 on cascading dropdown


Why do I get a method error 500 on this code:

<asp:DropDownList cssclass="textbox" ID="ddlCountry" runat="server" />
<asp:RequiredFieldValidator Display="Dynamic" SetFocusOnError="True" ID="rfvCountry" runat="server" ControlToValidate="ddlCountry" ErrorMessage="*" InitialValue=""/>
<cc1:CascadingDropDown ID="CascadingDropDown1" runat="server" TargetControlID="ddlCountry" Category="Country"
    prompttext="Select country" ServicePath="/LocalCities.asmx" ServiceMethod="GetCountries">

<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class LocalCities
    Inherits System.Web.Services.WebService

    <WebMethod()> _
    Public Function GetCountries(ByVal knownCategoryValues As String, ByVal category As String) As CascadingDropDownNameVa

error code:0xC0024104 source: Reporting Task for subplan- Description: the execute method on the tas


I am getting following error when running maintenance plan under schedule job. I am getting this error for maintenance cleanup task.  The job is not failing all the time but alternate weeks. I created same maintenance plan on test server(same configuration as PROD) and Maintenance cleanup task related job failed for first time and running fine from there. I don't know why it is causing failed. I checked maintenance plan history and it show successful each time. even i checked manually it deleted all the report files related to maintenance plan. History Cleanup task and Maintenance Cleanup task should not be created on same Maintenance Plan?....I know SQL Server 2005 had some problem with maintenance plan creation before SP2.

Method in type 'x' from assemby 'x' does not have an implementation - wcf hosted in iis error


Hi All

I have created a service in my asp.net project. It works alright in dev. When I installed the website on test server I started getting this error. I could not even browse the service in IIS on the test box. I have double checked the references to service contract and implementation. If there would have been incorrect reference, I would have not found implementation in dev as well.

Please help. Thanks
-= JL =-

how can i return 401 error from a method return ActionResult?


how can i return   401 error from a method return ActionResult?

EXPERT: Method error 500 in dropdown (solution is NOT adding System.Web.Script.Services.ScriptServic


Please only answer if you have read the full question!!

Ok...this thing is driving me crazy!!!!

I keep getting a method error 500 in my dropdown box.

All the posts on the web come with the same solution, but it doesnt work for me!
The code seems SO simple and consists of so few lines....but it just doesnt work!



<asp:DropDownList ID="ddlCountries" runat="server">

<cc1:cascadingdropdown ID="cddCountries" runat="server" Category="Country" Enabled="True" LoadingText="Loading...please wait." PromptText="Choose a country" ServiceMethod="GetCountries" ServicePath="geolocation.asmx"     TargetControlID="ddlCountries"></cc1:cascadingdropdown>

<%@ WebService Language="VB" CodeBehind="~/App_Code/geolocation.vb" %>

<System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
 Public Class geoloc



I have a package that connects to IBM DB2 and imports data and saves it into text files.There are around 200 txt files. am using IBM OLEDB provider for DB2. After importing data into some text files like may be 50 or 70 or 100 or 170 , my package fails with error

SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager  failed with error code 0xC0202009.

help needed plz...

Error, to access method failed


Salam To all,

please find my scenario,

i have two Class projects A,B and i have Webapplication project,

the web application call Class A,

the class A make some internal operation with class B.

when a function in a class A attempts to call Entities in Class B, i have the following Error:

Attempt by method 'Txns_Model.Txns_Configuration..ctor()' to access method 'System.Linq.Expressions.Expression.Lambda<System.Func`2<Txns_Model.Txns_Entity,Users_Model.Users_Entity>>(System.Linq.Expressions.Expression, System.Linq.Expressions.ParameterExpression[])' failed.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MethodAccessException: Attempt by method 'Txns_Model.Txns_Configuration..ctor()' to access method 'System.Linq.Expressions.Expression.Lambda<System.Func`2<Txns_Model.Txns_Entity,Users_Model.Users_Entity>>(System.Linq.Expressions.Expression, System.Linq.Expressions.ParameterExpression[])' failed.

Source Error:

Web service's method GetListItems fails with error "'_', hexadecimal value 0x0B, is an invalid ch


We are developing ASP.NET web application that interacts with SharePoint via web services. At some our customers' systems we encountered the following problem.
Web method GetListItems throws an exception :
 ' ', hexadecimal value 0x0B, is an invalid character. Line 42, position 31.

Stack trace of exception you can see below:
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at ITSMS.DAL.SPLists.Lists.GetListItems(String listName, String viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode queryOptions, String webID)

INNER MESSAGE: ' ', hexadecimal value 0x0B, is an invalid character. Line 42, position 31.

   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(St

Cascade dropdown lists [Method Error 12030]


My first try with Ajax, followed step by step an example and i get in my dropdownlists "[Method Error 12030]"

I changed the script manager and used ToolkitScriptManager

 <form id="RegisterForm" runat="server">
        <asp:ToolkitScriptManager ID="MyToolkitScriptManager" runat="server"></asp:ToolkitScriptManager>

The dropdown:

 <asp:Label ID="CitizenshipLabel" runat="server" AssociatedControlID="Citizenship">Select citizenship:</asp:Label>
                                <asp:DropDownList ID="Citizenship" runat="server"></asp:DropDownList>
                                <asp:CascadingDropDown ID="CitizenshipCascade" runat="server" TargetControlID="Citizenship" LoadingText="Retrieving citizenships..."

What is the best method of sending through e-mail and error that is caught with the try, catch, etc


Using VB, VS 2010,  I am wanting a remote web app to send me an e-mail when it finds an error using the try catch.  What is the best way to do that?

The remote server returned an error: (405) Method Not Allowed.

hi i declared,
      UriTemplate = "/CreateCustomer/cNo/{cNo}/cName/{cName}",
      Method = "POST")]
    bool InsertCustomer(string cNo, string cName);

/*service call*/

 public bool InsertCustomer(string cNo, string cName)
      bool Inserted;
      String connString = ConfigurationManager.ConnectionStrings["connectionstr"].ConnectionString;
      SqlConnection Conn = new SqlConnection(connString);
      SqlCommand Cmd = new SqlCommand();
      Cmd.Connection = Conn;
      Cmd.CommandText = "Insert into Customer Values(cid,cname)";
      Cmd.Parameters.AddWithValue("cid", Convert.ToInt32(cNo));
      Cmd.Parameters.AddWithValue("cname", cName);
      Inserted = Convert.ToBoolean(Cmd.ExecuteNonQuery());
      return Inserted;

/*client code */

  string ServiceUri = "http://localhost:portno/Service.svc/CreateCustomer/" + "cNo" + "/" + TextBox1.Text + "/" + "cName";
      WebRequest addRequest = WebRequest.Create(ServiceUri);
      addRequest.Method = "POST";
      addRequest.ContentType = "application/xml; charset=utf-8";
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend