This is a migrated thread and some comments may be shown as answers.

Trouble with Mono

6 Answers 132 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jordan Earls
Top achievements
Rank 1
Jordan Earls asked on 11 Feb 2010, 04:25 PM
Hello, I am trying to get my project ported to Mono, (it was working before adding Telerik controls)

I get an error 500 when running it from xsp2 on Suse Linux on Mono 1.6.1 The stack trace is:

System.InvalidCastException: Cannot cast from source type to destination type. 
  at System.Web.UI.ScriptManager.GetCurrent (System.Web.UI.Page page) [0x00000] in <filename unknown>:0  
  at Telerik.Web.UI.RadAjaxControl.OnInit (System.EventArgs e) [0x00000] in <filename unknown>:0  
  at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000] in <filename unknown>:0  
  at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000] in <filename unknown>:0  
  at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000] in <filename unknown>:0  
  at System.Web.UI.Control.InitRecursive (System.Web.UI.Control namingContainer) [0x00000] in <filename unknown>:0  
  at System.Web.UI.Page.InternalProcessRequest () [0x00000] in <filename unknown>:0  
  at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context) [0x00000] in <filename unknown>:0  

We have the telerik stuff in a master page. The master page is used by all the pages in the project, so I am just trying to load basically just a bare-bones Default.aspx page. The relevant markup in the master page is

<body> 
    <form id="MasterPageForm" runat="server"
    <asp:ScriptManager ID="OurScriptManager" runat="server" /> 
 
    <telerik:RadAjaxManager ID="OurRadAjaxManager" runat="server"
            <AjaxSettings> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
         
    
         
         <telerik:RadWindowManager ID="OurRadWindowManager" ShowContentDuringLoad="false" VisibleStatusbar="false" 
            ReloadOnShow="true" runat="server"
            <Windows> 
                <telerik:RadWindow  runat="server" Title = "Test" ID="RadWindowAddEditGridItem" Behaviors="Close"  
                    NavigateUrl="Dialogs/DialogAddEditGridItem.aspx" Width="600px" Height="500px" VisibleTitlebar="true" OnClientClose="closeRadWindow" >                  
                </telerik:RadWindow>             
            </Windows> 
        </telerik:RadWindowManager> 

Also, I am using the Telerik .Net 2.0 demo assemblies

Also, note that removing all telerik references from the master page's markup makes it so it will compile and work.

6 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 12 Feb 2010, 04:16 PM
I don't really know much about mono, but did you register the Telerik control's handlers in the web.config file or is that not needed for them to work in mono. I'm assuming that's the reason they don't work because they require handlers to supply the javascript files that they use and you say when you remove the controls from the page that it compiles, so it must be that.

I hope that helps.
0
Jordan Earls
Top achievements
Rank 1
answered on 12 Feb 2010, 07:12 PM
No, I have my web.config including the appropriate handlers and controls.. My web.config is:

<?xml version="1.0"?> 
<!--  
    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> 
  <!--  
        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. 
    --> 
  <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> 
        <add key="Telerik.Skin" value="WebBlue"/> 
    </appSettings> 
 
    <system.web> 
    <!--  
            Set compilation debug="true" to insert debugging  
            symbols into the compiled page. Because this  
            affects performance, set this value to true only  
            during development. 
        --> 
    <!-- 
            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 mode="Off" /> 
    <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 tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/> 
      </controls> 
    </pages> 
    <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=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
        <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> 
        <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> 
      </assemblies> 
    </compilation> 
    <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" /> 
        <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/> 
        <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/> 
    </httpHandlers> 
  </system.web> 
  <system.codedom> 
    <compilers> 
      <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
        <providerOption name="CompilerVersion" value="v3.5" /> 
        <providerOption name="WarnAsError" value="false" /> 
      </compiler> 
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
        <providerOption name="CompilerVersion" value="v3.5" /> 
        <providerOption name="OptionInfer" value="true" /> 
        <providerOption name="WarnAsError" value="false" /> 
      </compiler> 
    </compilers> 
  </system.codedom> 
  <runtime> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
      <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.Design" publicKeyToken="31bf3856ad364e35" /> 
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" /> 
      </dependentAssembly> 
    </assemblyBinding> 
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
      <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.Design" publicKeyToken="31bf3856ad364e35" /> 
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" /> 
      </dependentAssembly> 
    </assemblyBinding> 
  </runtime> 
  <system.webServer> 
    <validation validateIntegratedModeConfiguration="false" /> 
    <modules> 
      <remove name="ScriptModule" /> 
      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="wwScriptCompressionModule" type="ExtExtenders.Helpers.wwScriptCompressionModule,ExtExtenders" /> 
        <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode,runtimeVersionv2.0"/> 
        <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode,runtimeVersionv2.0"/> 
    </modules> 
    <handlers> 
      <remove name="WebServiceHandlerFactory-Integrated" /> 
      <remove name="ScriptHandlerFactory" /> 
      <remove name="ScriptHandlerFactoryAppServices" /> 
      <remove name="ScriptResource" /> 
      <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" /> 
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/> 
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/> 
    </handlers> 
  </system.webServer> 
</configuration> 

Also, if this were the problem, I think it would have trouble working on Windows and not only Mono.
0
Jordan Earls
Top achievements
Rank 1
answered on 16 Feb 2010, 04:43 PM
Just to keep anyone else having this problem updated:

I submitted a support ticket last Friday and have still not got any kind of reply.
0
Daniel
Telerik team
answered on 17 Feb 2010, 08:10 PM
Hello Jordan,

I'm unable to reproduce the aforementioned problem on my end. Please check your support ticket for more details.

Best regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Accepted
Daniel
Telerik team
answered on 18 Feb 2010, 10:00 PM
Hello all,

If anyone else stumbles on the same problem - .NET 3.5 version of RadControls for ASP.NET AJAX doesn't work with Mono - please use the 2.0 version instead. Since Mono doesn't fully support .NET Framework 3.5 yet, your websites/webapplications should target the .NET Framework 2.0.

Kind regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Charles Wiebe
Top achievements
Rank 1
answered on 10 Mar 2010, 08:42 PM
I had the same problem in a .NET 3.5 environment (no mono) using Master Pages and a RadScheduler.

I removed:
     <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"/>

from the <configSections> of the web.config file and all appears to be fine.

It looks like the RadScriptManager is incompatible with the ScriptManager for a couple of services.
Tags
General Discussions
Asked by
Jordan Earls
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Jordan Earls
Top achievements
Rank 1
Daniel
Telerik team
Charles Wiebe
Top achievements
Rank 1
Share this question
or