Enabling ajax to a non-ajax-enabled site

Last post 08-29-2007 4:11 PM by Mnemonic. 12 replies.

Sort Posts:

  • Enabling ajax to a non-ajax-enabled site

    08-28-2007, 10:19 PM
    • Member
      76 point Member
    • Mnemonic
    • Member since 02-28-2007, 9:38 AM
    • Posts 295

    I REALLY dont want to start over with all i've done just to enable ajax... i understand that it's a matter of editing my web.config, but i've tried it several times and all i've gotten was build errors.... any chance someone can post an ajax enabled web.config with my parameters in there? I'd sooooooooo appreciate it!!

    Thanks!

     

     

    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    	<appSettings/>
    	<connectionStrings>
    		<add name="ConnectionString" connectionString="Data Source=*removed*;Initial Catalog=*removed*;Persist Security Info=True;User ID=*removed*;Password=*removed*" providerName="System.Data.SqlClient"/>
    		<add name="Authentication" connectionString="Server=*removed*;Initial Catalog=*removed*;Persist Security Info=True; User ID=*removed*;Password=*removed*" providerName="Authentication"/>
    	</connectionStrings>
    	<system.web>
    		<compilation debug="true" strict="false" explicit="true">
    			<assemblies>
    				<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    				<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    				<add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    				<add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
    		<pages>
    			<namespaces>
    				<clear/>
    				<add namespace="System"/>
    				<add namespace="System.Collections"/>
    				<add namespace="System.Collections.Specialized"/>
    				<add namespace="System.Configuration"/>
    				<add namespace="System.Text"/>
    				<add namespace="System.Text.RegularExpressions"/>
    				<add namespace="System.Web"/>
    				<add namespace="System.Web.Caching"/>
    				<add namespace="System.Web.SessionState"/>
    				<add namespace="System.Web.Security"/>
    				<add namespace="System.Web.Profile"/>
    				<add namespace="System.Web.UI"/>
    				<add namespace="System.Web.UI.WebControls"/>
    				<add namespace="System.Web.UI.WebControls.WebParts"/>
    				<add namespace="System.Web.UI.HtmlControls"/>
    			</namespaces>
    		</pages>
    		<authentication mode="Forms"/>
    		<membership defaultProvider="Authentication">
    			<providers>
    				<clear/>
    				<add connectionStringName="Authentication" commandTimeout="60" description="CustomDBConnection" enablePasswordRetrieval="false" enablePasswordReset="true" maxInvalidPasswordAttempts="8" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" requiresQuestionAndAnswer="false" applicationName="VeradataWebsite" name="Authentication" type="System.Web.Security.SqlMembershipProvider"/>
    			</providers>
    		</membership>
    		<profile defaultProvider="SqlProvider" enabled="true">
    			<providers>
    				<clear/>
    				<add name="SqlProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="Authentication" applicationName="VeradataWebsite" description="SqlProfileProvider for Veradata"/>
    			</providers>
    		</profile>
    		<customErrors mode="Off"/>
    	</system.web>
    </configuration>
    
     
    Post free ads at http://www.floofie.com
  • Re: Enabling ajax to a non-ajax-enabled site

    08-28-2007, 11:16 PM
    • Star
      8,978 point Star
    • dwhite
    • Member since 02-08-2007, 2:25 PM
    • Bristol, CT
    • Posts 1,422
  • Re: Enabling ajax to a non-ajax-enabled site

    08-28-2007, 11:26 PM
    • Member
      76 point Member
    • Mnemonic
    • Member since 02-28-2007, 9:38 AM
    • Posts 295

    Well, i tried following that, and i got like 50 errors that i put things in the wrong place...

    Post free ads at http://www.floofie.com
  • Re: Enabling ajax to a non-ajax-enabled site

    08-28-2007, 11:35 PM

    See the link for configuring AJAX

    http://www.asp.net/ajax/documentation/live/ConfiguringASPNETAJAX.aspx

    Can you post what kind of error you are getting,

    So it will be more helpful to solve your problem

    Chetan Sarode
    Software Engineer,
    Approva Systems Pvt Ltd,
    Pune, India.
  • Re: Enabling ajax to a non-ajax-enabled site

    08-28-2007, 11:57 PM
    • Member
      76 point Member
    • Mnemonic
    • Member since 02-28-2007, 9:38 AM
    • Posts 295

    OK, this is what i put in my web.config, and i am getting a ton of errors like

     Element 'ScriptManager' is not a known element. , acctually, every control inside an updatepanel on my page gets this error.

     Web.config:

    <?xml version="1.0"?>
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
      <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>

     <appSettings/>
     <connectionStrings>
      <add name="ConnectionString" connectionString="Data Source=*removed*;Initial Catalog=*removed*;Persist Security Info=True;User ID=*removed*;Password=*removed*" providerName="System.Data.SqlClient"/>
      <add name="Authentication" connectionString="Server=*removed*;Initial Catalog=*removed*;Persist Security Info=True; User ID=*removed*;Password=*removed*" providerName="Authentication"/>
     </connectionStrings>
     <system.web>
      <compilation debug="true" strict="false" explicit="true">
       <assemblies>
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add assembly="System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/></assemblies></compilation>
      <pages>
       <namespaces>
        <clear/>
        <add namespace="System"/>
        <add namespace="System.Collections"/>
        <add namespace="System.Collections.Specialized"/>
        <add namespace="System.Configuration"/>
        <add namespace="System.Text"/>
        <add namespace="System.Text.RegularExpressions"/>
        <add namespace="System.Web"/>
        <add namespace="System.Web.Caching"/>
        <add namespace="System.Web.SessionState"/>
        <add namespace="System.Web.Security"/>
        <add namespace="System.Web.Profile"/>
        <add namespace="System.Web.UI"/>
        <add namespace="System.Web.UI.WebControls"/>
        <add namespace="System.Web.UI.WebControls.WebParts"/>
        <add namespace="System.Web.UI.HtmlControls"/>
       </namespaces>
    <controls>
          <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        </controls>

      </pages>
      <authentication mode="Forms"/>
      <membership defaultProvider="Authentication">
       <providers>
        <clear/>
        <add connectionStringName="Authentication" commandTimeout="60" description="CustomDBConnection" enablePasswordRetrieval="false" enablePasswordReset="true" maxInvalidPasswordAttempts="8" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" requiresQuestionAndAnswer="false" applicationName="VeradataWebsite" name="Authentication" type="System.Web.Security.SqlMembershipProvider"/>
       </providers>
      </membership>
      <profile defaultProvider="SqlProvider" enabled="true">
       <providers>
        <clear/>
        <add name="SqlProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="Authentication" applicationName="VeradataWebsite" description="SqlProfileProvider for Veradata"/>
       </providers>
      </profile>
      <customErrors mode="Off"/>
    <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.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.web>
    <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-ISAPI-2.0"/>
        <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>

    Post free ads at http://www.floofie.com
  • Re: Enabling ajax to a non-ajax-enabled site

    08-29-2007, 8:14 AM
    • Star
      8,978 point Star
    • dwhite
    • Member since 02-08-2007, 2:25 PM
    • Bristol, CT
    • Posts 1,422

    Do you have VS SP1 installed as well as the AJAX 1.0 framework? See: http://geekswithblogs.net/ranganh/archive/2007/08/06/114452.aspx

    -Damien

     

    Visoft, Inc - Home | Blogs

    Latest Blog Post: Silverlight DataBinding Bug
  • Re: Enabling ajax to a non-ajax-enabled site

    08-29-2007, 11:45 AM
    • Member
      76 point Member
    • Mnemonic
    • Member since 02-28-2007, 9:38 AM
    • Posts 295

    dwhite:

    Do you have VS SP1 installed as well as the AJAX 1.0 framework? See: http://geekswithblogs.net/ranganh/archive/2007/08/06/114452.aspx

    -Damien

     

     

    Wow, i sure do home you're right, cause this is the most painful upgrade i've ever dealt with... it's been 2 hours at 100% cpu usage, and the installer is still gathering required information... and yes, i've rebooted... this is freakin terrible!

    Post free ads at http://www.floofie.com
  • Re: Enabling ajax to a non-ajax-enabled site

    08-29-2007, 11:51 AM
    • Star
      8,978 point Star
    • dwhite
    • Member since 02-08-2007, 2:25 PM
    • Bristol, CT
    • Posts 1,422

    Yea, make sure nothing else is running when installing VS SP1. 

    -Damien

    Visoft, Inc - Home | Blogs

    Latest Blog Post: Silverlight DataBinding Bug
  • Re: Enabling ajax to a non-ajax-enabled site

    08-29-2007, 3:06 PM
    • Member
      76 point Member
    • Mnemonic
    • Member since 02-28-2007, 9:38 AM
    • Posts 295

     Well, that was extremely painful to watch... but there no more errors...  BUT... ajax still isnt working.

     

    I tried a new page with a simple update panel and progress panel with a system.threading.thread.sleep(3000), and i got no progress popup...

     

    Any ideas now? 

    Post free ads at http://www.floofie.com
  • Re: Enabling ajax to a non-ajax-enabled site

    08-29-2007, 3:14 PM
    • Star
      8,978 point Star
    • dwhite
    • Member since 02-08-2007, 2:25 PM
    • Bristol, CT
    • Posts 1,422

    Try creating a new, small "ASP.NET AJAX Enabled Web Application" project to see if that works...

    -Damien

     

    Visoft, Inc - Home | Blogs

    Latest Blog Post: Silverlight DataBinding Bug
  • Re: Enabling ajax to a non-ajax-enabled site

    08-29-2007, 3:22 PM
    • Member
      76 point Member
    • Mnemonic
    • Member since 02-28-2007, 9:38 AM
    • Posts 295

    Yes, it does work. 

    Post free ads at http://www.floofie.com
  • Re: Enabling ajax to a non-ajax-enabled site

    08-29-2007, 3:28 PM
    Answer
    • Star
      8,978 point Star
    • dwhite
    • Member since 02-08-2007, 2:25 PM
    • Bristol, CT
    • Posts 1,422

    Take the web.config from the working site and modify it with the settings from your old file (e.g. connectionStrings, etc).  Now add the web.config to your actual site and see if that solves your issue.

    -Damien

    Visoft, Inc - Home | Blogs

    Latest Blog Post: Silverlight DataBinding Bug
  • Re: Enabling ajax to a non-ajax-enabled site

    08-29-2007, 4:11 PM
    • Member
      76 point Member
    • Mnemonic
    • Member since 02-28-2007, 9:38 AM
    • Posts 295

    Awesome! Its working!!

     

    Now i just need some help with what im doing with it, but i'll save that for another post.. ;) 

    Post free ads at http://www.floofie.com
Page 1 of 1 (13 items)