Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1246
  • Last Modified:

Ajaxtoolkit error on IIS7

I converted a project from ASP.NET 2.0 to 4.0. It was working fine on development but once pushed to windows server 2008 (IIS 7) it looks like ajaxtoolkit is not being recognized. I do have the ajaxtoolkit.dll in the Bin folder on the server.
I have attached my web.config. A dropdown which uses ajaxtoolkit is not working. Also I get an error on the browser whenever I load the page "object doesn't support this property or method" on the following line on the browser.

<script type="text/javascript">
<!--
Sys.Application.add_init(function() {
  var h = Sys.Application.get_history();
  h.setServerId("_ctl0_MainCenterContent_History1", "_ctl0:MainCenterContent:History1");
})
Sys.Application.add_init(function() {
    $create(Sys.Extended.UI.ModalPopupBehavior, {"BackgroundCssClass":"modalBackground","OkControlID":"_ctl0_ContentLeftS_btnSave","PopupControlID":"_ctl0_ContentLeftS_Panel2","dynamicServicePath":"/CustomerWeb/WebHome.aspx","id":"_ctl0_ContentLeftS_ModalPopupExtender1"}, null, null, $get("_ctl0_ContentLeftS_BtnLaunch"));
});
Sys.Application.add_init(function() {
    $create(Sys.Extended.UI.AutoCompleteBehavior, {"completionInterval":500,"completionListCssClass":"autocomplete_completionListElement","completionListItemCssClass":"autocomplete_listItem","completionSetCount":20,"delimiterCharacters":";, :","firstRowSelected":true,"highlightedItemCssClass":"autocomplete_highlightedListItem","id":"AutoCompleteEx","minimumPrefixLength":1,"serviceMethod":"GetCustomerList","servicePath":"AutoComplete.asmx"}, null, null, $get("_ctl0_MainCenterContent_txtCustomer"));
});
webconfig.txt
0
Angel02
Asked:
Angel02
  • 2
2 Solutions
 
guru_samiCommented:
My first guess was ClientIDMode but I see you have it set in your web.config.
Are you using the ToolScriptManager or ScriptManager?
Also can you try explicitly setting ClientIDMode="AutoID" for your dropdownlist.
0
 
Alan WarrenCommented:
Hi Angel02
did you get the recommended compatible version of ajax controls toolkit for .net framework 4.0?
AJAX RECOMMENDED DOWNLOADS

Respectfully yours,
Alan
0
 
Angel02Author Commented:
@guru_sami
I am using toolkit script manager in my master page
 <ajaxToolkit:ToolkitScriptManager runat="server" ID="ScriptManager1">
                      </ajaxToolkit:ToolkitScriptManager>
I tried the ClientID in dropdown but it did not work. And there is still error on the page that I mentioned "object doesn't support...."

@Alan Warren
Thank you for the link. I did realize I was using version 3.5. Now I downloaded version 4.1 and out the new dll's in the Bin folder of my project. Is that sufficient? I reloaded the webpage but nothing changed. Still the same error and dropdown doesn't work unless page is refreshed.
0
 
Angel02Author Commented:
In the sample project that I got from Alan Warren's link, I obtained the following lines in the web.config. That fixed the issue and the webpage works like a charm!

 <httpHandlers>
      <add verb="*" path="AjaxFileUploadHandler.axd"
           type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit" />
      <add verb="*" path="CombineScriptsHandler.axd"
           type="AjaxControlToolkit.CombineScriptsHandler, AjaxControlToolkit" />
    </httpHandlers>
   </system.web>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <add name="AjaxFileUploadHandler" verb="*" path="AjaxFileUploadHandler.axd"
           type="AjaxControlToolkit.AjaxFileUploadHandler, AjaxControlToolkit" />
      <add name="CombineScriptsHandler" preCondition="integratedMode" verb="*" path="CombineScriptsHandler.axd"
           type="AjaxControlToolkit.CombineScriptsHandler, AjaxControlToolkit" />
    </handlers>
  </system.webServer>
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now