473,545 Members | 289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

My ASP program with fso.opentextfil e is working on Win2K but not working on Win2K3

2 New Member
Hi all,

My following program code works fine on win 2K server but the same is not working on win2K3 server. It's showing error as page cannot be displayed. After debugging, I found that fso.opentextfil e is not working over win2k3. Can anybody pl. explain why it's not working and how to solve it?
help reqd urgently pl.

thx in advance.

Expand|Select|Wrap|Line Numbers
  1. SearchDatabase
  2. <SCRIPT LANGUAGE=JScript>
  3.  
  4. var wsh = new ActiveXObject("WScript.Shell")
  5. wsh.Run("cmd /C dir *.txt > c:\\temp.txt", 0)
  6.  
  7. </Script>
  8.  
  9. <%@ LANGUAGE="VBSCRIPT"%>
  10. <%    
  11.      strM = Getmyfile()
  12.     function Getmyfile()
  13.         Dim intRet,reqdString
  14.          Set fso = createobject("scripting.filesystemobject")
  15.          Set ts = fso.opentextfile("C:\temp.txt")
  16.          reqdString = null
  17.          Do While Not ts.AtEndOfStream
  18.          data = ucase(trim(ts.readline))
  19.          if instr(data,"database") Then
  20.          reqdString = trim(split(data,":")(1))
  21.          Exit Do
  22.          End if
  23.          loop
  24.          ts.close
  25.          Set ts = nothing
  26.          Set fso = nothing
  27.          Getmyfile = reqdString
  28.     End function
  29.     %>
  30.     <HTML>
  31.     <HEAD>
  32.     <TITLE></TITLE>
  33.     </HEAD>
  34.     <BODY>
  35.     <%Response.Write("Your databse is : " & reqdString)%>
  36.     </BODY>
  37.     </HTML>
  38. <HTML>
  39. <HEAD>
  40. <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
  41. </HEAD>
  42. <BODY>
  43.  
  44. <P>&nbsp;</P>
  45.  
  46. </BODY>
  47. </HTML>
  48.  
  49.  
Sep 10 '07 #1
1 2530
jhardman
3,406 Recognized Expert Specialist
I've never heard of this problem before, I have used openTextFile in several different versions of IIS. Perhaps the problem is that permissions aren't set right on one of your servers. Make sure the appropriate server settings are set in IIS and in windows, both for the folder and the file in question.

Jared
Sep 11 '07 #2

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

Similar topics

3
5169
by: Kenneth McDonald | last post by:
After looking around at various editors, I've finally decided on (I think :-) ) Vim for my future work. (jed is a great editor, but doesn't do neat things like allow me to write python code to add to the editor functionality. Emacs is just too bloated these days. jEdit is one of the best GUI editors I've seen, but I've still not seen a GUI...
0
360
by: Mike Cooper | last post by:
Hi all, I am attempting to deploy a vb.net application. That is working fine. I also configured the installer so shortcuts for the application would appear on the desktop and the user program menu. That's working too. What isn't working is the icon that I am setting for these shortcuts. The icon is a .ico file that works fine for the...
1
926
by: rdufour | last post by:
In a LAN, I want to have a small program on computer A, that must look to see if program myprogram.exe is working on computer B Basically start the program, piush a button which does the lookup and returns answer working or not working. Does anyone have any idea where I can find snippets of code on how this could be done? Thanks for any...
0
1072
by: Mark Brown | last post by:
I have encountered a problem that's driving me crazy. A program I've been working uses a datagrid to view data from a SQL database. The paging worked fine at first. Clicking on the select button brought up more information about the selected record. Everything worked great. Then I added a search function. Again, everything worked as...
0
1071
seraieis
by: seraieis | last post by:
I have a program that I'm working on that contains a COM reference to Excel. Is there a way to change how the program links to the DLL? My problem is that once I move the program out of the bin\debug folder, it stops working. The form will load, but none of the Excel functions work. I tried to copy the DLL along with the program, but that...
7
2787
by: quincy451 | last post by:
drop table . CREATE TABLE . ( NULL , (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , NULL , NULL , (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , (16) COLLATE
4
2413
by: Sam | last post by:
I have a program which works great when run from the command line. But when I run it combined with something else such as: - piping it through less - cron - execl (i.e. calling it from another python program) it gives me a unicode error File "../myparser.py", line 261, in set_attributes
2
3061
by: mcfly1204 | last post by:
Our network consists of two Win2k Server DC's, with several other Win2k3 servers. I cannot find where I can configure terminal services access within the GPO for the user in question. In Win2k3 server, it is \Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment. Is there an equivalent in Win2k GPO?
6
4510
by: ahmee | last post by:
i am autoruning one of my java program but its not working.i first converted the program in the jar file and then write this code in notepad and copy this code in my usb which is below. open=jarf.jar action=Run jarf Program icon=jarf.jar label=My Portable PC and saved my jar program in the usb.please help me out
0
7398
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...
0
7656
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. ...
1
7416
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7752
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5969
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4944
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...
0
3441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
701
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...

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.