Report Viewer work locally, but not when deployed to IIS7

2 posts, 0 answers
  1. Jason
    Jason avatar
    5 posts
    Member since:
    Apr 2012

    Posted 11 Jun 2012 Link to this post

    I have set up my MVC 3 application to use the report viewer.  This works fine locally, but it will not load once deployed to IIS.  I opened up fiddler and whenever a request for /Telerik.ReportViewer.axd?... is made, a 404 error occurs.  I have seen many other posts with this problem, and it was usually issues with the web.config, but it seems my web.config is correct.

    In my web.config:

    <httpHandlers>
          <add type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=6.0.12.215, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" validate="true"/><br>
        </httpHandlers>

      <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules runAllManagedModulesForAllRequests="true" />
        <handlers>
          <add name="Telerik.ReportViewer.axd_*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=6.0.12.215, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" path="Telerik.ReportViewer.axd" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/>
        </handlers>
      </system.webServer>

  2. Paul D.
    Paul D. avatar
    7 posts
    Member since:
    Dec 2010

    Posted 12 Jun 2012 Link to this post

    Jason:
    There is an issue with II7 (7.5 I think) where dll's from other sources (zones, like the internet) might have an added stream in the file properties that indicate their source.  IIS7 then blocks those files until you release them if they are not from the local machine.  This is a quick and dirty explanation and probably not all that technically correct.

    Here's a website with more details:
    http://blogs.msdn.com/b/friis/archive/2010/06/09/system-security-securityexception-request-for-the-permission-of-type-system-web-aspnethostingpermission-failed.aspx

    The point is, go into your bin folder and right click on the telerik dll files and make sure that properties don't show that they are being blocked (i.e. unblock them.)  The above page will get you more info.

    I don't know if this issue is creating the 404 error but i seem to recall that i did get that error in some cases, even thought the page existed. 
    So this may not help you out but perhaps....

    BTW - If you google streams and the sysinternals guys you can get some more info on the stream side of the issue.  It's like adding extended attributes to files.  One way to remove the streams is the sysinternals stream utility.  Another way is to copy files to a std FAT drive which will strip the extra stuff since the 16 bit FAT format can't carry the extra stuff around.
    http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx 

    good luck
  3. DevCraft banner
Back to Top