scriptresources.axd failed to load

Topics: Troubleshooting, Writing modules
Mar 29, 2012 at 7:39 AM

Hi,

I have a custome module with a aspx web form when i render it i got alot of javascript error on scriptresources, something is woring with my orchardweb/web.config but i can´t pinpoint what the problem is, can someone help me?

<?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>
  
  <configSections>
    <sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor">
      <section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor" requirePermission="false" />
      <section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor" requirePermission="false" />
    </sectionGroup>

    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" requirePermission="false" />
  </configSections>

  <appSettings>
    <add key="webpages:Enabled" value="false" />
    <add key="log4net.Config" value="Config\log4net.config" />
  </appSettings>
  <connectionStrings>
    <!--<add name="ShipmentOrder_Context" connectionString="metadata=res://*/BusinessEntity.ShipmentOrder.csdl|res://*/BusinessEntity.ShipmentOrder.ssdl|res://*/BusinessEntity.ShipmentOrder.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=192.168.5.103;Initial Catalog=NTRWagonSystem;User ID=ntrwagonsystemusr;Password=ntr4ever!;MultipleActiveResultSets=True&quot;"
      providerName="System.Data.EntityClient"/>-->
    <add name="ShipmentOrder_Context" connectionString="metadata=res://*/BusinessEntity.ShipmentOrder.csdl|res://*/BusinessEntity.ShipmentOrder.ssdl|res://*/BusinessEntity.ShipmentOrder.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(local);initial catalog=NTRWagonSystem;integrated security=True;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
    <add name="ShipmentOrderContext" connectionString="metadata=res://*/EntityModel.ShipmentOrder.csdl|res://*/EntityModel.ShipmentOrder.ssdl|res://*/EntityModel.ShipmentOrder.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(local);initial catalog=NTRWagonSystem;integrated security=True;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
    <add name="NTRWagonSystem" connectionString="metadata=res://*/Models.WagonSystem.csdl|res://*/Models.WagonSystem.ssdl|res://*/Models.WagonSystem.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(local);initial catalog=NTRWagonSystem;User ID=ntrextranetuser;Password=orchard4ever;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
    <add name="NTRWagonSystemEntities" connectionString="metadata=res://*/Models.Model.csdl|res://*/Models.Model.ssdl|res://*/Models.Model.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=(local);initial catalog=NTRWagonSystem;User ID=ntrextranetuser;Password=orchard4ever;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>
  <system.web.webPages.razor>
    <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    <pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
      <namespaces>
        <add namespace="System.Web.Mvc" />
        <add namespace="System.Web.Mvc.Ajax" />
        <add namespace="System.Web.Mvc.Html" />
        <add namespace="System.Web.Routing" />
        <add namespace="System.Linq"/>
        <add namespace="System.Collections.Generic"/>
        <add namespace="Orchard.Mvc.Html"/>
        <add namespace="System.Web.WebPages"/>
      </namespaces>
    </pages>
  </system.web.webPages.razor>

  <!-- 
        Set default transaction timeout to 30 minutes so that interactive debugging 
        is easier (default timeout is less than one minute)
  -->
  <system.transactions>
    <defaultSettings timeout="00:30:00"/>
  </system.transactions>
  <system.web>
    <!--<trust level="Medium" originUrl="" />-->

    <httpRuntime requestValidationMode="2.0" />
    <!-- 
            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" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
        <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
        <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"/>
        <add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <remove assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        <remove assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        <remove assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <remove assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        <remove assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <remove assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        <remove assembly="System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        <remove assembly="System.IdentityModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <remove assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <remove assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <remove assembly="System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <remove assembly="System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <remove assembly="System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <remove assembly="System.ServiceModel.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <remove assembly="System.WorkflowServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <remove assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <remove assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
        <remove assembly="System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </assemblies>
      <buildProviders>
        <add extension=".csproj" type="Orchard.Environment.Extensions.Compilers.CSharpExtensionBuildProviderShim"/>
        <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      </buildProviders>
    </compilation>
    <!--
            The <authentication> section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
    -->
    <authentication mode="Forms">
      <forms loginUrl="~/Users/Account/AccessDenied" timeout="2880"/>
    </authentication>

    <!--
            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" />
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
      <namespaces>
        <add namespace="System.Web.Mvc"/>
        <add namespace="System.Web.Mvc.Ajax"/>
        <add namespace="System.Web.Mvc.Html"/>
        <add namespace="System.Web.Routing"/>
        <add namespace="System.Linq"/>
        <add namespace="System.Collections.Generic"/>
        <add namespace="Orchard.Mvc.Html"/>
      </namespaces>
    </pages>

    <httpHandlers>
      <!-- see below -->
      <clear />
      <add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="true" />
      <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
        validate="false" />
      <add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
    </httpHandlers>

    <httpModules>
      <add name="WarmupHttpModule" type="Orchard.WarmupStarter.WarmupHttpModule, Orchard.WarmupStarter, Version=1.0.20, Culture=neutral"/>
    </httpModules>
    <identity impersonate="true"/>
  </system.web>
  <!-- 
        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>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="WarmupHttpModule" />
      <add name="WarmupHttpModule" type="Orchard.WarmupStarter.WarmupHttpModule, Orchard.WarmupStarter, Version=1.0.20, Culture=neutral"/>
    </modules>
    <handlers>     
      <!-- clear all handlers, prevents executing code file extensions, prevents returning any file contents -->
      <clear/>
      <!-- Return 404 for all requests via managed handler. The url routing handler will substitute the mvc request handler when routes match. -->
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
      <add name="NotFound" path="*" verb="*" type="System.Web.HttpNotFoundHandler" preCondition="integratedMode" requireAccess="Script"/>  
     </handlers>
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <probing privatePath="App_Data/Dependencies"/>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0" newVersion="3.0.0.0"/>
        <bindingRedirect oldVersion="2.0.0.0" newVersion="3.0.0.0"  />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

Coordinator
Apr 1, 2012 at 2:03 AM

Mixing webforms with Orchard is a recipe for failure, I'm afraid.

Apr 2, 2012 at 8:52 AM

Hi!, thx for the reply.

When u says "its a recipe for failure" can u explain alittle more?, because i have manage to get my aspx web form to work with a report view control within orchard. It toke me some time but now its working and i have manage to creat a solution to the javascript problems that i have explained above.

Bertrand, is there any problems with orchard that i don´t see? i have got everything to work as i want and i can´t se any side effects on any other funtionallity in orchard. What i have understand mixing MVC and ASP.NET shoudn´t be any problems becuase the run on the same runtime?. Is there any major difference to orchard??

thx

Coordinator
Apr 3, 2012 at 2:17 AM

Orchard was designed over ASP.NET MVC. Webforms is a scenario that we excluded from the start. Like anything untested and unsupported, it's pretty much guaranteed to fail, but I don't know how as it's untested. If you can make it work, good for you ;)

Apr 3, 2012 at 6:11 AM

ok, i understand, well my web form contains only 1 control (my report viewer) so its quite straight forward to test, atleast i can guarantee that to work (without any other side effects on my site). Thx anyway Bertrand for ur time and effort explaining it to me :)

Jun 16, 2015 at 7:15 AM
Dear Ekan

Have you solved the problem to embeded ReportViewer control in aspx under Orchard ? I have the same requirement. I am integrating MvcReportViewer 0.7.
But Orchard's web.config doesn't open aspx route. Would you please give me your solution ?

Thanks!