Wednesday, March 21, 2012

Urgent: AutoCompleteExtender doesnt work/Updatepanel doesnt work

This is my code for the AutoCompleteExtender

<asp:textboxid="txtQuickSearch"runat="server"CssClass="inputText"style="width:145px; "></asp:textbox>

<atlas:AutoCompleteExtenderrunat="server"ID="acSearch">

<atlas:AutoCompletePropertiesTargetControlID="txtQuickSearch"Enabled="True"ServicePath="http://localhost/Sony.BusinessSuite.Web.UI/AtlasServices/MasterData.asmx"ServiceMethod="GetAllModels"minimumprefixlength="2"/></atlas:AutoCompleteExtender>

When i start typing fiddler shows:

#ResultHostURLBodyCachingContent-TypeUser-defined1401localhost

/Sony.BusinessSuite.Web.UI/AtlasServices/MasterData.asmx?mn=GetAllModels

4.431text/html

The same happens with an update panel...

basically i've been trying to use atlas things in the application we are working on here for about 3 weeks now... and up until now it has been very cumbersome and time consuming.

Hi,

Could you post the code for the method you are using in your webservice

Thanks


Hi,

you are getting a 401. I believe that it happens because you are trying to access a web service in another domain and this is not allowed in normal conditions. Please checkthis thread.

Here's the webservice code, thanks in advance to have a look...

[WebService(Namespace ="http://tempuri.org/")]

[WebServiceBinding(ConformsTo =WsiProfiles.BasicProfile1_1)]

[ToolboxItem(false)]

publicclassMasterdata :WebService

{

[WebMethod]

publicstring[] GetAllModels(string prefixText,int count)

{

ArrayList filteredList =newArrayList();

//Get the available product categories from the principal object.

Principal principal = (Principal)Context.User;

List<Category> myCategories = principal.Categories;

List<DKCategory> myDKCategories =newList<DKCategory>();

foreach (Category catin myCategories)

myDKCategories.Add(newDKCategory(cat.OID));

//Get the models from the masterdata service (limited to the users available categories).

Proxy.Pricing.Model.ModelService ModelSVC =new Proxy.Pricing.Model.ModelService();

List<Model> myModelsSVC = ModelSVC.GetModels(myDKCategories,null);

foreach (Model modin myModelsSVC)

{

if (mod.Name.ToLower().StartsWith(prefixText.ToLower()))

filteredList.Add(mod.Name);

}

return (string[])filteredList.ToArray(typeof(string));

}

}


Hi,

I tried the solution in the thread you suggested, but it didn't work. I don't think it is related to this though, because the webservice i'm calling is in the same project than the page consuming it.

Could the problem be related to the fact i'm using the "web application project"? or nested masterpages?

Wesley


hello.

what response do you get from fiddler?


Hi,

Have you tried using as RelativePath within your ServicePath parameter?

Regards

No comments:

Post a Comment