Relative path in Web.Config

P

Prateek

Hi,

I am using appSettings in Web.Config to store my connection string. However, I am not able to provide a relative path to the Access database. How can I do that?

TIA
Prateek
 
J

Jim Cheshire [MSFT]

Prateek,

An Access database path in a connection string must be an absolute disk
path to the database. If your database is stored within your Web content
area (and this is not advisable if possible), you can use Server.MapPath to
get a physical path to a virtual location.

Jim Cheshire, MCSE, MCSD [MSFT]
Microsoft Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.

--------------------
From: "Prateek" <[email protected]>
Subject: Relative path in Web.Config
Date: Sat, 3 Jan 2004 01:07:31 +0530
Lines: 40
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_0008_01C3D195.F6AE5BA0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 61.11.24.47
Path: cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.
phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:199414
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi,
I am using appSettings in Web.Config to store my connection string.
However, I am not able to provide a relative path to the Access database.
How can I do that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top