[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Not a valid file name

Posted on 2004-08-20
8
Medium Priority
?
1,932 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 2000 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

650 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