473,394 Members | 1,640 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,394 software developers and data experts.

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 1419
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
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,...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.