Accessing Files Not Below The Web Root
Using 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
ADVERTISEMENT
Development environment: Windows 2003 Server running IIS6 and the same
server running as a domain controller, DNS and DHCP servers.
Production environment: Windows 2000 Server SP4 running IIS5 and not used
to provide domain control or name services.
The two environments are on different networks with no trust relationship
between them. In both environments the web server is set up to disallow
anonymous access and to use integrated Windows authentication. The
application is vanilla ASP (i.e. not .NET) VBScript.
In the development environment, the following code runs flawlessly no
matter whether "myUNCPath" points to a share on the web server or a share
on another server in the same domain.
Set objFilesys = Server.CreateObject("Scripting.FileSystemObject")
If Not objFileSys.FolderExists(myUNCPath) Then
Set objFolder = objFileSys.CreateFolder(myUNCPath)
End If
However, in the production environment it falls over with a permission
denied error when "myUNCPath" is on another server and further testing
shows that the FolderExists method is returning false even when
"myUNCPath" exists. The network share is configured to give full control
to the Everyone group.
I've found http://support.microsoft.com/kb/207671 which although
referring to IIS4 suggests that the issue could be the authentication
method (I'm assuming that integrated Windows authentication is close
enough to NT Challenge/Response and so might generate a token that cannot
access network resources). I'm not sure of this is the problem because if
it were then the code shouldn't work in my development environment.
Any ideas on what's going wrong and how to access the network resources
in the production environemt?
View Replies
View Related
how can i access XLS file instead of using a database? I have a single XLS file with several sheets-which in this case represent tables. How can access them, create recordset, display them etc.
View Replies
View Related
I have a php file that I use to do some calculations and print out a variable. I have a script that works great in php, but i want to provide this service to alot of people and not everyone uses PHP.
//PHP code
function MyFunction() {
$lnk = fopen("http://www.programmers-unlimited.com/MyRemoteFile.php","r");
$buffer = fgets($lnk, 4096);
fclose ($lnk);
return $buffer;
}
//END PHP code
This will get the data returned by my remote php page. How can I do this in ASP ?
View Replies
View Related
We have an ASP application which links to various word and excel documents stored in a folder called attachments. The documents are extermely confidential in nature and we would like restrict the access to them through the application only. How can we prevent users from guessing the name of the document and reach it.
View Replies
View Related
I have a virtual directory which I can access as Directory
Browing has been enabled. Now if in Internet Explorer I
open any Static content like HTMLs/SWF's they work fine.
But when I try to open an ASP page it gives me a 404 'File
not Found' Error. ASPX pages work fine though they are in
a different sub folder.
I have checked the security settings and they are not
hidden. Any ideas?
View Replies
View Related
I write search files webpage.when users enter part or all of a file name and asp page send back a list of only the files(that user can click to open files) whose names contain the text they entered.I want to save data about accessing files such as file name ,accessed date of fileto my database(Microsoft Access).I don't know how to write a adding code to do this. Code:
View Replies
View Related
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
View Replies
View Related
Is there a way to INCLUDE a file BELOW the web root directory?
View Replies
View Related
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?
View Replies
View Related
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.
View Replies
View Related
Is 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.
View Replies
View Related
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 Related
my 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 Related
I 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.
View Replies
View Related
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.
View Replies
View Related
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?
View Replies
View Related
Can I implement session without global.asa file in my root directory....and is there any good site for sessions tutorial.
View Replies
View Related
I 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"?
View Replies
View Related
I have a website that we display images we have saved into a SQL Server 2000 database as binary BLOB. This is on a Windows 2003 Server. Just recently (a week ago) this website began to save the images it is displaying on the website as ASP pages in the Temporary Internet Files > IE.Content > Folder.
We have other websites where we use the exact same code and these do not save files on the server when they are displayed.
Here is the code to display the image:
Set rs = objConn.Execute( SQL )
Response.ContentType = "application/octet-stream"
Response.BinaryWrite rs("Product_Image")
SQL is the SQL String to get the image from database
When I add this code:
Response.ContentType = "image/jpeg"
The images still display on the website, but now are saved in the Temporary Internet Files folder as JPG's.
View Replies
View Related
Is it possible to open an FTP connection in ASP? I would like to download a file (short one), and display the contents on the page. Previously I used PHP and it was quite simple there, but I didn't find any information on this for ASP. Any suggestions?
View Replies
View Related
how do i access the next record in a database using a next button in a form. Assuming that i have accessed the first record and displayed on a page, now a 'next' button should be able to retrieve the next record in the db.
View Replies
View Related
if it was possible using asp to access a textbox value from the parent page in a popup page.The popup page is asp therefore the statement which tries to access the value from the parent page must be asp code (so no javascript functions can be used to access it).
I have tried several attempts at gaining the value such as:
<%
theTxtValue = request("opener.document.system.txtbox1.value")
%>
But none of my combinations seem to work,can anybody clarify if what I am trying to achieve is actually possible?
View Replies
View Related
i m writing some ASP to access a SQL database and it doesn't seem to be connecting right, i was wondering if someone could see if I have gone wrong anywhere in the connection code below and explain what i put in the DSN?
Dim VARIABLE
Dim CN
Dim RecordSet
Set CN=Server.CreateObject("ADODB.Connection")
CN.Open "Provider=SQLOLEDB; DSN=whats this?; uid=; password=; Initial Catalog=Table"
Set RecordSet = CN.Execute("SELECT * FROM Table where something ='"&VARIABLE&"'")
%>
<%Connection.Close %>
View Replies
View Related
At our company we daily need to access data from a website and use this data on other reports which we run daily...
step 1: we go the wesite
step 2: we authorize ourselves by providing username and login
step3: after successful login..the webpage provides us with links
step 4: we select one the links and then this lists the links to the documents (PDF and EXCEL) formats from where we get the data...
Now... is there a way to write a ASP script...to connect to the website, provide user details and access the desired link and then the desired document. And then we need to parse this document for the desired data.is it better to access the data from the PDF or from the EXCEL
View Replies
View Related
I know that when I send a request for an ASP script to the server, IIS gets the script, interprets the ASP and then basically spews out a load of HTML to my browser (over simplified I know). Hence the reason why when I look at the source code in IE all I see is HTML and no ASP.My question is this: Is it possible to get this source code as a string somehow to then further manipulate with ASP in a second page?
Surely there must be a way?
View Replies
View Related
As luck would have it I've landed a client whose site relies on ASP and what I can only assume is an MS Access database. ASP is definitely not the language of my choice but I'm stuck with having to learn the basics for what I'm required to do.
Basically the database is located in the folder /fpdb/ and is called vsproducts.mdb. It was actually installed by the off-the-shelf shopping cart/catalogue script that is being used by the site's owner. I need to be able to access and display on a page some data found in this database. Is this easy? I have next to no knowledge of ASP so please keep things as simple as possible
View Replies
View Related
Is it possible to access the relationship information from an ASP program? I'd like to be able to traverse the relationship tree of a .mdb file on my server from ASP/javascript code.
View Replies
View Related
Could someone have got samples on how to use ATL web services from an ASP page?.
View Replies
View Related
I am part of a group that has developed an ASP.Net web application.
I'm presently trying to test some code I wrote that checks for IE
browser at session start (and issue warning if not IE), but I can't
seem to "get out the starting blocks" with any non-IE browser: I've
tried Netscape 4.8, Netscape 7.0, and Opera 7.5. I've gotten a few
different errors, but most often I get the following when attemting to
access the startup page:
HTTP 401.2 - Unauthorized: Logon failed due to server configuration
Internet Information Services
Anybody know how to get another browser to work? Only my old Netscape
4.8 pops up a login dialogue, but I can't get that to log in
correctly.
View Replies
View Related
I'm having some problems getting variables to spit out the info I need.
Do While LoopCounter +1 < Session("TeamPop")
LoopCounter=LoopCounter+1
%>
<td><input type="text" name="Reliable<%=TeamMember&LoopCounter%>" maxlenth="40" size="8"> </td>
<%
Loop
Now if this executes three times it should generate three input boxes with names Reliable###### where each box is named Reliable with a five digit number after it which is stored in TeamMember1, TeamMember2, and TeamMember3. Unfortunately I just keep getting Reliable1, Reliable2, and Reliable3. Code:
View Replies
View Related
I am trying to access ldap with standard ASP. The code works on the web server where I am developing but any other PC on network gets the following error:
Providererror '80040e37'
Table does not exist. /training/index.asp, line 41
Does anyone have any experience with this??
View Replies
View Related
Can ASP Apps read from a mySQL database?
View Replies
View Related