ScriptManager\ Ajax installation on server side

Last post 02-07-2007 10:40 AM by Horizon. 17 replies.

Sort Posts:

  • ScriptManager\ Ajax installation on server side

    11-26-2006, 9:45 AM
    • Loading...
    • Hanch
    • Joined on 11-26-2006, 2:34 PM
    • Posts 12

    I host my application on a remote server, who runs ASP.NET 2.0

    What Ajax extensions do i need to put there to enable Ajax.

    On my desktop the application runs smoothely, as i installed Ajax extensions here, but i cant install nothing on the server. What should i put there to enable Ajax?

    thanks

    Filed under: ,
  • Re: ScriptManager\ Ajax installation on server side

    11-26-2006, 12:12 PM

    Hey man. I'm not quite sure what your problem is as you didn't provide much details, but if it's just the needed files and also the issue about the GAC, then this is what I'm answering here.

    Look, provided that you installed the extensions (the core) and the futures CTP (you should find them with these same names in the ASP.NET ajax download page) into your own machine, you can go to your installation location (typically "\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025"), and pick the DLLs there, and send them to the "\bin" folder of your remote site (the version deployed on the server).

    Well, this is strictly stated by Microsoft as a "not supported" scenario since ASP.NET BETA1, but, it does work great - for me at least. I do use the futures CTP and toolkit BTW. The one case I didn't try myself and think it "might" not work that good is when you have services proxies for mashups (if you don't know what that is, you're just fine, otherwise try it and tell me).

    Just watch out to do this on a machine that has any version of ASP.NET AJAX installed as it'd conflict with it. (typically this rule would apply to your own machine, unless you uninstall it after copying the DLLs).

    Mohamed Meligy
    Senior Software Engineer
    SilverKey Technologies (www.SilverKeyTech.com) - Egypt
    http://weblogs.asp.net/meligy
  • Re: ScriptManager\ Ajax installation on server side

    11-27-2006, 2:10 AM
    • Loading...
    • Hanch
    • Joined on 11-26-2006, 2:34 PM
    • Posts 12

    Hi and Thanks for the reply

    I did copy the relevant dll-s to the /Bin, but the problem remains the same. To be more specific, whenever i add the <asp:scriptmanager> tags to my aspx page, i get that error:

    Server Error in '/' Application.


    Attempt to access the method 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 to access the method failed.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

  • Re: ScriptManager\ Ajax installation on server side

    11-29-2006, 1:17 PM
    • Loading...
    • bhughes_1231
    • Joined on 10-02-2005, 9:35 PM
    • Bellingham, WA
    • Posts 88
    I am having the exact same issue.  It works fine on my local test server, but when I move the website to the remote server I receive the same error.
  • Re: ScriptManager\ Ajax installation on server side

    01-25-2007, 9:43 AM
    • Loading...
    • Horizon
    • Joined on 04-25-2005, 11:33 AM
    • Posts 68
    Does anyone have a solution for moving to a web host that does not have Ajax installed, how to exactly do it?  My host does not have Ajax installed so how do I move my project that has Ajax in it to my web host and is there more than just moving the dll's to the bin folder?
  • Re: ScriptManager\ Ajax installation on server side

    01-25-2007, 10:54 AM
    • Loading...
    • mohpor
    • Joined on 05-31-2006, 8:59 AM
    • Tehran - Iran
    • Posts 25

    Hey Guys, Be sure, more than 99.99% of servers don't run AJAX in their GAC (at least because it's CTP in some part).

    So, all of us need to run DLL's into /Bin folder of the Web Application. But, it's not the End, we also need to add some Tag mapping in web.config Configuration file.

    After updating about 10 times (!) Atlas and AJAX I do suggest you to do so:

    Make a Backup copy of your current web.config (if you have multiple web.config in separate folders of you application, you just need to change the one in the Application's root folder), then copy the web.config file from the extension's folder. Note that if you want to use the AJAX futures preview, copy the web.config of your CTP folder:

    For AJAX extension copy from (default location): C:\Program Files\Microsoft ASP.Net\ASP.NET 2.0 AJAX Extensions\v.1.0.61025\web.config

    For AJAX Futures Preview (January CTP): C:\Program Files\Microsoft ASP.Net\ASP.NET 2.0 AJAX Futures January CTP\v.1.0.61025\web_CTP.config   (Note that you have to rename it to web.config)

    then, open your old web.config and copy your custom settings back to the newly copied web.config file. if it fails, just restore your web.config back to the original one.

    Copy all DLLs in folders you just copied the web.config from, (if you want the preview, you have to copy DLLs from the Extension's folder too, but not vice versa).

    Heres the DLL list you have to copy:

    • System.Web.Extensions.dll (1.0.6131.0)
    • (Optional for preview) Microsoft.Web.Preview.dll (1.0.61231.0)

    and if you need AJAX Control toolkit too, copy the Control toolkit into your /bin.

    That's it! you've done.

    Mohammad Porooshani
  • Re: ScriptManager\ Ajax installation on server side

    01-28-2007, 8:27 PM
    • Loading...
    • Horizon
    • Joined on 04-25-2005, 11:33 AM
    • Posts 68

    Do you know why I would get this error when I try to use a control from the toolkit?

     

    Server Error in '/PowerRankings' Application.

    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: Could not load file or assembly 'AjaxControlToolkit' or one of its dependencies. The system cannot find the file specified.

    Source Error:

    Line 1:  <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
    Line 2:  
    Line 3:  <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
    Line 4:  
    Line 5:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Source File: /powerrankings/admin/default2.aspx    Line: 3

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'AjaxControlToolkit' could not be loaded.

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
    


    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

  • Re: ScriptManager\ Ajax installation on server side

    02-03-2007, 5:55 PM

    I am still having the same error.  i have included the System.Web.Extensions.dll and directly copied over the web.config (on a test site).  I have tried including all the other dll's (design, toolkit) as well.  Do i need to copy any of the other files over?  

     

    After adding a reference to the dll and updating the web.config, I still get the :

    Attempt to access the method 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 to access the method failed.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    I am sure that my web.config is to blame here, but I am at a loss on what it is.  Can anyone, who has a working site, provide a exerpt of their web.config?

  • Re: ScriptManager\ Ajax installation on server side

    02-07-2007, 7:48 AM
    • Loading...
    • vainternet
    • Joined on 02-07-2007, 12:42 PM
    • United Kingdom
    • Posts 12

    Copy the web.config from the C:/program files directory of the AJAX extensions, to the root directory and the bin directory 

  • Re: ScriptManager\ Ajax installation on server side

    02-07-2007, 9:24 AM
    • Loading...
    • vainternet
    • Joined on 02-07-2007, 12:42 PM
    • United Kingdom
    • Posts 12
    vainternet:

    Copy the web.config from the C:/program files directory of the AJAX extensions, to the root directory and the bin directory 

  • Re: ScriptManager\ Ajax installation on server side

    02-07-2007, 9:28 AM
    • Loading...
    • vainternet
    • Joined on 02-07-2007, 12:42 PM
    • United Kingdom
    • Posts 12

    <?

    xml version="1.0"?>

    <

    configuration>

    <

    configSections>

    <

    sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

    <

    sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

    <

    section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>

    <

    sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">

    <

    section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />

    <

    section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />

    <

    section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />

    </

    sectionGroup>

    </

    sectionGroup>

    </

    sectionGroup>

    </

    configSections>

    <

    system.web>

    <

    customErrors mode="Off"/>

    <

    pages>

    <

    controls>

    <

    add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    <

    add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>

    </

    controls>

    </

    pages>

    <!--

    Set compilation debug="true" to insert debugging

    symbols into the compiled page. Because this

    affects performance, set this value to true only

    during development.

    -->

    <

    compilation debug="true">

    <

    assemblies>

    <

    add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    </

    assemblies>

    </

    compilation>

    <

    httpHandlers>

    <

    remove verb="*" path="*.asmx"/>

    <

    add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    <

    add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    <

    add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

    </

    httpHandlers>

    <

    httpModules>

    <

    add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    </

    httpModules>

    </

    system.web>

    <

    system.web.extensions>

    <

    scripting>

    <

    webServices>

    <!--

    Uncomment this line to customize maxJsonLength and add a custom converter -->

    <!--

    <jsonSerialization maxJsonLength="500">

    <converters>

    <add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>

    </converters>

    </jsonSerialization>

    -->

    <!--

    Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->

    <!--

    <authenticationService enabled="true" requireSSL = "true|false"/>

    -->

    <!--

    Uncomment these lines to enable the profile service. To allow profile properties to be retrieved

    and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and

    writeAccessProperties attributes.

    -->

    <!--

    <profileService enabled="true"

    readAccessProperties="propertyname1,propertyname2"

    writeAccessProperties="propertyname1,propertyname2" />

    -->

    </

    webServices>

    <!--

    <scriptResourceHandler enableCompression="true" enableCaching="true" />

    -->

    </

    scripting>

    </

    system.web.extensions>

    <

    system.webServer>

    <

    validation validateIntegratedModeConfiguration="false"/>

    <

    modules>

    <

    add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    </

    modules>

    <

    handlers>

    <

    remove name="WebServiceHandlerFactory-Integrated" />

    <

    add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"

    type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    <

    add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"

    type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>

    <

    add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

    </

    handlers>

    </

    system.webServer>

    </

    configuration>

     

    In Bin/

    AJAXControlToolkit.dll

    AJAXExtensionsToolbox.dll

    System.Web.Extensions.Design.dll

    System.Web.Extensions.dll

    Filed under:
  • Re: ScriptManager\ Ajax installation on server side

    02-07-2007, 9:37 AM