Hi All,
I have uploaded my site on shared web server through filezilla. All pages working fine when i trying to open(load) page i get an error.
[COMException (0x800001fb): Invalid file name.] CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.Open(Object& DocumentPath, Int32 Options) +0 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.Open(Object& DocumentPath, Int32 Options) +90 CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +259 [CrystalReportsException: Load report failed.] CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.EnsureDocumentIsOpened() +322 CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob) +851 CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename) +78 DawarBilling.testing.Page_Load(Object sender, EventArgs e) in D:\Desktop\Franchise\DawarBilling\DawarBilling\testing.aspx.cs:23 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51 System.Web.UI.Control.OnLoad(EventArgs e) +92 System.Web.UI.Control.LoadRecursive() +54 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
I have a doubt that y it's taking my local system path instead of server path even i used
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("~/testing.aspx");
}
Loading

Iftikar HussainRank #423 · 5.9K reputationPosted Aug 29, 2013, 2:37 AM EDT
Have you use LocalPath for crystal report?
Regards,
Iftikar
Gurjeet Singh107 reputationPosted Aug 29, 2013, 2:40 AM EDT
CrystalDecisions.CrystalReports.Engine.ReportDocument r = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
r.Load(Server.MapPath("~/CrystalReport3.rpt"));
crv.ReportSource = r;
Abhishek JainRank #1,062 · 1.8K reputationPosted Aug 29, 2013, 2:41 AM EDT
Please check if the file is present at the same path, and if so it can be a permission issue, that the user with which code is running on IIS do not have sufficient permissions to access that folder or file.
Regards
Abhishek
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 29, 2013, 2:42 AM EDT
Gurjeet Singh107 reputationPosted Aug 29, 2013, 2:45 AM EDT
Gurjeet Singh107 reputationPosted Aug 29, 2013, 2:49 AM EDT
xml version="1.0"?>
<configuration>
<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">section>
sectionGroup>
sectionGroup>
configSections>
<appSettings>
<add key="CrystalImageCleaner-AutoStart" value="true" />
<add key="CrystalImageCleaner-Sleep" value="60000" />
<add key="CrystalImageCleaner-Age" value="120000" />
appSettings>
<connectionStrings>
connectionStrings>
<system.web>
<sessionState cookieless="false">
sessionState>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
assemblies>
compilation>
<customErrors mode="Off" />
<machineKey decryption="Auto" validation="SHA1" decryptionKey="AutoGenerate" validationKey="AutoGenerate" />
<httpHandlers>
<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
httpHandlers>
system.web>
<system.webServer>
<handlers>
<add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode" />
<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
handlers>
<validation validateIntegratedModeConfiguration="false" />
system.webServer>
configuration>
Gurjeet Singh107 reputationPosted Aug 29, 2013, 2:50 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 29, 2013, 3:07 AM EDT
Gurjeet Singh107 reputationPosted Aug 29, 2013, 3:36 AM EDT
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 29, 2013, 3:37 AM EDT
Gurjeet Singh107 reputationPosted Aug 29, 2013, 4:07 AM EDT
first page button click
protected void Button1_Click(object sender, EventArgs e){ Response.Redirect("~/testing.aspx");
}
second page
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="testing.aspx.cs" Inherits="DawarBilling.testing" %>
<%@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %>
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>testing pagetitle>
head>
<body>
<form id="form1" runat="server">
<div>
It's testing page. <CR:CrystalReportViewer ID="crv" runat="server"
AutoDataBind="true" />
<br />
div>
form>
body>
html>
.cs file
public partial class testing : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
CrystalDecisions.CrystalReports.Engine.ReportDocument r = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
r.Load(Server.MapPath("CrystalReport3.rpt"));
crv.ReportSource = r;
}
}
Sanjeeb LenkaRank #301 · 8.3K reputationPosted Aug 29, 2013, 4:11 AM EDT
protected void Page_Load(object sender, EventArgs e)
{
CrystalDecisions.CrystalReports.Engine.ReportDocument r = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
r.Load(Server.MapPath("~/CrystalReport3.rpt"));
crv.ReportSource = r;
}
Iftikar HussainRank #423 · 5.9K reputationPosted Aug 29, 2013, 4:15 AM EDT
Gurjeet Singh107 reputationPosted Aug 29, 2013, 7:28 AM EDT
DawarBilling.testing.Page_Load(Object sender, EventArgs e) in D:\Desktop\Franchise\DawarBilling\DawarBilling\testing.aspx.cs:23
why it is taking my local system path.... even though i have uploaded site on server....
Nitesh KejriwalRank #253 · 9.9K reputationPosted Aug 29, 2013, 7:45 AM EDT
Have you published a website on your web server or a web application?
Are you able to browse other pages apart from this page?
If you have published a website, the problem is not in your local file path that is shown in the code. Instead it is the line that is throwing the error. Try putting the code between try catch and see whether everything gets loaded fine. I think the issue is the website has not been published properly.
Gurjeet Singh107 reputationPosted Aug 29, 2013, 11:37 PM EDT
Nitesh KejriwalRank #253 · 9.9K reputationPosted Aug 29, 2013, 11:42 PM EDT