I am using Visual Studio 2010
with Crystal Report
. It is working fine in my local server but on web server, it is giving error :
System.Runtime.InteropServices.COMException: Invalid file name
.
I tried many solutions like put .rpt
file in any folder and provide that path, give full permission to windows temp folder, enable parent path form IIS etc.
But none of them is working. Please help me to solve this.
My current path :
crystalReport.Load(Server.MapPath("~/PurchaseOrder1.rpt"));
Not a whole answer but I'm too new to SO just to comment. One thing you could try is to download Process Monitor and watch to see where Crystal is trying to load the file from and that may help. Process Monitor will give a lot of output but that can be filtered on, for instance, part of the filename. It may tell you if there is a permissions issue too. I find it very useful for these sort of situations where you can't work out why a file is not found.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With