Solved

Not a valid file name

Posted on 2004-08-20
8
1,922 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
8 Comments
 
LVL 33

Expert Comment

by:raterus
Comment Utility
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
Comment Utility
I am using Server.MapPath in my code for Access.
0
 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 500 total points
Comment Utility
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 10

Expert Comment

by:EBatista
Comment Utility
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
Comment Utility
IZING, skip my post, i have posted it in the wrong thread.
0
 
LVL 5

Expert Comment

by:rajaamirapu
Comment Utility
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now