473,382 Members | 1,204 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Get the path of a virtual subsubfolder

And
Hi everyone my database is in a folder inside the inetpub folder
(c:\inetpub\bd\mydatabase.mdb) and my web application is in a folder inside
the wwwroot folder.

My question is:

Is there a way of accessing my database using virtual directories, that is,
for example if I was using html I could achieve this putting
"..\..\bd\mydatabase.mdb".

I tried to do this using mappath function but with no good result.

Thanks in advance

And
Nov 18 '05 #1
8 2206
> Is there a way of accessing my database using virtual directories, that
is,
for example if I was using html I could achieve this putting
"..\..\bd\mydatabase.mdb".

I tried to do this using mappath function but with no good result.


Yes, Server.MapPath works. I will post the code if you post the following:

- The directory that your file resides in
- The full virtual path of your virtual directory (ie /data/bd/ )

I assume the physical path = c:\inetpub\bd\mydatabase.mdb
Jeremy
Nov 18 '05 #2
does it work correctly with full path "c:\sdfs\sdfsdf\sdfs\file.mdb"
What's the error?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"And" <so*****@somedomain.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi everyone my database is in a folder inside the inetpub folder
(c:\inetpub\bd\mydatabase.mdb) and my web application is in a folder inside the wwwroot folder.

My question is:

Is there a way of accessing my database using virtual directories, that is, for example if I was using html I could achieve this putting
"..\..\bd\mydatabase.mdb".

I tried to do this using mappath function but with no good result.

Thanks in advance

And

Nov 18 '05 #3
And
yes it works!

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2*****************@tk2msftngp13.phx.gbl...
does it work correctly with full path "c:\sdfs\sdfsdf\sdfs\file.mdb"
What's the error?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"And" <so*****@somedomain.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi everyone my database is in a folder inside the inetpub folder
(c:\inetpub\bd\mydatabase.mdb) and my web application is in a folder

inside
the wwwroot folder.

My question is:

Is there a way of accessing my database using virtual directories, that

is,
for example if I was using html I could achieve this putting
"..\..\bd\mydatabase.mdb".

I tried to do this using mappath function but with no good result.

Thanks in advance

And


Nov 18 '05 #4
And
This is the full address to my file
C:\Inetpub\wwwroot\Teste29_06_2004\myfile.aspx

and my database full address is (as you were thinking)
c:\inetpub\bd\mydatabase.mdb

PS: tks Jeremy for spend some time with my post

"Jeremy" <th***********@hotmail.com> wrote in message
news:MC*********************@twister.tampabay.rr.c om...
Is there a way of accessing my database using virtual directories, that is,
for example if I was using html I could achieve this putting
"..\..\bd\mydatabase.mdb".

I tried to do this using mappath function but with no good result.


Yes, Server.MapPath works. I will post the code if you post the

following:
- The directory that your file resides in
- The full virtual path of your virtual directory (ie /data/bd/ )

I assume the physical path = c:\inetpub\bd\mydatabase.mdb
Jeremy

Nov 18 '05 #5
and the error?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"And" <so*****@somedomain.com> wrote in message
news:uN*************@tk2msftngp13.phx.gbl...
yes it works!

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2*****************@tk2msftngp13.phx.gbl...
does it work correctly with full path "c:\sdfs\sdfsdf\sdfs\file.mdb"
What's the error?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"And" <so*****@somedomain.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi everyone my database is in a folder inside the inetpub folder
(c:\inetpub\bd\mydatabase.mdb) and my web application is in a folder

inside
the wwwroot folder.

My question is:

Is there a way of accessing my database using virtual directories,
that is,
for example if I was using html I could achieve this putting
"..\..\bd\mydatabase.mdb".

I tried to do this using mappath function but with no good result.

Thanks in advance

And



Nov 18 '05 #6
And
As I said I tried a lot of things and none of them worked or the path I get
wasn't the one I expected so the error depends on what I enter as argument
in the mappath directory but the most common error says that the mappath
argument must be a valid virtual path

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:Ot**************@tk2msftngp13.phx.gbl...
and the error?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"And" <so*****@somedomain.com> wrote in message
news:uN*************@tk2msftngp13.phx.gbl...
yes it works!

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:%2*****************@tk2msftngp13.phx.gbl...
does it work correctly with full path "c:\sdfs\sdfsdf\sdfs\file.mdb"
What's the error?

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"And" <so*****@somedomain.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
> Hi everyone my database is in a folder inside the inetpub folder
> (c:\inetpub\bd\mydatabase.mdb) and my web application is in a folder
inside
> the wwwroot folder.
>
> My question is:
>
> Is there a way of accessing my database using virtual directories, that is,
> for example if I was using html I could achieve this putting
> "..\..\bd\mydatabase.mdb".
>
> I tried to do this using mappath function but with no good result.
>
>
>
> Thanks in advance
>
> And
>
>



Nov 18 '05 #7
And what about the virtual directory? That's the important one, here is
what I need:

(web paths, not full physical)

My file: /Test/Myfile.aspx
Virtual directory: /Test/VirtualDir/
Code: Server.MapPath("VirtualDir/")

or if you are in a higher directory:

MyFile: /Test/Something/MyFile.aspx
Virutal: /VirtualDir/
Code: Server.MapPath("../../VirtualDir/")

You are probably just getting the virtual path (the one that gets sent into
MapPath) wrong.

Jeremy


"And" <so*****@somedomain.com> wrote in message
news:uG**************@TK2MSFTNGP12.phx.gbl...
This is the full address to my file
C:\Inetpub\wwwroot\Teste29_06_2004\myfile.aspx

and my database full address is (as you were thinking)
c:\inetpub\bd\mydatabase.mdb

PS: tks Jeremy for spend some time with my post

"Jeremy" <th***********@hotmail.com> wrote in message
news:MC*********************@twister.tampabay.rr.c om...
Is there a way of accessing my database using virtual directories,
that is,
for example if I was using html I could achieve this putting
"..\..\bd\mydatabase.mdb".

I tried to do this using mappath function but with no good result.


Yes, Server.MapPath works. I will post the code if you post the

following:

- The directory that your file resides in
- The full virtual path of your virtual directory (ie /data/bd/ )

I assume the physical path = c:\inetpub\bd\mydatabase.mdb
Jeremy


Nov 18 '05 #8
And
Hi Jeremy tks for your patience!

In fact I didn't understood what was really a virtual folder and was your
post that remind me that.

I made a search in the www and finally understood my real problem and I
fixed it.

Once again

tks

"Jeremy" <th***********@hotmail.com> wrote in message
news:mR*********************@twister.tampabay.rr.c om...
And what about the virtual directory? That's the important one, here is
what I need:

(web paths, not full physical)

My file: /Test/Myfile.aspx
Virtual directory: /Test/VirtualDir/
Code: Server.MapPath("VirtualDir/")

or if you are in a higher directory:

MyFile: /Test/Something/MyFile.aspx
Virutal: /VirtualDir/
Code: Server.MapPath("../../VirtualDir/")

You are probably just getting the virtual path (the one that gets sent into MapPath) wrong.

Jeremy


"And" <so*****@somedomain.com> wrote in message
news:uG**************@TK2MSFTNGP12.phx.gbl...
This is the full address to my file
C:\Inetpub\wwwroot\Teste29_06_2004\myfile.aspx

and my database full address is (as you were thinking)
c:\inetpub\bd\mydatabase.mdb

PS: tks Jeremy for spend some time with my post

"Jeremy" <th***********@hotmail.com> wrote in message
news:MC*********************@twister.tampabay.rr.c om...
> Is there a way of accessing my database using virtual directories, that is,
> for example if I was using html I could achieve this putting
> "..\..\bd\mydatabase.mdb".
>
> I tried to do this using mappath function but with no good result.

Yes, Server.MapPath works. I will post the code if you post the

following:

- The directory that your file resides in
- The full virtual path of your virtual directory (ie /data/bd/ )

I assume the physical path = c:\inetpub\bd\mydatabase.mdb
Jeremy



Nov 18 '05 #9

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

Similar topics

3
by: Ben Allfree | last post by:
Written to normalize web server path names based on a virtual root. I propose that something equivalent to this be added to os.path ------------------------------------- import os.path import...
4
by: | last post by:
Is it possible to include my remote web server path eg: m:/html/root/site1 | m:/html/root/site2 etc ....in virtual includes.... Thus eliminating the need to create duplicate INC files in each...
5
by: David Webb | last post by:
The problem started when the Working Folder for a project was somehow set to the folder of another project. I set the correct working folder in VSS and deleted the .vbproj files that had been...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
3
by: js | last post by:
Hi, I have stored the absolute file path in a grid, and want if user click it, will redirect to the virtual path and download the file: Dim fileName As String =...
4
by: tommaso.gastaldi | last post by:
Hi friends I was in the need to find a sort of "definitive" :) solution to transform a virtual path such as "~/MyDir/MyFile into a full web address. In particular I needed it * within web...
1
by: =?Utf-8?B?SWJyYWhpbQ==?= | last post by:
I have probelm to deploy ASP.net2 Application implement in this Application the Virtual path provider techinque what I have done : 1- built the web Application with Asp.net2 as File system...
4
by: =?Utf-8?B?SmVmZiBCZWVt?= | last post by:
Best way I can think to describe this is through an example. I have a virtual directory, let's call it "MyVirtualDirectory" that maps to \\MyServer\Shared. I have a path that is...
5
by: marss | last post by:
Server.MapPath("~/page.aspx") returns the physical file path based on the specified virtual path. Is there any reverse method to get the virtual path based on the physical path (both pathes belong...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.