Relative Paths
Our web application is currently using relative paths in various places throughout our code. im working on eliminating this, but not sure of the best way to go about
it. i want to avoid hardcoding the path to make migration easier and more manageable. i thought there is a way to user the request object?? request.servervariables or
something -
View Replies
ADVERTISEMENT
Can anyone help me find a solution to quickly working out relative paths to
a folder in the root of my server...
Although it easy when you go - say - two levels down:
.../includes
it becomes increasingly difficult to ball park the folder when you go deeper
and wider down:
.../.../.../includes
....How do you guys get a quick fix on where the hell the folder or file is
and use that path in asp?
View Replies
View Related
i have about 5 files included in all scripts how do i give relative paths to them?
View Replies
View Related
I got a problem when I uploaded a file with the input tag of type file "<input type=file.." using the FileSystemObject where The page not opens and there is no any respond, but I tried to see if the folder that is already exists xan I see by that object I discovered that it is not exist.
The main problem I put my files in a folder that I dont know its absolute path , just a relative that always not exist.
View Replies
View Related
I have an email application that builds an email body; I got it from IE's online tutorial with the whole "toolbar.htc" thing. Basically my email body is held in a DIV tag, nicely name "oDiv", and then passed to another page for processing.
I send the email using CDONTS.NewMail object. Basically it's a long email and I need a way to hyperlink to the next section. The problem is when I recieve the email, all the relative links are now absolute links. I've tried playing with ContentBase, but nothing is working. Any suggestions?
View Replies
View Related
I am editing a script that requires me to output:
Today's date
1 week from today's date
and 4 weeks from today's date.
I am quite new when it comes to ASP programming, could I get some assitance? I need it in MM/DD/YYYY format .
View Replies
View Related
I had a database driven website running on a free host,i have now changed host and am having problems setting the db path.
the old host was with somee.com and my website was Kartsearch.this was the path that worked
Source=d:DZHostsLocalUserkartsearchkartsearch instantads.mdb
my new host is 100 webspace(http://freeunixhost.com)My details are sugster & the root folder is sugster.freeunixhost.com, there is a folder called ads where the db is located.i have tried many paths which i thought would work but to no avail.
View Replies
View Related
I'm using a segement of code in my global.asa to open a db connection check a users ip address against those i have in a recordset and then take the appriopriate action, very handy for banning bad bots who ignore my robots.txt and users who abuse my system.
Anyways the connection im using is Code:
View Replies
View Related
Is there a way to save a file to disk using objStream.SaveToFile using a relative path instead of an absolute path?
View Replies
View Related
Anyone know of a site that gives all of the syntax of relative addressing for URLS?
for example: /, ./, ../, etc.
View Replies
View Related
I am trying to solve a problem on a production server, that unfortunately is
not repeatable on our development server. It is for a bank, and the site is
being hosted by a different company.
Anyway the problem is this. There is a directory where a number of pdfs are
stored. Here is the structure.
bank
| |_
| bank2004
| |_
| images
| |_
| pdfs
images
|_
pdfs
The current pdfs we want to access are in the bank/bank2004/images/pdfs/
directory. The old pdfs with the same names but different content are in the
bank/images/pdfs/ dir.
There are three types of pdfs we retrieve. Personal Applications, Business
Applications and Brochures. Our software writes all three types to that
branch of directories fine using pretty much the same methods for each type.
But when our web pages read them back, the 'brochures' type are pulled from
the old bank/images/pdfs directory instead of the current 2004 one. The
appplication pdfs are fine, they are read from the 2004 branch. The code
used to get the applications is virtually identical to the brochure code,
and it all works like clockwork on the dev box with exactly the same setup,
so it cant be the code.
I'm guessing it's some kind of directory mapping or someting on the iis
server, but I dont have access to the configuration of this server. There
are quick fixes to this problem, such as putting all our new pdf brochures
into the old directory, but my boss wants to know why this is happening.
Has anyone had a similar experience who can at least point me the right way.
I have next to no knowlege of iis, but I'm guessing it has to be server
related.
View Replies
View Related
I have written a program which uses a directory structure upto 4 dirs deep.
I reference the include file
<!--#include file="../../includes/main_page_open.asp"-->
main_page_open.asp contains the line
server.execute("../includes/checkPerms.asp")
I get an error saying
Server object error 'ASP 0228 : 80004005'
Server.Execute Error
/ios/includes/main_page_open.asp, line 32 The call to Server.Execute failed while loading the page.
The basis for the error is pretty straight forward - because the file (main_page_open.asp) is being called from a directory, two deep, the file attempting to be executed cant be executed because the system is looking in the wrong directory.
Now, before someone says; change the path; I cant do that because many (about 100) other files reference the same file with no problem.
View Replies
View Related
If I've enabled Parent Paths (PP) in IIS, but have installed the URL Filter
and disallowed ".." and "../" within links, am I covered from the
vulnerabilities of PP's?
This allows me to use PP's in #Include statements, but doesn't allow
visitors to use PP's in their links to access directories on my server.
Is this correct?
View Replies
View Related
I am trying to learn new stuff using asp. That means I am downloading a lot of examples and looking at them. Sometimes thats all I do is look and compare his/her code to my attempt but also sometimes I need to see a working demo. I find I am replacing the path a lot. Is there a faster way to do this.
can Create a txt file with paths in them and use that to get paths from. It would be differant if I was using the pages but I do not evan have a webpage yet just iis setup on my home comp.
View Replies
View Related
I am loading a vbscript source file on the client. Here's the code:
<script language="VBSCRIPT" src="../vs/systableEdit.vs">
</script>
This code worked on IIS 5.0, Windows 2000 but doesn't work on IIS 6.0, Windows 2003. This is client-side vbscript. I have the parent paths enabled but that only applies to server-side include files, I think. Anyone know why the src does not load and what I should do to fix?
View Replies
View Related
I have a rather large classic ASP application that uses relative references like
...commonconnection.asp
all over the place in about 60 pages. The application works OK on my XP Pro machine but does not work on a Windows 2003 Server. Is there a way to set the server to accept the reference to the Parent folder? Does it have something to do with IIS lockdown? Or IIS Version 5 instead of 6?
View Replies
View Related
Anyone know a useful way of hiding image paths so images on my site cant be directly linked to?
I've seen sites that use <img src="image.asp?/moo/fred/image01.jpg"> (where the path starts from www.domain.com/secretfolder/moo/fred/image01.jpg) but dont know how to set this up.
BTW am on a shared host so dont have the use of base level administration if it makes any difference?
View Replies
View Related
I have developed an application which works correctly when hosted on a server running Windows Server 2003 and IIS. However, I have to present this application to a different company so I want to create a standalone version on my laptop. My laptop is running Windows XP, IIS 5.1 and has SQLServer Server tools installed.This works on the server:
Code:
<!--#include virtual="connection/connOLEDB_Live.asp"-->
However, I have to add the folder name to the path:I know that I could go through my application changing all of the paths but each time I make changes to the pages I would have to go through the application changing the paths again. Can anybody tell me if there is an easy way of configuring my machine to resolve the file paths to include the name of the folder?
View Replies
View Related
ive got a bit of code to check if a file exists and it works if I use the full path ie "C:Inetpubwwwrootfile.txt" can someone advise me how to get it so I can use the relative path ie "file.txt" where the file and the code are in the same directory? Code:
View Replies
View Related
Does someone have a reasonable method for concealing the paths to data when using ASP to MS Access?
I maintain a website where some data is intended to be released according to date:time. Some visitors like to "jump the release date" and just copy-n-paste the visible short cuts so they can get an early view of the material stored in a MS Access database.
Because I do want to continue using a straightforward naming convention for the various files, I was hoping someone might have information on how they had kept from pre-releasing information in this situation.
View Replies
View Related
I have a standard Header.asp that I want to include in every other page in
my site. Header.asp is located in the root folder, but the calling pages are
in various folders/levels. Since the relative paths specified in header are
subject to change and are based on the relative path of the calling page,
problems arise. (Strangley, using the IFRAME method of including a header
doesn't react the same way.)
The solution I believe lies in using absolute paths in the Header.asp file
using the "virtual" include qualifier. But this assumes your development
directory structure is the same as your production environment. So I guess
that is the answer. Use absolute paths and set up your development directory
structure to be identical to your production.
View Replies
View Related
Config:
IIS 6 Windows 2003
Site_A
Site_B
Scenario:
I need a virtual directory in Site_B to serve the files in Site_A (without redirecting the request) so I just added for example Site_B/A as a vdir, and set it's home dir to the physical root of Site_A (eg. C:inetpubwwwrootSite_A) sounds simple enough... not for long:
Problem (nb. I tend to use forward slashes as web/iis paths and backslash as windows filesystem paths):
The include files in Site_A reside in: Site_Aincludes and the include statements in the ASP code seem to be absolute virtual paths (if such a thing exists) for example: <!--#include virtual="/includes/header.asp"--> Code:
View Replies
View Related