Include Below Web Root Dir
Is there a way to INCLUDE a file BELOW the web root directory?
View RepliesIs there a way to INCLUDE a file BELOW the web root directory?
View RepliesIs there a way to use the include statement to access a file BELOW my wwwroot directory?
for instance, I'm using this:
<!--#include virtual="/includes/SearchParam.asp" -->
this is basically accessing D:UsersSite2wwwrootincludesSearchParam.asp
I want to put my include files in D:UsersSite2Includes for security reasons but i can't figure out how to access them.
I was wondering if there was a way to get the root URL of the virtual
directory where an ASP file is called from. For example if there's a virtual
directory pointing to http://server/myvirtdir, and an asp file is located in
http://server/myvirtdir/subdir/anothersubdir/file.asp, is there a method
that returns http://server/myvirtdir
How do I setup perrmissions in my FTP to allow anonymous access where you can only upload to and download from a separate folder but not create sub folders or change any permissions etc.
I have my trusted users with extended permission in like c:ftproot ame1, c:ftproot ame2 etc and would like to have my anonymous access directed to something like c:anonymous. I do not want them to see the trusted accounts. Can I and how do I do that?
My IIS server (Win2K) I created a new application, but when I #Include a file it goes to the root of the Default Web site rather than the root of the site? I tried
Response.write server.mappath("default.asp")
and got
c:inetpubwwwrootdefault.asp
I know this is IIS 101 but I cannot get it to work.
how do u get somthing from the root directory no matter where abouts you are? say i'm in /folder1/bla/test/foler2 and i wanted to place an image on this page but i don't want to have to backtrack ( ../../../../ ) all the way to get there. is there a peice of code that can go straight to the root directory?
View Replies View Relatedmy isp has created a directory with read/write access above the domain root. I asked them to do this to make it safer. I have used 'freeasp upload' to create an upload page (which works) but now I can't access the image files in this new directory. How do you guys deal with uploading images in a CMS admin and then retrieving them on the public site?
View Replies View RelatedUsing IIS I want to embed a TIFF file in my web/intranet page that is stored in a folder that is not accessible to everyone. The files are strictly private in nature and only the requested TIFF file may be shown. They are in a folder that is used by another application and it can’t be moved. Code:
View Replies View RelatedI have a situation which i am sure has arisen previously. But for the life of me i cant figure out how to get this to work.
I have a directory setup like this:
Site1 - www.site1.com
Asp -
Images -
Site2 - www.site2.com
Asp -
Images -
The problem that i am having is i cant get site 2 to display images from site 1 using the virtual path '../' as this only takes you to the root of site 2 and wont let me out of it.
I have tried to use the full path of http://www.site1.com/Images but this seems to take an a really long time to load the images.
Is it possible to go outside of this root directory using some kind of trick? I dont want to copy the images accross to site 2 either as there are actually hundreds of sites that will be referencing site1's image folder and it is updated regularly.
I was thinking of putting a virtual directory in site1 thatpointed to the image folder in site2 but i couldnt get that to work.
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 sub-domain on my remote web server host domain IP. eg: http://72.3.5.6.0 (www.site1.com; www.site2.com)
I would like to be able to use a UNIVERSAL INC file in the root of my web IP for the benefit of all my sub domains.
I have the standard folder structure on my web server (sya that the server is estserver):
My site is in c:Inetpubwwwrootmysite
I have also introduced the folders:
c:Inetpubimagerootcompany1
c:Inetpubimagerootcompany2
c:Inetpubimagerootcompany3
The idea is security (the companyN folders store images belonging to the companies 1,2,3 - and never the twain shall meet - this does not matter so much). The images are stored above MySite (in the imageroot folder) so that no-one can see them - if they sat in mysiteimages, for example, anyone can see them. And to further thre security, /imageroot does not have a URL
What I need is someway that I can display an image in imageroot on a page in MySite, eg /mysite/gallery.
I need to use an absolute path from my page in mysite to the required image
so in HTML that would be
<IMG SRC=" estserverinetpubimagerootcompany1picture.gi f">
however, that don't work. So how do you do it?
Can I implement session without global.asa file in my root directory....and is there any good site for sessions tutorial.
View Replies View RelatedI have defined a virtual directory and application called Test. The directory is C:inetpubwwwrootTest. I created a trivial page:
<%
response.write Server.Mappath("/")
%>
When I execute this page I get:
C:inetpubwwwroot
but I was expecting to see:
C:inetpubwwwroot est
Isn't the root of my virtual directory "test"?
I want to be to call my menu from another file onto my page so that i dont have to add it to every page of my website. The problem is when i try to add it using the include method it says that only one include file is allowed on an ASP. The other include file is my connection string so i cant really take that out of the page because then nothing else will work!
How can i get the menu page included as well as the connecting string?
Have added the code below, i have highlighted the 2 include files that i want to use in blue, i have also left the div tag in for where i currently have the menu which is what i want to take out and have ther include file there instead, if that makes sense. Basically the bit in red i want to be able to remove from all of my pages and add the blue file above the red code in instead, but i dont know how!!!!! Code:
How i can do <!--#include file="filename"--> dynamic with ASP, or any other way
View Replies View RelatedIf I want to include a file to my webpage that is not placed in the same
folder asd the application, but in another folder on the same disk...
I found out that this is not going to work:
<!--#include virtual="D:/binaer.no/nova/test.asp"-->
Is there any other way to include from another domain account on the same
server?
There is going to be several applications that includes the same file, so
the trix ../../../ will not do it for me...
<%
I am trying to use "set con" in the include file. i used it before with simple text but when I use the connection object it doesn t work. is this possible in asp and what is the problem with the code below:
inc.asp file
VARMSG = "set con = Server.CreateObject("ADODB.connection")"
con.Open ("dsn=project;uid=sa;pwd=sa")
%>
mainpage.asp
<!-- #include file="inc.asp" -->
<%
Response.write
set rsTypes = con.execute("select * from firstmarch order by cat")
%>
Can someone advise how can I send an html message that include gif file using cdonts.
the gif cannot link to www, or any specific server location. user must be able to view when they open their email.no as attachment.
I have asp page file0.asp which calls another asp page thru include. I have to set conditions tht....
originally the include should have file1.asp In the displayed file file1.asp user selects a hyperlink, it should take it as request and display the new file2.asp in same file0.asp in place of file1.asp.
so i want to display multiple pages on user request inside file0.asp. But originally when file0.asp loads it should have file1.asp. Code:
how to include an asp file into an other asp file with checking condition first.I can do this easily in PHP, but in ASP, it seem that the content of included file is process before it read the code on page.So when I include a asp page into another asp page, I cannot choose which page will be include base on the condition.
View Replies View Relatedmake a script for my forums (the header) involving the date and an included page. Quote:
If the month is 9 (September) then include page x
elseif the month is 10 (October) then include page y
else include page z
How do I go about doing that? I know how to do it in php, but I'm looking to do it with asp.
I m trying to test an include example using the code below, but the page "aspsrc.asp" cannot be displayed.
--->aspsrc.inc page
<%
var msg = "testing testing"
%>
-->inc.asp page
<!-- include statement not to be placed within ASP delimiters -->
<!-- #include file=".aspsrc.inc" -->
<%
Response.Write( msg );
%>
When I first started using Server Side Includes I used the regular file include:
Code:
<!--#include file = "myfile.asp"-->
Then I read where the virtual include is much beter. I figured I would try it out, so on my last project I used all virtual includes:
Code:
<!--#include virtual = "/somedirectory/somefile.asp"-->
It worked fine and I really couldn't tell any differnce. Maybe a little easier to remember where all the file needed to point to. But this was for a New Site so testing it on the server was easy. I didn't have to worry about existing content up there.
I'm now redesigning a site to add in some dynamic stuff and I always test everything on the server it will reside on to be sure everything will work. Typically I create a "v2" directory and run everything from there. Well this really screws me up when using a virtual include, becuase I would have to edit and then rededit all my file paths.
So my question is... What do you use? And why are file includes so bad?
i'm calling an include file from within a <td> tag of an existing include file (i'm calling the adroator component from the head.asp file.
i'm getting the following error
Error Type:
MSWC.Adrotator (0x80004005)
ERROR Cannot load rotation schedule file
/root/includes/adrotator/adrotatorhomepage.asp, line 14
the include file head.asp is located in the includes directory while the ssi its calling is on the adrotator directory. here is the code for the adrotatorhomepage.asp (all relevant files are in the same directory) Code:
I'm wondering if there's any way to include a XML file (with a XSL) in a ASP file? I've tried this <!--#include file="publications.xml"--> but the XML-code is included before it is formated according to the XSL and ends up being unformated.
View Replies View RelatedI'm trying to include a plain html file in my asp page, but don't know how to include since SSI is deactivated(?)
View Replies View Relatedhow would i get something like this to work...
<!-- #include file="<%=Request.GetString("view")%>.txt" -->
i know wat i want and all but i can't figure out how to make it work.
I want to include files, a header and a footer to my asp page. The files i want to include its on another server, i can reach it with a www-url. Can i use the www-url to include the file to asp page?
View Replies View RelatedIm working on a new site and im not using frames, im using #include files. The isse is you cant put a variable into an include file because includes are loaded befor variables and this means that the include dont work...
what ive done is make an include page with a quirystring passing which page i want to load in, then on the included page it looks at the case and when it = 2 for example. it loads whats in case 2 which in this case is <!--#include file="../XtraNET/Forum.asp"-->
trubble is theres 52 menu items, if the site would always have 52 menu items this would be solved, but you can add new ones.. thusly i need to be able to dynamic the code...
My train of thought is can i store the whole <!--#include file="../XtraNET/LiveChat.asp"--> statement in the database and call it within the code dynamicly, like a document.write or somthing.
I just started ASP/ASP.NET two days ago. I would like to know the best way to go about using this include file method to contain my connection string stuff. As I understand it, a connection should only last as long as the query action (unlike VB6 with a persistent connection.)
So, what would be the best stuff to put into an include file for my connection stuff so I only have to make one change throughout the ASP/ASP.NET app?
Any other experiences with good things to put in that include file?
Can I also create the connection object in the include file and use it in multiple pages?
I need to include an asp file from another server.Code:
<!--#include file="SicurezzaDip.asp"-->
I think that is the normal way to do it. I've also used the code shown below, but it doesn't seem to work..Is it possible to Include asp files from another server ? How can i do it
Code:
<!--#include file="http://81.74.60.30/Asp/SicurezzaDip.asp"-->
I have been avoiding this issue but it keeps popping up and I cannot figure out a solution. Include statements pathed two or more folders deep they break.
This works:
<!--#include file="../includes/mo_security.asp" -->
This does not work:
<!--#include file="../../includes/mo_security.asp" -->
So basically my site files are limited to one folder deep.
Ex: ROOT/parentFolder/files.htm
One I move another level down the includes do not work anymore:
Ex: ROOT/parentFolder/childFolder/files.htm
I am on a Windows IIS server. Is there any solution to this or is it just a limitation of the include statement?
I've got and old ASP script that works Ok, but I want now to include it within a new ASPX script I've just created with '.net'.
The process could be: Code:
<%@ Page Language="VB" %>
<%
... aspx code ...
include my old ASP script
%>
I'm newbie in ASP, and would be extremely obliged if anybody could tell me how I must write it. I've tried with:
<!-- #Include File="old-script.asp" -->
but it doesn't work.