Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
hii there,

i am using windows hosting of godaddy.com and i am making my project in asp.net 2.0 bu using ajax 1.0 . But ajax is not working in there hosting, when i implement AJAX in my project then "Internal server error" comes.

Actually i have ajax dll in my Bin folder , and i am calling my bin dll from web.config file. Following is my file :

C#
<!-- 
    Note: As an alternative to hand editing this file you can use the 
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in 
    machine.config.comments usually located in 
    \Windows\Microsoft.Net\Framework\v2.x\Config 
-->
<configuration>
  <configsections>
  
  </configsections>
  <appsettings>
    <!--<add key="constring" value="Server=localhost;Database=xxxx;uid=xxxx;" />-->
    <add key="constring" value="Data Source=xxxx;Initial Catalog=xxxx;User ID=xxxx;Password=xxxxxx" />
    <add key="constring1" value="Data Source=xxxx;Initial Catalog=xxxx;User ID=xxxx;Password=xxxx" />
    </appsettings>
  <connectionstrings>
    
  <system.web>

    <httphandlers>
      <add verb="GET" path="FtbWebResource.axd" type="FreeTextBoxControls.AssemblyResourceHandler,FreeTextBox" />
      <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>
    <!--<pages>
      <controls>
        <add tagprefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </controls>
    </pages>-->
    <customerrors mode="Off" />
    
    <!-- 
            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.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <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" />
      </assemblies>
    </compilation>
    <httphandlers>
      <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="true" />
    </httphandlers>

   

   

   
    <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
    <authentication mode="Windows" />
    <!--
            The <customerrors> section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        <customerrors mode="RemoteOnly" defaultredirect="GenericErrorPage.htm">
            <error statuscode="403" redirect="NoAccess.htm" />
            <error statuscode="404" redirect="FileNotFound.htm" />
        </customerrors>
        -->
  </customerrors></authentication></system.web>
 

</connectionstrings></configuration>



Actually Problem is only in web.config file with following code :

XML
<httpHandlers>
      <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="true"/>
    </httpHandlers>




when i removes this code then error doesnot comes , when i puts this code then Internal server error comes. And this code is neccesary for using ajax. At localhost without this code ajax stops working.

I have also shared this problem with godaddy and they replied :


ASP.NET AJAX assembly (System.Web.Extensions.dll) is installed in the global assembly cache (GAC). Do not include the assembly in the Bin folder of your AJAX-enabled website.


We have tested the hosting account explicitly and we are able to see that AJAX and Server side includes are working without issue. It appears that the issue is coming from your web.config file as when we disable this file any errors are no longer present.


Please any one try to solve my this problem , or tell me what code i have to write in web.config file for ajax .
Posted
Updated 5-Sep-11 3:29am
v2

1 solution

They've given you the answer: you need to read it again and/or ask them for clarification as you do not understand what they have told you.

Hint: you need 2 copies of Web.config - one for local and one for GoDaddy.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 5-Sep-11 13:20pm    
OP asks for more help; please see (deleted) "solution" which is actually a question.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900