Web.config registration missing! in RadEditor in IIS 7.5 - telerik

I am working with RadEditor. I have purchased premium controls pack.
Editor works fine but when we open a image manager it throw an error i.e.
Web.config registration missing!
The Telerik dialogs require a HttpHandler registration in the web.config file. Please, use the control's Smart Tag to add the handler automatically, or see the help for more information: Controls > RadEditor > Dialogs > Introduction
My webconfig file code is :
<system.web>
<httpHandlers>
<add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" />
<add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
<add path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI" validate="false" />
</httpHandlers>
<httpModules>
<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" />
</httpModules>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<handlers>
<add name="Telerik.Web.UI.DialogHandler.aspx" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI" />
<add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" />
</handlers>
<modules runAllManagedModulesForAllRequests="true">
<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" preCondition="managedHandler" />
</modules>
</system.webServer>
</configuration>
and i am using routing without MVC architecture with asp.net 4.0 framework. and in global.asax file code is here
routes.Ignore("{resource}.axd/{*pathInfo}");
routes.Ignore("Telerik.Web.UI.DialogHandler.aspx");
ignore for telerik controls.
these all code works fine in visual studio and run site from visual studio.
but it throws error while we run this site in IIS 7.0 or IIS 7.5.
and it shows a alert message and image manager page displays :
HTTP Error 500.21 - Internal Server Error
Handler "Telerik.Web.UI.DialogHandler.aspx" has a bad module "ManagedPipelineHandler" in its module list
message
How to resolve this error?????

Just use my given code in you web.config and it will solve your problem.. just try it....
<httpHandlers>
<add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI"/>
<add verb="*" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"></add>
<add verb="*" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4"></add>
<add verb="*" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>
<add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false"/>
</httpHandlers>
<httpModules>
<add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/>
</httpModules>
and this....
<modules>
<add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI" preCondition="managedHandler"/>
</modules>
<handlers>
<add name="ChartImage.axd_*" path="ChartImage.axd" verb="*" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode"/>
<add name="Telerik.Web.UI.SpellCheckHandler.axd_*" path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode"/>
<add name="Telerik.Web.UI.DialogHandler.aspx_*" path="Telerik.Web.UI.DialogHandler.aspx" verb="*" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" preCondition="integratedMode"/>
<add name="Telerik.RadUploadProgressHandler.ashx_*" path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI" preCondition="integratedMode"/>
<add name="Telerik.Web.UI.WebResource.axd_*" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" preCondition="integratedMode"/>
</handlers>

Related

Composite C1 not generating sitemap.xml

Quick specs:
Composite C1 4.1
Windows 2003 Server
IIS 6
.NET Framework 4.0
Anything newer will not run on my old server.
I have tried to access my website's sitemap.xml (direct link) but it keeps giving a 404 error. I have looked over the internet but the only thing i can find about the sitemap is the manual page of Composite telling me to change my web.config and all should be settled and it will generate a sitemap.xml for me. This however is not the case for me, am i missing something? So far i have checked the following:
The 404 page in IIS refers to /Renderers/FileNotFoundHandler.ashx
The system.web and sytem.webserver (the latter being useless for IIS6 i recall) both have the settings as posted in the manual
Composite C1 has the correct rights on the server
robots.txt has a correct reference to the sitemap
Custom error mode is set to Remote Only, and i am accessing it remotely.
Couldn't find Composite.AspNet.SitemapHandler package in available packages
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!-- Hey Dev! Changing or removing existing elements in this file may cause functionality in Composite C1 to break -->
<system.web>
<trust level="Full" />
<globalization requestEncoding="utf-8" responseEncoding="utf-8" />
<customErrors mode="RemoteOnly">
<error statusCode="404" redirect="Renderers/FileNotFoundHandler.ashx" />
</customErrors>
<compilation debug="false" optimizeCompilations="false">
<assemblies>
<add assembly="System.Security, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Workflow.ComponentModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Workflow.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</assemblies>
<buildProviders>
<add extension=".cshtml" type="System.Web.WebPages.Razor.RazorBuildProvider, System.Web.WebPages.Razor" />
</buildProviders>
</compilation>
<httpRuntime relaxedUrlToFileSystemMapping="true" requestPathInvalidCharacters="<,>,*,%,&,\,?" /> <!-- colon removed from #requestPathInvalidCharacters -->
<xhtmlConformance mode="Strict" />
<trace enabled="false" traceMode="SortByTime" requestLimit="100" writeToDiagnosticsTrace="false" pageOutput="true" />
<pages clientIDMode="AutoID">
<controls>
<add tagPrefix="f" namespace="Composite.Plugins.PageTemplates.MasterPages.Controls.Functions" assembly="Composite" />
<add tagPrefix="c1" namespace="Composite.Plugins.PageTemplates.MasterPages.Controls.Rendering" assembly="Composite" />
</controls>
</pages>
<!-- IIS6 & IIS7 Clasic mode -->
<httpModules>
<add name="ApplicationOfflineCheck" type="Composite.Core.Application.ApplicationOfflineCheckHttpModule, Composite" />
<add name="AjaxResponseHandler" type="Composite.Core.WebClient.Ajax.AjaxResponseHttpModule, Composite" />
<add name="CompositeAdministrativeResponseFilter" type="Composite.Core.WebClient.HttpModules.AdministrativeResponseFilterHttpModule, Composite" />
<add name="CompositeAdministrativeAuthorization" type="Composite.Core.WebClient.HttpModules.AdministrativeAuthorizationHttpModule, Composite" />
<add name="CompositeRequestInterceptor" type="Composite.Core.WebClient.Renderings.RequestInterceptorHttpModule, Composite" />
<add name="CompositeAdministrativeDataScopeSetter" type="Composite.Core.WebClient.HttpModules.AdministrativeDataScopeSetterHttpModule, Composite" />
<add name="CompositeAdministrativeCultureSetter" type="Composite.Core.WebClient.HttpModules.AdministrativeCultureSetterHttpModule, Composite" />
</httpModules>
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<add name="C1Page" duration="60" varyByCustom="C1Page" varyByParam="*" />
</outputCacheProfiles>
</outputCacheSettings>
</caching>
<httpHandlers>
<add verb="GET" path="sitemap.xml" type="Composite.AspNet.SiteMapHandler, Composite" />
</httpHandlers>
<siteMap defaultProvider="CompositeC1">
<providers>
<add name="CompositeC1" type="Composite.AspNet.CompositeC1SiteMapProvider, Composite" />
</providers>
</siteMap>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" compilerOptions="/warnaserror-" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v4.0" />
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" compilerOptions="/optioninfer+" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v4.0" />
</compiler>
</compilers>
</system.codedom>
<!-- IIS7 Intergrated mode configuration -->
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<remove name="UrlRoutingModule"/>
<add name="ApplicationOfflineCheck" type="Composite.Core.Application.ApplicationOfflineCheckHttpModule, Composite" />
<add name="AjaxResponseHandler" type="Composite.Core.WebClient.Ajax.AjaxResponseHttpModule, Composite" />
<add name="CompositeAdministrativeResponseFilter" type="Composite.Core.WebClient.HttpModules.AdministrativeResponseFilterHttpModule" />
<add name="CompositeAdministrativeAuthorization" type="Composite.Core.WebClient.HttpModules.AdministrativeAuthorizationHttpModule, Composite" />
<add name="CompositeRequestInterceptor" type="Composite.Core.WebClient.Renderings.RequestInterceptorHttpModule, Composite" />
<add name="CompositeAdministrativeDataScopeSetter" type="Composite.Core.WebClient.HttpModules.AdministrativeDataScopeSetterHttpModule, Composite" />
<add name="CompositeAdministrativeCultureSetter" type="Composite.Core.WebClient.HttpModules.AdministrativeCultureSetterHttpModule, Composite" />
<add name="UrlRoutingModule" type="System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</modules>
<handlers>
<add name="SiteMap" verb="GET" path="sitemap.xml" type="Composite.AspNet.SiteMapHandler, Composite" />
<add name="Wildcard ASP.NET mapping" preCondition="classicMode,runtimeVersionv4.0,bitness32" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" />
<add name="Wildcard ASP.NET mapping (x64)" preCondition="classicMode,runtimeVersionv4.0,bitness64" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" />
<add name="UrlRoutingHandler" preCondition="integratedMode" verb="*" path="UrlRouting.axd" type="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</handlers>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
</staticContent>
<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" />
</system.webServer>
<system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
</configuration>
My sitemap errors out when using multiple hostname bindings with the same HomePageId and Culture :/
This might or might not be the same as your issue, but that's exactly what I did to have the same configuration (404 Page etc.) in all my environments:
Allowing error details, this is what I get:
The source code is available at https://compositec1.codeplex.com/SourceControl/latest#CompositeC1/Composite/AspNet/SiteMapHandler.cs – that's how I learned how to "fix" my issue.
My site is quite alright now, so I can confidently comment out my non-production entries in App_Data\Composite\DataStores\Composite.Data.Types.IHostnameBinding.xml, which leaves me with a fully functioning sitemap generator again :]
I've tried "tricking" the faulting function by changing the Culture (e.g. non-default Culture, or changing the casing of the string) or the HomePageId (e.g. ID of a non-homepage), however, I ran into some other issues then :\

500 Internal Server Error requesting any resource files (css, js, images) in an .Net MVC 3 site

UPDATE: Things I tried - see answer below for solution
I installed a fresh MVC3 site and it served up the resources properly. That eliminated the machine.config settings as a problem.
I then when section by section in the web.config to see if any particular changes in web.config caused the problem. When the configs were identical, the fresh site still worked and the old site was still broken.
I uninstalled IIS, reinstalled IIS, and then installed apps again in an attempt to clear any settings that were lingering around. Still borked.
I then used publish (instead of msi deploy) to new directory. I used the iis option to "Create Application" on new directory of exact same code that is broken. Things worked perfectly.
I assumed file permissions, so I deleted offending directory and renamed new working version to old directory name. Site was still borked. This made me assume that some iis setting that is not in the machine.config or web.config is to blame.
I used IIS 6 Metabase explorer (yes I used it on IIS 8 site) and saw quite a few entries that were not in the working site. After deleting one by one, I found it was the "scriptMaps" entry that was being added during our MSI install causing a problem. This was added to automatically add wildcard mappings during install. It works on IIS6, but apparently not on IIS8.
We have an webforms and MVC3 application that look like one application. This is deployed in many environments (2003, 2008, Win 7) and works properly. I have just set these applications up on a new Windows Server 2012 machine and everything works except getting resource files for the MVC site. The browser gets a
500 Internal Server Error
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
The resources are referenced in the _layout.cshtml
<head>
<meta http-equiv='X-UA-Compatible' content='IE=EmulateIE8' />
<title>#this.Title</title>
<script type="text/javascript" src="#Url.Content("~/Scripts/2012.2.607/jquery-1.7.1.min.js")"></script>
<script type="text/javascript" src="/Sentri7/scripts/jquery-p1s.banner.js"></script>
<script type="text/javascript" src="/Sentri7/scripts/jquery-p1s.patientsearch.js"></script>
<link type="text/css" rel="stylesheet" href="/sentri7/content/jquery-p1s.patientsearch.css"></link>
<link type="text/css" rel="stylesheet" href="/sentri7/content/jquery-p1s.banner.css" />
<link type="text/css" rel="stylesheet" href="/quantifi/resources/application/css/jqueryui/jquery-ui-1.7.2.custom.css" />
<link type="text/css" rel="stylesheet" href="/quantifi/resources/application/css/styles.css" />
#(RenderSection("PageHead", required: false))
</head>
as well as using the telerik scriptmanager:
#{
Title = "Reportable Conditions";
SelectedSubTab = SubTabIndex.Reportables;
Html.Telerik().ScriptRegistrar().DefaultGroup(dg => dg
.Add("~/Scripts/ReportableConditions/List.js")
.Add("~/Scripts/ClientObjects/GridSettings.js"))
.OnDocumentReady("bootStrapUI()");
}
If I try to navigate directly to the javascript file, I get the same error:
http://[server]/S7D/Scripts/2012.2.607/jquery-1.7.1.min.js
Some weird stuff:
If I IISReset and hit the js file, it will work the first request only.
Any js, css, or image requested from another (webforms) site (same app pool) on the server works fine.
There is nothing in the event log related to this 500 error.
I have tried adding permissions full permissions to the user that the app pool is running. I have also added file permissions to the [Machine]\IUSR.
Here is my web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections>
<sectionGroup name="telerik">
<section name="webAssets" type="Telerik.Web.Mvc.Configuration.WebAssetConfigurationSection, Telerik.Web.Mvc" requirePermission="false" />
</sectionGroup>
<sectionGroup name="spring">
<section name="typeAliases" type="Spring.Context.Support.TypeAliasesSectionHandler, Spring.Core" />
<section name="context" type="Spring.Context.Support.WebContextHandler, Spring.Web" />
<section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />
</sectionGroup>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
<spring>
<context>
<!-- Load web.config definition ** This resource reference is essential to define objects in the web.configs -->
<resource uri="config://spring/objects" />
<resource uri="assembly://CAS2/CAS2.CASLibDAO/_SpringObjects.xml" />
<resource uri="file://~/App_Data/MvcApplicationContext.xml" />
<resource uri="assembly://P1S.S7D.Core/P1S.S7D.Core.ApplicationContext/ApplicationContext-Common.xml" />
<resource uri="assembly://P1S.S7D.Core/P1S.S7D.Core.ApplicationContext/ApplicationContext-DAO.xml" />
<resource uri="assembly://P1S.S7D.Core/P1S.S7D.Core.ApplicationContext/ApplicationContext.xml" />
<resource uri="assembly://P1S.S7D.Core/P1S.S7D.Core.ApplicationContext/Services.xml" />
<resource uri="assembly://P1S.S7D.Common/P1S.S7D.Common.ApplicationContext/ApplicationContext-AuthModule.xml" />
<resource uri="assembly://P1S.S7D.Common/P1S.S7D.Common.ApplicationContext/ApplicationContext-Web-Common.xml" />
<resource uri="assembly://P1S.S7D.Core/P1S.S7D.Core.ApplicationContext.WCF/ApplicationContext.xml" />
<resource uri="assembly://P1S.S7D.Core/P1S.S7D.Core.ApplicationContext/ApplicationContext-Circular-Reference-IPReporting.xml" />
</context>
<objects xmlns="http://www.springframework.net">
<!--cached objects-->
</objects>
</spring>
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="P1S.S7D.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="P1S.S7D.Web.Mvc" />
<add namespace="System.Web.Helpers" />
<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.Web.WebPages" />
<add namespace="Telerik.Web.Mvc.UI" />
</namespaces>
</pages>
</system.web.webPages.razor>
<appSettings>
<add key="Spring.Data.NHibernate.Support.OpenSessionInViewModule.SessionFactoryObjectName" value="NHibernateSessionFactory" />
<add key="Spring.Data.NHibernate.Support.OpenSessionInViewModule.EntityInterceptorObjectName" value="MultiTenantInterceptor" />
<add key="webpages:Version" value="1.0.0.0" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
<system.web>
<sessionState allowCustomSqlDatabase="true" mode="SQLServer" sqlConnectionString="Server=dev-ct-nhsn.dev.rph.int;Database=aspstate;User ID=UID;Password=*****; Application Name=S7DSharedSession" />
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" />
</authentication>
<membership>
<providers>
<clear />
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear />
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear />
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>
<pages pageBaseType="P1S.S7D.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="P1S.S7D.Web.Mvc" />
<add namespace="System.Web.Helpers" />
<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.Web.WebPages" />
<add namespace="Telerik.Web.Mvc.UI" />
</namespaces>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</controls>
</pages>
<httpHandlers>
<add verb="GET,HEAD" path="asset.axd" validate="false" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc" />
</httpHandlers>
<httpModules>
<add name="AuthenticationModule" type="Web.Handlers.AuthenticationModule,P1S.S7D.Web.Mvc" />
<add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web" />
<add name="OpenSessionInView" type="Spring.Data.NHibernate.Support.OpenSessionInViewModule, Spring.Data.NHibernate31" />
</httpModules>
<customErrors mode="Off" />
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web" />
<add name="AuthenticationModule" type="Web.Handlers.AuthenticationModule,P1S.S7D.Web.Mvc" />
<add name="OpenSessionInView" type="Spring.Data.NHibernate.Support.OpenSessionInViewModule, Spring.Data.NHibernate31" />
</modules>
<!-- -->
<handlers>
<remove name="asset" />
<add name="asset" preCondition="integratedMode" verb="GET,HEAD" path="asset.axd" type="Telerik.Web.Mvc.WebAssetHttpHandler, Telerik.Web.Mvc" />
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NHibernate" culture="neutral" publicKeyToken="aa95f207798dfdb4" />
<bindingRedirect oldVersion="3.1.0.4000" newVersion="3.3.1.4000" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<telerik>
<webAssets useTelerikContentDeliveryNetwork="false" />
</telerik>
</configuration>
All the resources, whether using Telerik or adding them with the script tag give the 500 error. The controller and view show up correctly (without styles or javascript)
EDIT:
Register Routes:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
RouteTable.Routes.RouteExistingFiles = false;
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
}
I was getting the same error when I published my site from local (Windows 7) to the server (Windows 2012).
My Local IIS had added this code:
<staticContent>
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/x-font-woff" />
</staticContent>
Where as I needed this on Win 2012
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/x-font-woff" />
</staticContent>
It seems the newer version of IIS on Win2012 already has .woff added and instead of giving me any kind of details, it just went 500!
As mentioned in my edits. The problem was an incorrect IIS setting that I found with the IIS 6 Metabase Explorer.
I used IIS 6 Metabase explorer (yes I used it on IIS 8 site) and saw quite a few entries that were not in the working site. After deleting one by one, I found it was the "scriptMaps" entry that was being added during our MSI install causing a problem. This was added to automatically add wildcard mappings during install. It works on IIS6, but apparently not on IIS8.
I am not sure why the files would get served up properly on the first request, but not subsequent requests, but removing the entry worked. I could not find the "ScriptMaps" setting anywhere in the IIS GUI, but it is probably there somewhere.
To my situation, I met this error when running my application on Window 8.0.
After I changed the mini type of .woff from 'font/x-woff' to 'application/x-font-woff' in IIS, it works well.(after I changed the mini type, my web config added '' into staticContent automatically)

Unable to access WCF service hosted on server from c#.net application

I have created a WCF service to contact sql database.
I hosted the service on remote server IIS.
Service is run and can be able browse from IIS. IIS Browse returns the service URL like below. .
When I try to access the service from outside the server ie from my local system, It is throwing error.
Instead of domain name, I have tried with the system IP and I can able to access the service via IE ()
When I tried to add the service on my .net application it is throwing error.
Error Message From Add Service Reference:
<!--The document was understood, but it could not be processed.
- The WSDL document contains links that could not be resolved.
- There was an error downloading '<!--http://sysname:4567/Service1.svc?xsd=xsd0'.
- The remote name could not be resolved: 'sysname'
Metadata contains a reference that cannot be resolved: 'http://ipaddress:4567/Service1.svc?wsdl'.
Metadata contains a reference that cannot be resolved: 'http://ipaddress:4567/Service1.svc?wsdl'.
If the service is defined in the current solution, try building the solution and adding the service reference again.-->
Error Message From svcutil.exe:
<!--Error: Cannot obtain Metadata from http://http//ipaddress:4567/Service1.svc
?wsdl
If this is a Windows (R) Communication Foundation service to which you have acce
ss, please check that you have enabled metadata publishing at the specified addr
ess. For help enabling metadata publishing, please refer to the MSDN documentat
ion at http://go.microsoft.com/fwlink/?LinkId=65455.
WS-Metadata Exchange Error
URI: http://http//ipaddress:4567/Service1.svc?wsdl
Metadata contains a reference that cannot be resolved: 'http://http//ipaddres:4567/Service1.svc?wsdl'.
There was no endpoint listening at http://http//ipaddress:4567/Service1
.svc?wsdl that could accept the message. This is often caused by an incorrect ad
dress or SOAP action. See InnerException, if present, for more details.
The remote name could not be resolved: 'http'
HTTP GET Error
URI: http://http//ipaddress:4567/Service1.svc?wsdl
There was an error downloading 'http://http//ipaddress:4567/Service1.sv
c?wsdl'.
The remote name could not be resolved: 'http'
If you would like more help, type "svcutil /?"-->
here is my WebConfig file:
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<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"/>
</assemblies>
</compilation>
<authentication mode="Windows"/>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</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" 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>
</compilers>
</system.codedom>
<system.web.extensions>
<scripting>
<webServices></webServices>
</scripting>
</system.web.extensions>
<system.webServer>
<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>
<system.serviceModel>
<services>
<service name="portalConnectorService.Service1" behaviorConfiguration="portalConnectorService.Service1Behavior">
<host>
<baseAddresses>
<add baseAddress="http://184.73.184.213:4567/Service1.svc"></add>
</baseAddresses>
</host>
<!- - Service Endpoints - ->
<endpoint address="" binding="wsHttpBinding" contract="portalConnectorService.IService1">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="portalConnectorService.Service1Behavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Could any one help me to resolve this error.
Try commenting out the host section which specifies a base address.
Actually that's ignored by IIS, but try it anyway.
What is the actual error message you're getting?

MVC-Mini-Profiler - Web Forms - 'MiniProfiler' is undefined

I tired to install the MiniProfiler, using the HowTo on http://miniprofiler.com/
This seems to work:
<%= StackExchange.Profiling.MiniProfiler.RenderIncludes() %>
But when I start the site, I get this error message:
'MiniProfiler' is undefined
The problem is in the included MiniProfiler code:
var initMp = function(){
load('/mini-profiler-resources/includes.js?v=6cJT7lsVkH6SxAlFpQstk1/AgtUwMUApXN3pviVvaRE=',function(){
MiniProfiler.init({.....
When I try open http://localhost/mini-profiler-resources/includes.js?v=6cJT7lsVkH6SxAlFpQstk1/AgtUwMUApXN3pviVvaRE= with IE I get an 404.
I even tried this Solution found on stackoverflow but it did not work for me :(
Does anybody know this problem, or know what I can do to fix that?
SOLUTION
I solved the problem by adding the config section from this solution and the "runAllManagedModulesForAllRequests" line:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<handlers>
<add name="UrlRoutingModule1" path="mini-profiler*.js" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
<add name="UrlRoutingModule2" path="mini-profiler*.css" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
<add name="UrlRoutingModule3" path="mini-profiler*.tmpl" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
</system.webServer>
The "trick" was to add the line below to get the handlers to work.
<modules runAllManagedModulesForAllRequests="true"/>
You should be able to avoid this issue a bit more concisely (one handler line instead of three) by adding the following to your main web.config file:
<system.webServer>
...
<handlers>
<add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
</system.webServer>

Telerik RadControls setup issue

I just ran the Telerik update wizard for Teleriks RadControls for ASP.NET because for some reason my web.config was not setup to run RadControls. It modified my web.config. I am not getting the following error:
ASP.NET Ajax client-side framework failed to load.
If i revert my web.config back to the backup i get this error:
'~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager
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.InvalidOperationException: '~/Telerik.Web.UI.WebResource.axd' is missing in web.config. RadScriptManager requires a HttpHandler registration in web.config. Please, use the control Smart Tag to add the handler automatically, or see the help for more information: Controls > RadScriptManager
If i refrain from using the RadScriptManager and revert back to using a normal ScriptManager, my project works fine. Except on some pages when i operation is performed i receive the following error:
Sys.InvalidOperationException: A control is already associated with the element.
The above error was why i attempted to us the RadScriptManager in the first place...
Has anyone run into this issue before and perhaps know what is going on?
D
the handler is not registered correctly. Click on the smart tag of the RadScriptManager and choose "register"
or copy the settings from this web.config file (.net45)
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="Telerik.ScriptManager.TelerikCdn" value="Disabled" />
<add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled" />
</appSettings>
<system.web>
<compilation debug="false" targetFramework="4.5.1" />
<httpRuntime targetFramework="4.5.1" />
<pages>
<controls>
<add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
</controls>
</pages>
<httpHandlers>
<add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
<add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
<add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
<add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
</httpHandlers>
<httpModules>
<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
<add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
</httpModules>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<remove name="RadUploadModule" />
<add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode" />
<remove name="RadCompression" />
<add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" />
</modules>
<handlers>
<remove name="ChartImage_axd" />
<add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
<remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
<add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
<remove name="Telerik_Web_UI_DialogHandler_aspx" />
<add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
<remove name="Telerik_RadUploadProgressHandler_ashx" />
<add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
<remove name="Telerik_Web_UI_WebResource_axd" />
<add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
</handlers>
</system.webServer>
</configuration>

Resources