473,657 Members | 2,554 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 2539
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
5173
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 editor with the power of those with a non-GUI ancestry. etc. etc.) However, I can't quite figure...
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 program itself, and for any shortcuts that I manually create. After I created the shortcuts of 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 help, Bob
0
1077
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 expected. Then for some strange reason, the paging and displaying additional information stopped...
0
1074
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 doesn't help either. Any suggestions?
7
2791
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
2422
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
3064
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
4515
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
8305
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
8823
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
8730
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
8503
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4151
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.