Click here to Skip to main content
15,886,745 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi i am developing website using crystal report,same code work in my machin,but if i move to server 2102 ,it show error like invalid file name near load reportviewer.

XML
Server Error in '/websam' Application.
--------------------------------------------------------------------------------


Invalid file name. 
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.Runtime.InteropServices.COMException: Invalid file name.

Source Error: 



Line 26:         'Assign the datasource and set the properties for Report viewer
Line 27:         Dim rptDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument
Line 28:         rptDocument.Load(strReportPath)
Line 29: 
Line 30:         rptDocument.SetDatabaseLogon(ConfigurationManager.AppSettings("UserID").ToString, ConfigurationManager.AppSettings("SQLPassword").ToString)
  

 Source File:  C:\inetpub\wwwroot\websam\SReport.aspx.vb    Line:  28 



i am move full code and install correct crystal report exe also.i am add namespace like

VB
Imports CrystalDecisions.CrystalReports.Engine.ReportDocument
Imports CrystalDecisions.Shared
Imports System.Data.SqlClient
Imports System.Data
Imports CrystalDecisions.CrystalReports.Engine


pls reply asap

Regards
Aravind
Posted
Comments
$*Developer - Vaibhav*$ 3-Apr-14 7:28am    
just check below link

http://www.tek-tips.com/viewthread.cfm?qid=1057116


http://www.codeproject.com/Questions/297247/System-Runtime-InteropServices
Aravindba 3-Apr-14 22:48pm    
Hi
Thanx finally link first solve my problem.in that forums first answer solved answer.
"Try giving everyone full access to the windows temp directory"
for ur answer 5+

1 solution

Hi According to $*Developer - Vaibhav*$ reply,in that first link and first answer solved problem.

SQL
problem was caused by the ASP .NET worker process not having access to the windows temp directory.

Try giving everyone full access to the windows temp directory


For other user verification pls try above step,try to give full access for Everyone user in C:\Windows\Temp folder.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900