Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'.

Hello,

I get this lovely error whenever I attempt to load an AJAXToolKit ScriptManager. It is the only one I have on the page. If I use the regulare script manager, my extenders don't detect it. I'm placing the ScriptManager just after the <Form> tag.

The frustrating part is that it works when I preview it in the browser from my development machine it works, but once I place it the live server, it crashes on me Confused.

I've installed all of the .dlls in the proper places.

Also, I'm trying to attempt to do this when creating a new site with the AJAX ToolKit enabled template, still to no avail.


AntLaC, WebApp Developer
0
AntLaC
10/18/2007 11:32:15 AM
asp.net.ajax_control_toolkit 17816 articles. 1 followers. Follow

14 Replies
2287 Views

Similar Articles

[PageSpeed] 2

Hi Antlac,

Your problem seems that it is mainly caused by the System Enviroments.  Ajax-enabled program runs depend on .Net Framework2.0 or above.(If your application developed based on .NET Framework 3.5, please make sure it should be runs on .Net Framework 3.5) Sometimes , the newly created ajax application runs on .Net Framework 1.1(IIS).  So please check it first.  Second, you should check whether Asp.Net 2.0 Ajax Extensions V1.0 has been installed or not. 

Best regards,

Jonathan


Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Jonathan
10/23/2007 11:55:44 AM

Instead of starting another thread...I have the exact same error

There is no source involved.

Create a ASP.Net (3.5) page in VS08beta,

place a ToolScriptManager on the form with a TetBox and a CalendarExtendar targeting the TextBox and the 'View in Browser'  and it will give you

Thoughts?

 

Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'.

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.InvalidCastException: Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'.

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.

Stack Trace:

[InvalidCastException: Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'.]
   System.Web.Configuration.ApplicationSettings.EnsureSectionLoaded() +70
   System.Web.Handlers.ScriptResourceHandler.IsCompressionEnabled(HttpContext context) +7
   System.Web.Handlers.RuntimeScriptResourceHandler.System.Web.Handlers.IScriptResourceHandler.GetScriptResourceUrl(Assembly assembly, String resourceName, CultureInfo culture, Boolean zip, Boolean notifyScriptLoaded) +30
   System.Web.UI.ScriptReference.GetUrlFromName(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip) +293
   System.Web.UI.ScriptReference.GetUrl(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip) +237
   System.Web.UI.ScriptManager.RegisterScripts() +507
   System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +111
   System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +2052172
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2247

0
mastercontrolprogram
10/23/2007 7:23:03 PM

Hi MasterControlProgram,

Please change the web.config settings, I suspect your web.config is based on the .NET Framework 2.0. Here is the sample.

 

<!-- 
    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>
      <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
        <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
          <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
          <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
            <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
            <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
            <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
            <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
          </sectionGroup>
        </sectionGroup>
      </sectionGroup>
    </configSections>  


    <appSettings/>
    <connectionStrings/>
    <system.web>

        <!--
        Commented out to avoid "The current trust level does not allow use of the 'compilerOptions' attribute"
        <trust level="Medium"/>
        -->

        <!-- 
            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.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <!--<add assembly="System.Data.DataSetExtensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>-->
            <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
          </assemblies>

        </compilation>
        <!--
            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>
        -->


      <pages>
        <controls>
          <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
          <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
        </controls>
      </pages>

      <httpHandlers>
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
      </httpHandlers>
      <httpModules>
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      </httpModules>


    </system.web>

    <system.codedom>
      <compilers>
        <compiler language="c#;cs;csharp" extension=".cs" compilerOptions="/warnaserror-" warningLevel="4"
                  type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <providerOption name="CompilerVersion" value="v3.5"/>
        </compiler>
        <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" compilerOptions="/optioninfer+"
                  type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
          <providerOption name="CompilerVersion" value="v3.5"/>
        </compiler>
      </compilers>
    </system.codedom>
    
    <system.web.extensions>
      <scripting>
        <webServices>
          <!-- 
              Uncomment this section to enable the authentication service. Include 
             requireSSL="true" if appropriate. 
        
          <authenticationService enabled="true" requireSSL = "true|false"/>
          -->
          <!-- 
              Uncomment these lines to enable the profile service, and to choose the 
              profile properties that can be retrieved and modified in ASP.NET AJAX 
              applications.
        
           <profileService enabled="true"
             readAccessProperties="propertyname1,propertyname2"
             writeAccessProperties="propertyname1,propertyname2" />
          -->
          <!-- 
            Uncomment this section to enable the role service.         
            <roleService enabled="true"/>
          -->
        </webServices>
        <!--
        <scriptResourceHandler enableCompression="true" enableCaching="true" />
        -->
      </scripting>
    </system.web.extensions>
    <!-- 
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
    <system.webServer>

      <directoryBrowse enabled="true"/>

      <validation validateIntegratedModeConfiguration="false"/>
      <modules>
        <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.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=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
        <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"
             type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.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=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </handlers>
    </system.webServer>
</configuration>

I hope this help.

Best regards,

Jonathan

 

 

 


Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Jonathan
10/24/2007 2:38:20 AM

Thanks Jonathan - Made the changes you suggested, actually I just copied and pasted yours.  Results below

 

Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'.

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.InvalidCastException: Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'.

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.

Stack Trace:

[InvalidCastException: Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'.]
   System.Web.Configuration.ApplicationSettings.EnsureSectionLoaded() +70
   System.Web.Handlers.ScriptResourceHandler.IsCompressionEnabled(HttpContext context) +7
   System.Web.Handlers.RuntimeScriptResourceHandler.System.Web.Handlers.IScriptResourceHandler.GetScriptResourceUrl(Assembly assembly, String resourceName, CultureInfo culture, Boolean zip, Boolean notifyScriptLoaded) +30
   System.Web.UI.ScriptReference.GetUrlFromName(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip) +293
   System.Web.UI.ScriptReference.GetUrl(ScriptManager scriptManager, IControl scriptManagerControl, Boolean zip) +237
   System.Web.UI.ScriptManager.RegisterScripts() +507
   System.Web.UI.ScriptManager.OnPagePreRenderComplete(Object sender, EventArgs e) +111
   System.Web.UI.Page.OnPreRenderComplete(EventArgs e) +2052172
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2247

0
mastercontrolprogram
10/24/2007 2:29:59 PM

Hi MasterControlProgram,

Please make sure that your application runs on .NET Framework 3.5 and your Ajax Control Toolkit's version is compatible with the Framework. The web.config file that I posted is based on Ajax Control Toolkit V10920.  Also, you should pay attention to the settings that you added to the web.config for your needs.

Best regards,

Jonathan


Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Jonathan
10/25/2007 1:51:23 AM

Jonathan - followed link, grabbed the suggested files, installed and created new tab with the 10109 version of the AJAX components.

Maybe we should start from the top. 

From what I've seen in the MS training videos online (for example) the AJAX calander control is dragged onto the screen, targeted to a text box and "View in browser" ... done, works.  So I tried same by following along

Here're the exact step I've taken

Open VS2008beta

Select .Net framework 3.5 from the dropdown

create new website

open the aspx page

drag a ToolkitScriptManager (v. 1010920) onto the page

drag a textbox onto the page

drag an a calender control (v. 1010920) onto the page and set its Target to TextBox1

do nothing else, build the page, then view in browser....error (above)

 

I am very new to AJAX in ASP.Net (coming from .Net 1.1) so maybe there are some other things (configuration? installations?) I am not aware of.  Any hints or shoves in the right direction are appreciated.

 

Thanks!

MCP

0
mastercontrolprogram
10/25/2007 7:11:30 PM

Hi MCP,

It is such a weird issue.   I have tested on my local machine with VS2008 + Ajax Control Toolkit V10920 and it works  pretty fine. Here is the sample.

<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </ajaxToolkit:ToolkitScriptManager>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1">
        </ajaxToolkit:CalendarExtender>
    </form>
</body>
</html>

Please recompile the Ajax Control Toolkit source code and run its CalendarExtender Sample to see whether it works properly or not. If it works, we can come to a conclusion that your enviroments are ok.  So we can copy the sample website's web.config to your newly created website and refrence the AjaxControlToolkit V10920.  AjaxControlToolkit V10920 has two versions. One is for .Net Framework2.0 and another is for .NET Framework3.5.  So please make sure you are using the right version which should work on .NET Framework3.5.

Here is another useful hint.  

I hope this help.

Best regards,

Jonathan


Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Jonathan
10/26/2007 3:39:18 AM

"Please recompile the Ajax Control Toolkit source code and run its CalendarExtender Sample to see whether it works properly or not. " - Did, and does when I run the sample site, all works 

"If it works, we can come to a conclusion that your enviroments are ok." - Agree

"So we can copy the sample website's web.config to your newly created website... " - Did, same results below as above...

"...and refrence the AjaxControlToolkit V10920.  AjaxControlToolkit V10920 has two versions. One is for .Net Framework2.0 and another is for .NET Framework3.5.  So please make sure you are using the right version which should work on .NET Framework3.5." - And now you've lost me...how can I tell the diff? If I download the 'AjaxControlToolkit-Framework3.5' do I need to repoint or create a new AJAX toolbar in my dev env?  Do I need an AjaxTollbar2.0 and a AjaxToolBar3.5?

 

Results...

Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'.
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.InvalidCastException: Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'.

 

0
mastercontrolprogram
10/26/2007 5:37:03 PM

mastercontrolprogram:

"Please recompile the Ajax Control Toolkit source code and run its CalendarExtender Sample to see whether it works properly or not. " - Did, and does when I run the sample site, all works 

"If it works, we can come to a conclusion that your enviroments are ok." - Agree

"So we can copy the sample website's web.config to your newly created website... " - Did, same results below as above...

"...and refrence the AjaxControlToolkit V10920.  AjaxControlToolkit V10920 has two versions. One is for .Net Framework2.0 and another is for .NET Framework3.5.  So please make sure you are using the right version which should work on .NET Framework3.5." - And now you've lost me...how can I tell the diff? If I download the 'AjaxControlToolkit-Framework3.5' do I need to repoint or create a new AJAX toolbar in my dev env?  Do I need an AjaxTollbar2.0 and a AjaxToolBar3.5?

 

Results...

Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'.
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.InvalidCastException: Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'.

 

Hey MCP,

I  had to add an assembly binding redirect. I added it just before the closing configuration element.

   <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="3.5.0.0" newVersion="1.0.61025.0"/>
            </dependentAssembly>
        </assemblyBinding>
    </runtime>

Now though, it doesn't work in VS2008, but it does in the live server. So, I have 2 versions of the web.config.

Hopefully this will work for you.

Please mark this as answer if it worked. Geeked


AntLaC, WebApp Developer
0
AntLaC
10/26/2007 8:52:31 PM

Hi MCP, 

mastercontrolprogram:
If I download the 'AjaxControlToolkit-Framework3.5' do I need to repoint or create a new AJAX toolbar in my dev env?  Do I need an AjaxTollbar2.0 and a AjaxToolBar3.5?

Actually, it is based on the .NET Framework version that you use on your project.  When use different AjaxControlToolkit, please recreate the Toolbox.  Hope this help.

Best regards,

Jonathan


Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
0
Jonathan
10/29/2007 2:03:56 AM

Looks like grabbing the 10920 version did the trick.  I won't tell you whatelse I did that may or may not have helped (uninstall, reload) but appears to be behaving as described by M$.

Thanks!

0
mastercontrolprogram
10/29/2007 5:45:38 PM

I also had this error when deploying to a web server, although it worked fine when debugged from within VS 2008.  In the end I found that I had duplicate dependentAssembly tags in the web.config:

<dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>

Removing one of them fixed the error.

0
chambem9
8/27/2008 3:44:41 AM
I actually have the same problem and I know I already have System Web Extensions 1.0.61025 already installed in the SP instance and working with other web parts targeting ASP.Net 2.0.  This new web part project is targeting ASP .Net 3.5 and is attempting to use System.Web.Extensions 3.5.  So the question is can they work together?  Does the previious posts dependentAssembly mean that I can with this entry?  If so where does it go?
0
sschaff
1/24/2009 1:07:57 AM

Sorry Thanks my guess was the solution - just don't try putting web parts created using the ASP.Net 2.0 Extensions on the same page with ASP .Net 3.5 Ajax Extensions....  Strange things happen if you do

0
sschaff
1/25/2009 3:39:25 AM
Reply:

Similar Artilces:

Unable to cast object of type 'System.Web.Configuration.ScriptingAuthenticationServiceSection' to type 'System.Web.Configuration.ScriptingAuthenticationServiceSection'.
I have tried to upgrade an existing application from VS2005 to VS2008.  I downloaded the latest AjaxControlToolkit and referenced it in my project.  I'm getting the below error when I try to deploy to our QA servers.  I'm NOT seeing the issue on our local development machines that have VS2008 installed.   Unable to cast object of type 'System.Web.Configuration.ScriptingAuthenticationServiceSection' to type 'System.Web.Configuration.ScriptingAuthenticationServiceSection'.  What piece am I missing in the deployment?  All the w...

Unable to cast object of type 'System.Configuration.IgnoreSection' to type 'System.Configuration.AppSettingsSection'
Hey there, First of all, i'm not sure if this is the right forum for this question, so sorry if it isn't. I published my web-application using AJAX extensions to a webserver with IIS 6 and .NET 2.0 framework and AJAX Extensions installed on a windows 2003 server. When I want to view my website I get the following Error: Unable to cast object of type 'System.Configuration.IgnoreSection' to type 'System.Configuration.AppSettingsSection' I developed the web-application on my local machine, and there everything works fine. I really don't understand this error, so if a...

Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Compilation.BuildResultCompiledGlobalAsaxType'
I always get the below exception if I make a configuration change to the web.config file then request a page without re-building the project. Exception: Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Compilation.BuildResultCompiledGlobalAsaxType'. Stack Trace: [InvalidCastException]: Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Compilation.BuildResultCompiledGlobalAsaxType'.   at System.Web.Compilation.ApplicationBuildProvider.GetGlobalAsaxBuildResult(Boolean isPrec...

Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox'.
Hi, any idea why I'm getting the following error?Line 45: protected void CartGrid_RowUpdating(object sender, System.Web.UI.WebControls.GridViewUpdateEventArgs e) Line 46: { Line 47: TextBox QuantityTextBox = (TextBox)CartGrid.Rows[e.RowIndex].Cells[2].Controls[0]; Line 48: int Quantity = Convert.ToInt32(QuantityTextBox.Text); Line 49: Are you sure that the control at CartGrid.Rows[e.RowIndex].Cells[2].Controls[0] isn't a LiteralControl?  How are you creating code this in your code?Brent JenkinsASP.NET, C#, Web Developerwww.valewebdesign.co.uk  ...

Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox'
Hello, Goal: enter a number in two fields HoursPerUnit and PeoplePerUnit and the value for the third field, TotalHoursPerUnit will populate after the the number in the two fields have been caculated.  Using the code below I receive the error message above.  Please tell me what am I doing wrong? Do I need to cast the text as a literal?  Please help? Thank you in advance, <%@ Page Language="VB" MasterPageFile="Default.master" AutoEventWireup="false" CodeFile="frmHR.aspx.vb" Inherits="frmHR"...

Help Required
Server Error in '/' Application.--------------------------------------------------------------------------------Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.ITypedWebObjectFactory'. [InvalidCastException: Unable to cast object of type 'System.Web.Compilation.BuildResultCompiledAssembly' to type 'System.Web.Util.ITypedWebObjectFactory'.] System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +123 System.Web.Compilation.BuildMa...

Unable to cast object of type 'System.Web.UI.WebControls.Label' to type 'System.Web.UI.WebControls.TextBox'
I am attempting to "Update" a field in a Datagrid, but no matter what I do (Using either Label or Text Boxes)  I keep getting the same error: Unable to cast object of type 'System.Web.UI.WebControls.Label' to type 'System.Web.UI.WebControls.TextBox' The Error is highlighted below in the Sub... <==THE FIELD THAT CALLS THE ERROR  Any help would be greatly appreciated !!! Thanks !!   The code is as follows... <table border=0 height=210 bordercolor=olive ><tr valign=top><td> <asp:datagrid id="FacilityDataGrid"...

Unable to cast object of type 'System.Web.UI.WebControls.FormView' to type 'System.Web.UI.WebControls.DropDownList'.
Hi,  I have a formview with a dropdownlist created dynamically. i want to determine whether the dropdownlist was clicked. the code is written in the FormView1_DataBound method. I get the following error in the line below that is in italics and underlined: Unable to cast object of type 'System.Web.UI.WebControls.FormView' to type 'System.Web.UI.WebControls.DropDownList'.   Here is my code: ddl_iFullname = New DropDownList ddl_iFullname.ID = "ddl_iFullname" ddl_iFullname.DataSource = ObjectDataSource3 ddl_iFullname.DataTextField = "fullname" ddl_iFullname.DataValueField = "...

System.InvalidCastException: Unable to cast object of type 'System.Web.HttpInputStream' to type 'System.IO.FileStream'
I am trying to create a webpage that takes a file that someone want to upload and chop the file into smaller pieces, and then put back together again.  I have been trying to convert some code I found on Codeproject (FileSplitMerge).  They did it with VB which is what I want to use but it is a project not a web site so...  The problem that I am running into is I keep getting an error when I try to set: FileStream = HttpPostedFile.InputStream (I am using variables in my code) but I keep getting an error of: System.InvalidCastException: Unable to cast object of type 'Sys...

Unable to cast object of type 'System.Int32' to type 'System.Web.UI.WebControls.DataKey'
hi , i have a datalist with an itemtemplate section that contains an image and a delete button to delete the corresponding image . <asp:DataList ID="DataList1" CellSpacing="25" runat="server" DataSourceID="sqldatasource3" DataKeyField="ID" repeatColumns="4" repeatdirection="Horizontal" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="0px" CellPadding="3" > <ItemTemplate> <table border="0" cellpadding="0" cellspacing="0" > <tr> <a href='<%# DataBinder.Eval(Container.DataItem, "image", "ImageViewer.aspx?id={0}") %>' > <img a...

Unable to cast object of type 'System.EventArgs' to type 'System.Web.UI.WebControls.GridViewRowEventArgs'
hi this is really really bugging me please help. I have a web appliction that uses a Master Page. On one of the content pages I am presenting a gridview control bound to a spreadsheet. The gridview is contained within an ajax update panel. I want to add attributes to the rows of the gridview control once databound (mouseover effect). However I am getting the following error:- Unable to cast object of type 'System.EventArgs' to type 'System.Web.UI.WebControls.GridViewRowEventArgs' Can anyone help please. Here is the aspx code:-  <%@ Page Language="v...

Unable to cast object of type 'System.String' to type 'System.Web.UI.WebControls.Parameter'.
I'm getting this error on a vb.net page the needs to execute two separate stored procedures.  The first one, is the main insert, and returns the identity value for the ClientID.  The second stored procedure inserts data, but needs to insert the ClientID returned in the first stored procedure.  What am I doing wrong with including the identity value "ClientID" in the second stored procedure?  Unable to cast object of type 'System.String' to type 'System.Web.UI.WebControls.Parameter'. Description: An unhandled exception occurred during t...

Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'
I am getting the following error when i request the page in iis. it was working fine. if anybody give any solution for this is greatly appreciated   Server Error in '/' Application. Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'. 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.InvalidCastException: Unable to cast object of type '...

Web resources about - Unable to cast object of type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection' to type 'System.Web.Configuration.ScriptingScriptResourceHandlerSection'. - asp.net.ajax_control_toolkit

Resources last updated: 12/22/2015 9:48:49 AM