Re: relative path in web.config
From: openleren (openleren_at_skynet.be)
Date: 09/15/04
- Next message: Daniel G: "AD groups in ASP.NET project"
- Previous message: Scott Allen: "Re: Crystal reports newbie"
- In reply to: Patrice: "Re: relative path in web.config"
- Next in thread: Patrice: "Re: relative path in web.config"
- Reply: Patrice: "Re: relative path in web.config"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Sep 2004 16:03:53 +0200
Hi,
I am not following you:
Firstly I have tried ~/data/MyBase.mdb and it doesn't work because the
server transplants it for some reason on my system32 directory.
Secondly how can I use Server.mapPath in an xml file?
sorry...
Jan
"Patrice" <nobody@nowhere.com> wrote in message
news:OBupwQymEHA.2500@TK2MSFTNGP09.phx.gbl...
> You unlikely have the notion of current path (preventing to have a
relative
> path) in this context.
>
> I would store this info separately and would have the code translating the
> relative path to an absolute path. For example you could store :
>
> ~/../../data/MyBase.mdb and use Server.MapPath to inject the absolute path
> in the connection string, the path in the web.config file being relative
to
> the root of the web site...
>
> Patrice
>
>
> --
>
> "openleren" <openleren@skynet.be> a écrit dans le message de
> news:4148394a$0$11249$ba620e4c@news.skynet.be...
> > Hi all, how can I use a relative path in my web.config file for an
Access
> > db?:
> >
> > Instead of using
> >
> > <configuration>
> > <appSettings>
> > <add key="conAccess" value="microsoft.jet.oledb.4.0;data
> > source=c:/Inetpub/MyApp/data/database.mdb" />
> > ...
> >
> > I would rather use
> >
> > <add key="conAccess" value="microsoft.jet.oledb.4.0;data
> > source=data/database.mdb" />
> >
> > however this doesn't work: I get an error like
> > "C:\WINNT\system32\data\database.mdb is not a valid path. ..."
> >
> >
> > can anyone help?
> >
> > cheers, Jan Vandorpe
> >
> >
>
>
- Next message: Daniel G: "AD groups in ASP.NET project"
- Previous message: Scott Allen: "Re: Crystal reports newbie"
- In reply to: Patrice: "Re: relative path in web.config"
- Next in thread: Patrice: "Re: relative path in web.config"
- Reply: Patrice: "Re: relative path in web.config"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|