Solved

Ajaxtoolkit error on IIS7

Posted on 2014-03-31
4
1,129 Views
Last Modified: 2014-04-24
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
Comment
Question by:Angel02
  • 2
4 Comments
 
LVL 41

Assisted Solution

by:guru_sami
guru_sami earned 50 total points
ID: 39968148
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
 
LVL 26

Accepted Solution

by:
Alan Warren earned 450 total points
ID: 39968492
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
 

Author Comment

by:Angel02
ID: 39970032
@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
 

Author Comment

by:Angel02
ID: 40020448
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
This video discusses moving either the default database or any database to a new volume.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now