473,403 Members | 2,222 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,403 software developers and data experts.

Linking to a created file

Hi,
I'm using PerlScript in my ASP page and I have the following problem:
Each time the page is refreshed a CSV file is created. I want this file
to be available for download. The problem is I can't create the file in
the "wwwroot\site" dir, so I can't link to it. I can however create
anywhere else on the server.

Thanks in advanced.

May 17 '06 #1
7 1097
Give this a try;

<%
'// incFunctions.asp

'// Ensure used vars are declared
Option Explicit

'// Const for the FileSystemObject
Const c_Read = 1 '// Read a file

'// Function: ReadFile
'// Purpose: Read the content of a file
'//
'// Usage:
'//
'// Dim strData: strData = ReadFile("..\private\myfile.txt")
Function ReadFile(sFile)
Dim objFSO, objFile '// Declare used vars
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(Server.MapPath(sFile), c_Read)
ReadFile = objFile.ReadAll()
Set objFSO = Nothing '// ALWAYS cleanup
End Function
%>

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

<yt*******@gmail.com> wrote in message
news:11*********************@g10g2000cwb.googlegro ups.com...
Hi,
I'm using PerlScript in my ASP page and I have the following problem:
Each time the page is refreshed a CSV file is created. I want this file
to be available for download. The problem is I can't create the file in
the "wwwroot\site" dir, so I can't link to it. I can however create
anywhere else on the server.

Thanks in advanced.

May 17 '06 #2
Well, I'm using PerlScript, and also I don't have access to the project
till Tuesday.
But I have 2 more questions:
Could it be because I don't have premssion to write to the wwwroot\site
folder?
What permssions does the user which compiles the page have?

Thanks

May 17 '06 #3

yt*******@gmail.com wrote:
Well, I'm using PerlScript, and also I don't have access to the project
till Tuesday.
But I have 2 more questions:
Could it be because I don't have premssion to write to the wwwroot\site
folder?
What permssions does the user which compiles the page have?

Thanks


If you have tried writing to the wwwroot\site directory and received an
error message about permissions, then you need to ensure that the
IUSR_machinename account has write permissions for that folder.

--
Mike Brind

May 18 '06 #4
I received no error, the file simply wasn't written there.

May 18 '06 #5
wrote on 18 mei 2006 in microsoft.public.inetserver.asp.general:
I received no error, the file simply wasn't written there.


Might we know what you are talking about?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 18 '06 #6
The reason I can't link to the file I just created is that I can't
create it in the wwwroot\site directory. I open the file for writing,
and then write text into it. When I open the site it loads correctly
but the file isn't created. Therefore, I receive no error.

May 18 '06 #7
wrote on 18 mei 2006 in microsoft.public.inetserver.asp.general:
The reason I can't link to the file I just created is that I can't
create it in the wwwroot\site directory. I open the file for writing,
and then write text into it. When I open the site it loads correctly
but the file isn't created. Therefore, I receive no error.


I still do not know what you are talking about.

Please quote what you are replying to. If you want to post a followup via
groups.google.com, don't use the "Reply" link at the bottom of the article.
Click on "show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
<http://www.safalra.com/special/googlegroupsreply/>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 18 '06 #8

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

Similar topics

1
by: Jeff Hagelberg | last post by:
I'm trying to create a python module which can be used by a python interpreter embedded inside a fortran program I have. To do this, I first created python wrappers for all the functions in my...
20
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external...
5
by: Brian | last post by:
I need to import data from 720 csv files into an Access database so I can do some editing prior to loading into a SQL Server. These files came from data output from a mainframe on a monthly basis....
1
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the...
4
by: Gary Hughes | last post by:
Hi all, sometime I posted a problem in here where I was getting the following error from the linker in VS C++ 2003. Linking... GCClass.obj : error LNK2022: metadata operation failed (80131188)...
2
by: | last post by:
Help! I'm new to c++, and am breaking my teeth on MS Visual C++ (bundled within Visual Studio .NET 2003). Am trying to link simple c++ code to fortran dlls created in Compaq Visual Fortran (v6.1)....
6
by: Uli | last post by:
Hello, I'm trying to use a DLL (by static linking) which was compiled with Borland C++Builder (BCB) in Visual C++ (Visual-Studio 2003). All functions are declared with the directive 'extern...
10
by: Julian | last post by:
I get the following error when i try to link a fortran library to a c++ code in .NET 2005. LINK : fatal error LNK1104: cannot open file 'libc.lib' the code was working fine when built using...
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
7
by: Salad | last post by:
I am converting an application from A97 to A2003. I have 2 tables created by another application as a Foxpro.dbf. The table has no index. The connect string in A97 is FoxPro...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.