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:
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)
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 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:
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:
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:
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.
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 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:
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:
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.
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.
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?
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 ?
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...
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.
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.
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?
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.
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.
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.
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:
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:
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.
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?