Re: relative path in web.config

From: openleren (openleren_at_skynet.be)
Date: 09/15/04


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
> >
> >
>
>



Relevant Pages

  • Whats the perfect (OS independent) way of storing filepaths ?
    ... I wonder what's the perfect way to store, OS-independent, filepaths? ... use a relative path if drive is identical to the application ...
    (comp.lang.python)
  • Re: Links and graphics in Access
    ... Just store the file name in the database, then on your page create a relative path to the location ... Never heard of an security issues related to storing hyperlink in a database. ...
    (microsoft.public.frontpage.client)
  • Re: Databases
    ... Say you store your forms, your data and your testdata in the directories ... Then relative path will ... be invalid and in this case VFP opens database in the default directory. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Undoing ExtractRelativePath
    ... > relative path then you know what path it ... For example Delphi will store ... relative or absolute paths in the .dpr depending. ... marc rohloff at bigfoot dot com ...
    (borland.public.delphi.nativeapi)
  • Using relative path in java programs - how ?
    ... I wrote a new servlet that uses a configuration file to store ... The problem is that I want to use a relative path when accessing this ...
    (comp.lang.java.programmer)