I am using Server.MapPath in my code for Access.
Main Topics
Browse All TopicsI 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.OleDbExc
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\
Stack Trace:
[OleDbException (0x80004005): Not a valid file name.]
System.Data.OleDb.OleDbCon
System.Data.OleDb.OleDbCon
System.Data.OleDb.OleDbCon
ASP.default_aspx.Execute(S
ASP.default_aspx.Button1_C
System.Web.UI.WebControls.
System.Web.UI.WebControls.
System.Web.UI.Page.RaisePo
System.Web.UI.Page.RaisePo
System.Web.UI.Page.Process
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: raterusPosted on 2004-08-20 at 09:31:28ID: 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.