Solved

Not a valid file name

Posted on 2004-08-20
8
1,926 Views
Last Modified: 2012-05-05
I have tested my ASP.NET application before and worked on my IIS and WebMatrix Application. But Now that I have put it on a web hosting site. I get the following error. I have transferred the required webmatrix dlls. But I keep getting this error.

I think that it has to do something with my web.config file's path attribute which is set to path="/".


I will point anyone who can figure this out or help out...


Thanks in Advance.

Here is the error:






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

Not a valid 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.Data.OleDb.OleDbException: Not a valid file name.

Source Error:


Line 95:                 cmd.Connection = con
Line 96:                 cmd.CommandText = sSQL
Line 97:                 con.Open()
Line 98:                 Try
Line 99:                     cmd.ExecuteNonQuery()
 

Source File: E:\web\hinoecucom0\htdocs\default.aspx    Line: 97

Stack Trace:


[OleDbException (0x80004005): Not a valid file name.]
   System.Data.OleDb.OleDbConnection.ProcessResults(Int32 hr) +20
   System.Data.OleDb.OleDbConnection.InitializeProvider() +57
   System.Data.OleDb.OleDbConnection.Open() +203
   ASP.default_aspx.Execute(String sSQL) in E:\web\hinoecucom0\htdocs\default.aspx:97
   ASP.default_aspx.Button1_Click(Object sender, EventArgs e) in E:\web\hinoecucom0\htdocs\default.aspx:72
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +57
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +1277

 

0
Comment
Question by:IZING
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 33

Expert Comment

by:raterus
ID: 11852950
Sounds like your connectionstring may be pointing to an incorrect location.  What database are you using?  If it is access, you should use Server.MapPath when creating the connectionstring.
0
 
LVL 1

Author Comment

by:IZING
ID: 11853629
I am using Server.MapPath in my code for Access.
0
 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 500 total points
ID: 11853803
Just output  server.MapPath to a label or something.. and see what address it gives.   Usually it gives the address where the aspx file is. Make changes accordingly, to get to your database file.
-Baan
0
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 
LVL 10

Expert Comment

by:EBatista
ID: 11854470
you have to set up your app in IIS.
go to IIS manager, rightclick your app folder and hit properties, then under the Directory tab, in the Application Settings region hit the Create button.
that should work.

regards
0
 
LVL 10

Expert Comment

by:EBatista
ID: 11854742
IZING, skip my post, i have posted it in the wrong thread.
0
 
LVL 5

Expert Comment

by:rajaamirapu
ID: 11857760
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question