View Full Version : Connection String in Web.Config
frictionadd
10-12-2003, 07:32 AM
I'm having the same issues too.
drugsavings
10-12-2003, 11:12 AM
I'm trying to set up my connection string in my Web.config file.
The issue I'm having is that I can't seem to find a "Data Source" value that works, and I obviously don't have access to the Server.MapPath function inside Web.config
steurm
10-13-2003, 04:52 AM
You could do this by putting a testpage online, only setting the text-property of a label to server.mappath("/db").
If you then run the page, you have the server-mappath value for the database directory.
server.mappath certainly doesn't work in your web.config file, since it is only a textfile, used for configuring your application. It is not processed like a regular .aspx-page.
Eventually, your connectionstring will look like this (if your using Access):
provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\web\MyDASPLogin\htdocs\db\MyDatabaseName .mdb
Replace MyDASPLogin with your login for my.discountasp.net (i.e. the name of your account), and MyDatabaseName.mdb with the fysical filename of your access database.
--
Steurm
www.steurm.net/steurm
vBulletin® ©Jelsoft Enterprises Ltd.