473,941 Members | 4,894 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unable to wirte a txt file using ASP FileSystemObjec t

2 New Member
when i try to run the my asp file
it takes too long and there is error message or
any other message comes
i have to terminate my application manually after few minutes
my file content is as follow

dim fso, fw
set fso=Server.Crea teObject("Scrip ting.FileSystem Object")
set fw= fso.CreateTextF ile("d:\Rahim\t est.txt",2,true )
fw.WriteLine("H ello World!")
fw.Close
set fw=nothing
set fso=nothing

pls kindly provide me help
Jun 23 '07 #1
1 978
shweta123
692 Recognized Expert Contributor
Hi,

Please check wheather the file path exists on your machine.Also check if you have necessary permissions on Web Application folder for reading and writing to file.


when i try to run the my asp file
it takes too long and there is error message or
any other message comes
i have to terminate my application manually after few minutes
my file content is as follow

dim fso, fw
set fso=Server.Crea teObject("Scrip ting.FileSystem Object")
set fw= fso.CreateTextF ile("d:\Rahim\t est.txt",2,true )
fw.WriteLine("H ello World!")
fw.Close
set fw=nothing
set fso=nothing

pls kindly provide me help
Jun 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
23776
by: Sergio Otoya | last post by:
Hi all, Is there any way of copying a file using javascript, not using the Filesystemobject (ActiveX). I need this to run in Windows and MACS. Any help would be greatly appreciated. Thanks in advance. Sergio Otoya.
14
5447
by: StumpY | last post by:
HI, I have set up a page with a form which appends data to a .csv file on my asp server, this is to enable a limited number of users to add news threads to this file, which contains the data in the following format (date,headline,article); "181003","news title","news article" "171003","older news title","news article" The form adds the data in reverse chronological order with newest at the top of the list. Now I wish to be able to write...
4
1610
by: mbosco51 | last post by:
Hi. I am tring to setup an asp script that will do the following... If file date/time is within last 10 minutes then response.redirect to file else do something else end if The text file is not located on the webserver. I created a virtual directory on the webserver which allows me to response.redirect to the
3
5059
by: Kay | last post by:
IIS cannot read files in a directory reporting that : Microsoft VBScript runtime (0x800A01B6) Object doesn't support this property or method: 'Fso.GetFolder' This has to do with Scripting.FileSystemObject. I make sure the scrrun.dll is properly registered with regsvr32. Still the problem persists. Previously I do not know what I did right once in permission setting and
4
5299
by: Rob Leyshon | last post by:
For whatever reason I am unable to use FileSystemObject e.g. using the code: Dim fso As New FileSystemObject Everytime my program hits this it gives the error: "Compile error: User-defined type not defined" Am I missing something?
0
2354
by: Seok Bee | last post by:
Dear Experts, In my web application, I'm having a button to view an attachment. After I retrieve the record from database (Ms. Access), I have a button to view the attachment (if there is any). The button work fine when I run it at my local machine. However, when I moved all the programs over to the server, I am unable to view the attachment, although I have the file physically at the server. The error message that I got is: ...
6
3546
by: Seok Bee | last post by:
Dear Experts, In my web application, I'm having a button to view an attachment. After I retrieve the record from database (Ms. Access), I have a button to view the attachment (if there is any). The button work fine when I run it at my local machine. However, when I moved all the programs over to the server, I am unable to view the attachment, although I have the file physically at the server. The error message that I got is: ...
1
1830
by: jpdesaiin | last post by:
I have writtent eh following code to read text from a file. And for whatever reason I am not able to read the text. Can anybody please let me know where is the defect. var ForReading = 1, ForWriting = 2, ForAppending = 8; var fso = new ActiveXObject('Scripting.FileSystemObject'); fso.CreateTextFile( "test1.txt" ); var f = fso.GetFile("test1.txt"); var ts =...
1
1011
by: rahim | last post by:
Unable to wirte a txt file using ASP FileSystemObject
4
15638
by: Chris | last post by:
I am using the FileSystemOBject for writing text with Unicode as in the example below. When I try to read data from the file with ReadLine, I get "?????????" instead of characters with unicode. What could be the problem ? Thanks a lot in advance! ------------------------------------------------------------------------------------------------
0
10134
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9964
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11530
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
11117
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8218
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6299
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4908
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3507
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.