Why does my WebForms report viewer not display icon resources? - model-view-controller

I am trying to integrate the SSRS WebForms report viewer into an ASP.NET MVC2 app. The viewer comes up, but none of the javascript is evaluated. It looks like all of the javascript and icon resources come out of calls to the "Reserved.ReportViewerWebControl.axd" pseudo url. My MVC app is ignoring calls to .axd URI's, but I get tons of javascript errors in the page that's hosting the report viewer. Is there something else that I need to do to get the calls to the .axd handler to work? That particular handler is in my web.config and it looks like this:
<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
validate="false" />
For what it's worth, our SSRS is SQL2005, but I am using the SQL2008 report viewer. Do I have to use the SQL2005 reportviewer web control?
Thanks,
Matthew

Turns out I didn't set up the .axd HttpHandler in the correct place in the web.config. I had modified the IIS6 section, but not the IIS7 section. Works like a champ now.

Related

Umbraco Back Office not showing tree properly

I'm experiencing a strange issue with the umbraco back-office. The umbraco version is 7.5.3. Inside umbraco back-office when i try to open a node of Settings or Users tab , either templates, partialviews, stylesheets, etc, automatically a .aspx file is generated and downloaded and the node gets loading infinitely. For example clicking Create in templates a file create.aspx is generated and downloaded. Clicking in any of the templates a file EditView.aspx is generated and downloaded.
In chrome console appear the following:
jquery.min.js?cdv=865237568:3 Resource interpreted as Document but transferred with MIME type application/octet-stream: "http://localhost:54531/umbraco/settings/Views/EditView.aspx?treeType=templates&templateID=3289".
The same problem happen both in back-office local environment and back-office production environment. Fortunately the page in production has not problem but I can't access into the nodes into the back-office. Please, any help would be very appreciated. At the end, an image of the logs. Any other information required about the issue please let me know.
Tracking in version control I realized that I had deactivated the ImageProcessor module by commenting the following line in web.config:
<!--<add name="ImageProcessorModule" type="ImageProcessor.Web.HttpModules.ImageProcessingModule, ImageProcessor.Web" />-->
but this line:
<add name="StaticFileHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.StaticFileHandler" />
which was added previously when I installed ImageProcessor.Web.Config also was necessary to comment it. so I commented too and the problem dissapeared.

Prevent redirect to site.mobile.master

When I run the web form template of Visual Studio 2013 on a mobile phone the master page is redirected to Site.Mobile.master by default. Is there any way to prevent this and how???
THANKS
you can fool the application adding the code below in your web.config inside
<system.web>
<browserCaps>
<result type="System.Web.Mobile.MobileCapabilities, System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
<filter>isMobileDevice=false</filter>
</browserCaps>
</system.web>
The code should be placed within the <system.web> tag. Your web.config file may already contain the tag, so can be placed in the existing one.

Telerik Controls Not working on IIS 7.5

I am developing a telerik Asp.net Ajax project using .net 4.5 and vs 2012. My development environment is working great however when I deploy my app on IIS 7.5 my default.aspx screen that contains 3 radcomboboxes and a radgrid is not working at all. When I say its not working the comboboxes are not dropping down and the radgrid controls are not responding. However when I replace one of the comboboxes with a Microsoft Dropdown I get the expected control behavior. I'am not sure what is causing this.Any ideas or suggestion will be highly appreciated.
These are my handlers in web.config.
<handlers>
<add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource"/>
<add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=6.1.12.823, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode"/>
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"/>
</handlers>
WebResource.axd file which contains all the resources pertaining to Telerik is not getting loaded on runtime. That's the reason you see an unexpected behavior. Make sure that following httphandler exist in your web config file.
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
Refer to the following link for more help.
http://www.telerik.com/help/aspnet-ajax/introduction-web-resources-troubleshooting.html
I would also advice that if you are not using authentication in your app and if there are lines related to it exist in your web config, get rid of them.
I have managed to resolve this by removing the property UpdatePanelsRenderMode = "Inline" from inside my RadAjaxManager. This property if is set to inline places the contents inside html spans and for some reason the WS did not like it.

Force ASP.NET MVC3 handler to ignore .cshtml and .vbhtml URLs and just pass them through

It seems that MVC3 has a priority handler for .cshtml and .vbhtml file extensions and tries to locate them in the default folder.
When requesting these URLs:
domain.com/test.cshtml
domain.com/test.vbhtml
MVC always looks for these specific static files in a default folder.
Regardless of the extension or the route, I want it to completely ignore the .cshtml & .vbhtml handling and just pass the full URL through like all other URLs so I can take care of the routing on my own (with Nancy).
Running MVC3+Nancy+Razor on IIS 7.5 on an Azure instance.
Add
<configuration>
<appSettings>
<add key="webPages:Enabled" value="false" />
</appSettings>
</configuration>
to your web.config. Starting with the next version of Nancy (0.10), the Razor engine will automatically add this to the web.config

MVC3/Razor: cshtml.Execute()': no suitable method found to override

I am trying to convert an MVC2 site to MVC3 using RazorViewEngine.
I used this tool to upgrade my project and the Telerik converter tool to convert my .aspx views to Razor. The Telerik tool put an #inherits line at the top of my layouts (inherting from ViewMasterPage).
When I tried to run a page that used one of these layouts, I got the error:
...cshtml.Execute(): no suitable method found to override
I removed the #inherits tag and it started to work for my home page. However, I continued to get this error for another page using the same layout. And now, after moving some things around to deal with an Areas issue, I'm back to getting this error for all my pages (the ones I can get to, anyway).
I have tried closing Visual Studio, deleting temporary files, etc.
Figured it out - the following section needs to be in the web.config for razor - I had it in the web.configs in the Views directories, but not in the root web.config:
<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
<add namespace="System.Web.Mvc.Ajax" />
<add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Routing" />
</namespaces>
</pages>
</system.web.webPages.razor>
There could be a few things going on here. Make sure you are following these guidelines
you don't have #inherits directives in your views. unless you are using a custom view page base class they are unnecessary. For strongly-typed views you should use the #model directive to specify the model type. For weekly-typed views you don't need anything.
don't mix razor views with aspx master pages (or aspx pages with razor layouts), as they don't work together easily. This includes checking all of your action methods where you have code like return View("ViewName", "MasterName") since that might also cause conflicting templatign technologies to be used.
If you still have a backup of your MVC2 project I would try using the tool Microsoft released on MSDN for this. See this link for more information. Also Scott Guthrie wrote something about it in his blog posts when MVC3 was released, you can read the article here.
I'm afraid I can't give you an direct solution to this. But sounds like an bug or problem in the conversion software from telerik you used.

Resources