Search code examples
crystal-reportsiis-8

Crystal report not working in iis 8


My application is developed in Visual Studio 2010 with windows8. The report is working fine when using visual studio development server. But is not working in IIS server. Tried solutions like pasting aspnet_client folder to the app path,also adding the following in web.config file

 <configSections>
<sectionGroup name="businessObjects">
  <sectionGroup name="crystalReports">
    <section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null" />
    <section name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler" />
  </sectionGroup>
</sectionGroup>
 </configSections>
<businessObjects> 
<crystalReports>
  <rptBuildProvider>
    <add embedRptInResource="true" />
  </rptBuildProvider>
  <crystalReportViewer>
    <add key="ResourceUri" value="/crystalreportviewers13" />
  </crystalReportViewer>
</crystalReports>
</businessObjects>

Stil its not working. Please help .Thanks in advance.


Solution

  • Make sure the path to the /aspnet_client/ resolves in your url, after you copied the directory to your application directory. If the aspnet_client url resolves, such as http://servername/yourapplication/aspnet_client/ then make sure the entry in the web.config matches.

    Instead of:

    <add key="ResourceUri" value="/crystalreportviewers13" />
    

    Change to:

    <add key="ResourceUri" value="~/yourapplication/aspnet_client/crystalreportviewers13" />
    

    But if the url resolves, you don't actually need it.