473,748 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Relative path in Web.Config

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
Nov 18 '05 #1
1 5359
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
ja******@online .microsoft.com

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

--------------------
From: "Prateek" <hi@amy.com>
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.F 6AE5BA0"
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: <Ot************ *@tk2msftngp13. phx.gbl>
Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
NNTP-Posting-Host: 61.11.24.47
Path: cpmsftngxa07.ph x.gbl!cpmsftngx a06.phx.gbl!TK2 MSFTNGP08.phx.g bl!tk2msftngp13 .
phx.gblXref: cpmsftngxa07.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1994 14
X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.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?TIA
Prateek


Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2778
by: Doug | last post by:
If I were to write an include with a relative path like include("../conf/config.php"); What is the use? As far as I understand it, the path is relative to the first script that is called by php. In other words, if the current working directory is /www/ and you were
3
2459
by: mrzoab | last post by:
hello........ I'm developing a client software. i'm now actually using an absolute path for my connection string in my program abd this will be a problem when i want to deploy it into another computer. how do i solve this? Thank you
2
6433
by: Harshdeep Mehta | last post by:
Hi all gurus, Myself Harshdeep Mehta, you can call me Harsh. I struck up in a situation where I need to define relative path in Web.Config. I.e. suppose I have a "Export" named folder, besides Web.Config in same location or somewhere in reference to web.config. Then how to define that. I know one easy solution but need better than that. the easy solution is
8
1966
by: dw | last post by:
Hello, all. I have a site that I'm testing on my LOCALHOST and also on a remote server, depending on whether I'm at work or at home. I don't want the OLEDBDATAAdapter to be pointing to the remote Access db, but to the local one. The OLEDBDATAAdapter wizard puts the entire path of the db (\\myserver\.... or c:\myprojects\....). The db resides within the site's folders; is there anyway to use relative paths for it (something like...
6
11772
by: openleren | last post by:
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" /> ...
3
12231
by: JamesPaulHart | last post by:
Howdy! I'm following the Microsoft article http://msdn2.microsoft.com/en-us/library/ms228042.aspx to add Version info to my precompiled dlls. Essentially, it states that I modify my Web.Config file by adding a <CodeDomelement that points to the location of my AssemblyInfo.Cs file. So far so good.
1
3486
by: =?Utf-8?B?Uk1C?= | last post by:
I am using the Configuration Application Block, and I want to keep my config files in a folder off of the app root called config. I have modified the app.config to point to the folder with a relative path (see example below) <storageProvider xsi:type="XmlFileStorageProviderData" name="XML File Storage Provider" path="..\config\exceptionHandlingConfiguration.config" /> I can edit my configuration with the entlib config tool with no...
6
2497
by: Royan | last post by:
Ok the problem is quite hard to explain, but i'll try to keep it as simple as i can. Imagine I have the following structure of my files and folders: /root/global.inc |__/files/foo.php |__/utils |__/logs/logger.inc When I run foo.php I get the following error:
2
4302
by: BD | last post by:
Hi there. Using 8.2 on Windows. I have a situation where I have a db backup, which I want to deploy to a group of developer workstations. The target directory for the database files will be consistent, but the location that the backup file is on may vary. I have gone through the entire backup and restore process, and it
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9386
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.