473,508 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

global.asa and Microsoft.FileSystemObject

Currently I am trying to convert a rather large ASP web app (1700+ files) to
..NET, but I'm having trouble using the FSO in my global.asa file. The
following code sends IIS into never-never land when it gets to Set oTF = ...
:

Function ReadFile(sFileSpec)

Dim oFS ' Scripting FileSystemObject
Dim oTF ' Textfile Object

Set oFS = Server.CreateObject("Scripting.FileSystemObject")
If oFS.FileExists(sFileSpec) Then
Set oTF = oFS.OpenTextFile(sFileSpec, 1, True)
ReadFile = oTF.ReadAll()
oTF.Close()
Set oTF = Nothing
Else
Application("Global_Abort") = Application("Global_Abort") _
& sFileSpec & " does not exist"
ReadFile = ""
End If

Set oFS = Nothing

End Function

I have to usually run iisreset to get it straight again. My current
environment is Win XP Pro SP2 and VS 2005 Beta 1. Due to current operational
needs I have to keep my ASP & ASP.NET running together during the transition.
Any help would be greatly appreciated.

--
Wm. F. Wheeler
CDO Tech Inc
Jul 21 '05 #1
1 1424
I just ran into the same problem. My application is in ASP. In
debugging, I saw the CreateObject("Scripting.FileSystemObject") returns
successfully but the call the fso.OpenTextFile never returns.
I am running WinXP Pro SP2 and have VS 2003 installed

Regards,
Kashif

Jul 21 '05 #2

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

Similar topics

0
2363
by: Ol Timer | last post by:
Hi Folks, I need some help and a lot more knowlege. One will come eventually and maybe you can provide the other. Fairly well versed in ASP-VBScript, but new to using the Global.asa. Can I...
6
1881
by: Olivier SOW | last post by:
Hi, I have this code in the global.asa file: Sub Session_OnEnd() Set oFso= CreateObject("Scripting.FileSystemObject") Set oFileTxt= oFso.OpenTextFile("c:\debugS.txt", 8, true)...
3
7167
by: Faisal | last post by:
Hi. I'm in the process of moving an application from ASP to ASP.NET, & I'm writing in VB, using VS.NET. I'm new to the .NET framework & have a basic question regarding static objects defined in...
1
217
by: tiredoldcoder | last post by:
Currently I am trying to convert a rather large ASP web app (1700+ files) to ..NET, but I'm having trouble using the FSO in my global.asa file. The following code sends IIS into never-never land...
0
7114
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
7321
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,...
0
7377
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...
1
7034
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
5623
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,...
1
5045
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...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
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...

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.