Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have search for solution but still not getting right way for my problem. Bold texts are the error messages.

Can You Please Solve the error:-

Server Error in '/' 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 17:
Line 18: string FileName = Server.MapPath("Student.rpt");
Line 19: Report.Load(FileName);
Line 20: DataSet ds = new DataSet();
Line 21: ds = (DataSet)Session["StudentDetails"];
Posted
Comments
[no name] 6-Oct-12 9:11am    
http://www.codeproject.com/Questions/297908/System-Runtime-InteropServices

1 solution

Check the path to the file - it is basically saying it doesn't exist. Remember that if you don't specify a path, MapPath returns a path relative to the ASP file being processed.
 
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