ASP.NET - problem in loading crystal report in iis server asp.net

Asked By mani on 03-Oct-11 01:04 AM
hi i am using crystall report 2008 in my web application ...it works fine,.and loading in local server only..but when i move to online server iam getting lot of probem when i loading crystal report...

error is
System.Runtime.InteropServices.COMException: Invalid file name.
   g.Load(Server.MapPath("invoicebill.rpt"));
and also another report getting blank page ...please anybody give me perfect solutions for those problems...
smr replied to mani on 03-Oct-11 01:07 AM
HI


Here is the key location in the registry, type in your directory using regedit (you can always delete the value if you want to revert):

 HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\10.5\Report Application Server\InProcServer\TempDir

refer
http://blakepell.wordpress.com/2008/10/09/crystal-reports-2008-asp-net-iis/
Reena Jain replied to mani on 03-Oct-11 01:10 AM
hi,

Deploy a web application that uses crystal report basic 10.5 and hit below error when try to access to the application.

"Could not load file or assembly 'CrystalDecisions.Web, Version=10.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified."

This is because we dont have
crystal report basic runtime installed in the server.

Where do I get the basic (10.5) runtime? It's on your machine:
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages\CrystalReports10_5

My server is a 32 bit machine, so i install CRRedist2008_x86.msi in the machine.

Now what? I still can the same error? Wait, we need to restart the IIS to make it work. After restart the IIS, it's work perfectly.
Suchit shah replied to mani on 03-Oct-11 01:11 AM
First, try to find osql.exe on your client box, "c:\program files\microsoft sql server\80\tools\binn", osql.exe /S<servermachine> /E, or "osql.exe /S<servermachine>\<Instancename> /E"( the latter is for named instance). would you also get the same error? For remote connection specific you need following checklist:

A. Enable "File and printer sharing" in Firewall if your server is behind that.

B. Add program "sqlbrowser.exe" or udp port "1434" in your firewall exception list.

C. Add tcp port "1433" of default instance or <port number> of named instance in firewall, check you errorlog to figure out which port server is listening on. If you want your connection over TCP and make sure your server has TCP enabled.

D. Try ping your remote server machine, name and ipaddress.

E. Try to telnet <remoterservername> <portnumber>

F. Try to access a share of your remote server.

If above list all passed, you should be able to connect to linked server unless other problem exists, normally, you could see event log or server log to get clue.

dipa ahuja replied to mani on 03-Oct-11 01:17 AM

Limit CR Engine access to TEMP folder

 Described is default behavior, which could be adjusted to limit access to more relevant location.

Visit the following location:

HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Report Application Server\InprocServer

or in case of 64 bit Vista (not being familiar at first with new registry structure you may be surprised about this)

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Business Objects\Suite 12.0\Report Application Server\InprocServer

then add/update the following value

TempDir: String = “your folder”

Limit CR Engine access to TEMP folder

 Described is default behavior, which could be adjusted to limit access to more relevant location.

Visit the following location:

HKEY_LOCAL_MACHINE\SOFTWARE\Business Objects\Suite 12.0\Report Application Server\InprocServer

or in case of 64 bit Vista (not being familiar at first with new registry structure you may be surprised about this)

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Business Objects\Suite 12.0\Report Application Server\InprocServer

then add/update the following value

http://blog.dragonsoft.us/2008/12/23/crystal-reports-2008-aspnet-and-impersonation/

Anoop S replied to mani on 03-Oct-11 01:38 AM
did you copy the .rpt files with the application? Are they in the same folder? strFile - where does it come from? Is it hard-coded? A relative path? Also you can put a try..catch around the crReport.Load() and catch the exception and get more details from the exception message.
Some times it will happens due to system settings in server
Mihir Soni replied to mani on 03-Oct-11 01:58 AM
Hello,

The problem might be that you have kept all the reports in separate directory.

Try to put whole path instead of using server.mappath...that will help you..

Hope this helps you

Thank you