locked
Crystal Report in IIS RRS feed

  • Question

  • User-1578974752 posted

    I have crystal report which is opening fine in the local host. But when I publish to production the link is just showing error. I can not open the report. What could be wrong? Appreciate the help

    Response.AppendHeader("Content-Disposition", ("attachment; filename=" + Path.GetFileName(String.Format("C:\inetpub\wwwroot\A\B\Reports\C\D({0}).pdf", Convert.ToString(search.Text), no))))

     

    Response.WriteFile(String.Format("C:\inetpub\wwwroot\C:\inetpub\wwwroot\A\B\Reports\C\D({0}).pdf", Convert.ToString(search.Text), no))

    Wednesday, March 27, 2019 11:50 AM

Answers

  • User475983607 posted

    But when I publish to production the link is just showing error.

    And the error is?

    What could be wrong?

    Hard to tell.  The subject is Crystall Report in IIS but the code getting a file name from a hardcoded string.  I assume the file does not exist on the server.  Usually Web Site are on a different drive than "C:/"

    Have you verified the file exists in the hardcoded path?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 27, 2019 7:19 PM
  • User-1174608757 posted

    Hi ,shsu

    According to your description, could you please show me what error you met? If you want to host  web application with crystal report on IIS , you should pay attention to these points:

    1.You should add the Crystal report dlls to the [bin] directory of the web application.

    2.confirm you have add CR runtime on your machine.

    3. The .Net applications (created using VS2005 & VS2008) which use the reports designed in Crystal Reports XI R2 or Crystal Reports 2008 should target 32 bit mode only.So you should set your application pool as 32 bits.

    Best Regards

    Wei

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 28, 2019 2:09 AM
  • User-1578974752 posted

    It was not saving in the folder because the folder doesn't had the right .I added the permission and now ok

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 1, 2019 5:35 AM

All replies

  • User1120430333 posted

    Did you ever use local IIS on your development machine and tested and  debug the Web Project using Visual Stuido? I am not talking about IIS Express. I am talking about Local IIS the kind that is on the production server.

    https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-enable-debugging-for-aspnet-applications?view=vs-2017

    Wednesday, March 27, 2019 6:56 PM
  • User475983607 posted

    But when I publish to production the link is just showing error.

    And the error is?

    What could be wrong?

    Hard to tell.  The subject is Crystall Report in IIS but the code getting a file name from a hardcoded string.  I assume the file does not exist on the server.  Usually Web Site are on a different drive than "C:/"

    Have you verified the file exists in the hardcoded path?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, March 27, 2019 7:19 PM
  • User-1174608757 posted

    Hi ,shsu

    According to your description, could you please show me what error you met? If you want to host  web application with crystal report on IIS , you should pay attention to these points:

    1.You should add the Crystal report dlls to the [bin] directory of the web application.

    2.confirm you have add CR runtime on your machine.

    3. The .Net applications (created using VS2005 & VS2008) which use the reports designed in Crystal Reports XI R2 or Crystal Reports 2008 should target 32 bit mode only.So you should set your application pool as 32 bits.

    Best Regards

    Wei

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 28, 2019 2:09 AM
  • User-1578974752 posted

    It was not saving in the folder because the folder doesn't had the right .I added the permission and now ok

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 1, 2019 5:35 AM