CrystalImageHandler.aspx not found

后端 未结 4 1900
星月不相逢
星月不相逢 2021-01-05 06:32

I am using Crystal reports viewer on a normal ASP.NET aspx page in an MVC3 application. In a controller action I am simply redirecting to the aspx page and the report shows

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-05 06:43

    I had the same problem, but fortunately I have some experience with Crystal Reports.

    You just need to change the Web.config, because the "path" attribute is set to site root. It will work if you open the url in browser and remove the ReportWebForms from it.

    Actually I've just added 2 more lines of configuration:

    
        
          
          
          
          
        
    
    
    
        
          
          
          
          
          
          
        
    
    

    And finally you have to add an ignore rule the route for MVC application:

    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    routes.IgnoreRoute("{resource}.aspx/{*pathInfo}");
    // Here is added new ignore rule
    routes.IgnoreRoute("Reports/{resource}.aspx/{*pathInfo}");
    

    In my case I have a folder named Reports where the .aspx file is placed. I guess you should change this to ReportWebForms in your case.

提交回复
热议问题