ASP OpenTextFile Location

This is a dumb question but i am just starting out with ASP. I am working in vbscript and i am trying to do a OpenTextFile the problem is that i am editing my page on a different computer from where the server is. I know that if i were trying to open the file from the server i would type:

filesys.OpenTextFile("c:inetpubwwwrootfolder namefile name")

but i am writing this file to a server and i don't how enter the location, it is not on my c drive.

View Replies


ADVERTISEMENT

OpenTextFile And Unicode

I'm trying to write a .txt file with OpenTextFile method. This is working
alright, but since I'm using some danish characters and use Flash to read
the txt file I need to save the file as UTF-8 or Unicode.

Beneath is my code - how do I save the file as UTF-8 or Unicode?
----
Dim fso, f, filespec
Set fso = CreateObject("Scripting.FileSystemObject")
filespec = Server.Mappath("news.txt")
Set f = fso.OpenTextFile(filespec,2, True)

f.Write txtstring
f.Close
----

View Replies View Related

OpenTextFile Method Not Working

I am trying to open a text file to read the contents using the following code:

Dim objFSO, objFile
Const ForReading = 1, ForWriting = 2, ForAppending = 8

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("c:inetpubwwwrootDemoAppscontenido.txt",ForReading)

The problem is that the execution stalls at the OpenTextFile method and stays there until the script timeout error. The FileSystemObject is correctly created because I have been able to create a drive object and display the volume name, but actually trying to read or create (with the CreateTextFile method) a file is not working

I am using IIS 5.0 running on Win 2k Pro

View Replies View Related

OpenTextFile Permission Denied

I can't seem to figure out what is causing this problem. I have the following code:

set fs1 = CreateObject("Scripting.FileSystemObject")
set tfile=fs1.CreateTextFile("c:Inetpubdomain.comclientsarchives" & MyFile & ".txt")

set fs = CreateObject("Scripting.FileSystemObject")
set file = fs.OpenTextFile("c:Inetpubdomain.comclientsarchives"& MyFile & ".txt", 2, true)

The file gets created without any problem but I get the following error at the line that tries to open the file:

Microsoft VBScript runtime error '800a0046'
Permission denied
/clients/savearchives.asp, line 161

The permissions seem fine - the IUSR has Read, Write and Modify permissions to the folder.

View Replies View Related

Permission Denied Opentextfile

I sometimes get a Permission denied error when running the following piece of code, its not related to user permissions but (i think) the high load on the script and it being executed too many times at once and blocking each other. Code:

View Replies View Related

How To Parse OpenTextFile As Server-Side?

I've got a slight problem with parsing a file that I open and have it read the server-side scripts. Instead it looks like it's processing it all as a string. I've tried both OpenTextFile and OpenAsTextStream - they both yield the same results. Code:

View Replies View Related

Writing A Text File(OpenTextFile)

I'm having a hard time to open/write to a txt file from a .asp, the code is right, but, looks that the iis 5.0 is messing with the file system.

once the execution gets to the point of :
Set filetxt = filesys.OpenTextFile(sFilePathAndName, ForReading, False)

the browser just hangs forever, If I do the request to the same .asp several times then the IIS hangs, and can not even stop the service(a bug in IIS). Code:

View Replies View Related

Permission Denied Error For OpenTextFile

I am getting "Microsoft VBScript runtime (0x800A0046) Permission denied" error at

set file = fs.OpenTextFile(fileName, openMethod, true)

I have given permission IUSR_<computername> user to read/modify the directory by adding it to the security tab. I have even given permission to Everyone but still I am getting the same error.

View Replies View Related

Problem Writing A Text File (OpenTextFile)

I'm having a hard time to open/write to a txt file from a .asp, the code is right, but, looks that the iis 5.0 is messing with the file system.

once the execution gets to the point of:

Set filetxt = filesys.OpenTextFile(sFilePathAndName, ForReading, False)

the browser just hangs forever, If I do the request to the same .asp several times then the IIS hangs, and can not even stop the service(a bug in IIS).

I'm running w2k pro, w/IIS 5.0

Here is the code:

View Replies View Related

Location Thru IP

I want 2 know how can I pinpoint the location of a visitor to my site thru his IP addr or is there some way else 2 do that??

View Replies View Related

Cannot Use Web Services From Another Location

I have a client application that uses web services. When the client application an web services are in the same machine, they work fine. But when the application call the same web services hosted in other server, the server return: Code:

View Replies View Related

Redirect Location

I am using frames in html.
How can i redirect to an asp file in a new browser window.So that the redirected page opens in new window instead in a frame..
Code:

Response.Redirect "../pm/scriptlogon.asp"

View Replies View Related

Word's Location

If there a scriptfunction I can find a word placement in ASP? I mean, like I give a string, and it returns and word's placement

View Replies View Related

File Location

Is there a way to set the location where the input type="file" option gets its files from. I know you cannot set a default file, but is there a way to set where it starts looking.

View Replies View Related

Location Finder Over WAP

tell me anything they know about locating WAP users. I assume that there must be some information on their current cell sent in the WAP request headers, but i'm not sure. I want to make a WAP site that appears differently depending on the users cell location.

View Replies View Related

Global.asa,location

I have created a global.asa file, but somehow it doesn look like it is working...I have only one simple sub-routine in it.

Is the name case-sensitive? I have placed it under [ www/myfolder/global.asa ]

View Replies View Related

Cookie Location After Being Set?

I attempted to find the cookie 'Prospect' in my Temp Internet Files in IE6
after I had set it in ASP:

Response.Cookies("Prospect").Expires = Date() + 2
Response.Cookies("Prospect")("u_id") = u_id
Response.Cookies("Prospect")("u_name") = sName
Response.Cookies("Prospect")("VisitorIP") = VisitorIP

....However, it does not appear to be there? Am I looking
in the wrong physical location?

View Replies View Related

Using Access Database On Different Location For .NET 2.0

I am use to the include file on classic asp for maintaining MS Access
database location. On using Visual Web Developer Express, I can only use the
MS Access database if it is located on the same folder with the web app. Is
there a way that I can locate MS Access as my database but the location is
not located on the web application?

View Replies View Related

Geographical Location Of Incomming IP

We have special kind of service that covers just north on America (US and
Canada), so we want to redirect users comming from another country to
another page.

I am looking for a web service or similar thing that tells me the country
and state/province of incomming IP address. I am sure it is possible but i
don't know who sells that service.

Could anyone refer me to any resources related to that ?

View Replies View Related

Included File's Name And Location

Is it possible to get the filename, and more importantly the path, from inside an ASP file, when that file is included? I know it can be done for the base file using Server variables, but I can't figure out how to do that for an included file.

I need to write an application that uses include files, and that may be moved to another folder on the server...

View Replies View Related

Relative Db Location(from Global.asa)

I'm using a segement of code in my global.asa to open a db connection check a users ip address against those i have in a recordset and then take the appriopriate action, very handy for banning bad bots who ignore my robots.txt and users who abuse my system.

Anyways the connection im using is Code:

View Replies View Related

Resolve IP Address And Get Location

I have been unable to find any code that will allow me to resolve an IP address then determine which country the IP is registered to.

I've seen it done all over the net, even resolving it down to the town I am located in.

I am hosting on GoDaddy, so I can't install any componants (I did find a couple that could do it). So I'm looking for a code only solution if that is possible.

If anyone knows of any Perl or PhP code that can do it, please post a link and I'll port it to ASP if possible and post it.

View Replies View Related

Document.location.href

I want to redirect to other page using document.location.href on Button click and pass ID to that page e.g;

<input type="submit" value="Submit" ONCLICK="document.location.href='mergestatus.asp?projectid= <%=selRs("projectid")%>'">

Please help.I am not able to pass projectid to 'mergestatus.asp'

View Replies View Related

Window.location.replace

I have 3 includes in 1 asp doc-left,header,main. header contains my menu. I want to click the menu and change the main incude file, but I don't know how to. I though a window.location.replace line could work. what should i do?

View Replies View Related

Application At Multiple Location

i m developing General Ledger application in asp.my company is located head office at south and is branch office in west so i have to developed an application that data related to south they can post there data.so as well as west.now problem is that what techniquei should use.

In my opinion i can create administrator login form where person in south can log on with it and enter his data while same as person in west. or what should i use.

View Replies View Related

Cursor Location Issue

I have a recordset connection in asp that I am using to search records.If I use the client side cursorlocation (rs.cursorlocation=3) then it takes really long to return back the records due to which a timeout occurs.If I change the cursorlocation to adUseNone(1) or adUseServer(2) then the search is faster and without any problems. But the sort on records cannot be done if I use adUseClient(3).

I need to have sort on these records. I am using dynamic server side cursor.Also my result set is not huge ..just 80 records.One more thing that is wierd is that the result set comes back instantly for the first search,but takes forever when searched again for the same criteria. Eveytime I logout and login and do the search for the 1st time the search is quick and takes forever for consequnt searches.

View Replies View Related

How To Change The Default Location For IIS.

how to dirrect the IIS installation to an other drive or how to manually move all related files to an other drive? I think I can menage the sites, but NNTP and SMTP I can't see where.

View Replies View Related

Cookie Values Are Stored In Which Location?

I want to know the Cookie values are stored in which location?

how can i recall the Cookie value?

is it possible to store the cookie value to the Particular location?

if i stored the cookie value to the particular location, any possiblities to conflict the location of other cookie values...

View Replies View Related

Window.Opener.Location.Reload();

I want to refresh the parent window from child window.

window.opener.location.reload();

A message pops out and asks me to resubmit the data.
I don't want this message.

View Replies View Related

Getting 80070003: Error Connecting To Location

I have a website on an IIS 6.0 server and I am trying to update the settings
via asp page and vbscript. Below is the code that is supposed to retrieve
the Metapath, and it does, however it is erroring out with 80070003, Can not
find path when I am trying to get connected using the Set IIsWebVirtualDirObj
command. Code:

View Replies View Related

Reading Database From Correct Location?

I am trying to run one of my first ever asp scripts. It is a form I copied from the
w3schools website along with its ASp script, demo_add.asp, both which i have
modified very slightly(variable names for my own database etc).

However, "No update permissions" appears in my browser when i run the script -
this means that there is an error. The problem is i dont what the error is!

The only thing I can think of at the moment is maybe my database location. I
am using IIS are all my files are mapped to a virtual directory within IIS. Should
the path in my HTML file below be to the harddrive location or its location within
the virtual directory? Im assuming it is the hard drive location. Code:

View Replies View Related

Remove Title And Location From Print Out

if there is a way to remove from a page printed of the net the title, page x of x, and the location from the page. If it can be done in ASP that's awesome 'cause that's what I'm semi-used to, but any language would do fine.

View Replies View Related

Forcing Location For A Download File

if i have a link that allow user to download an application from an server, is like Code:

<a href="wss1/daemon tools.exe"></a>

after i clicked this link, i will be link to an pop up windows to specified the save path location.How do i set the save path location to a dedicated destination or file?is like when i click on the link then it will automatic without pop up and then save into that dedicated location?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved