Folder Problem When Created Through Scripting.FileSystemObject
When i create a folder through file system object and then check the properties of that folder, read only attribute is checked. At this time after creating the folder i need to put files in the folder and i get error due to this reason. Is it possible to make sure that read only attribute is not checked.
Also at the company we use active file component to Upload the files. Active file provides the functionality of file system object too. I have created the folder through this and the result is the same.
I've some problems with "Scripting.FileSystemObject" object. If I try to create a new text file with the function myfile.CreateTextFile I have two differents result:
If I execute the script client-side there are no problems, but if I execute the script server-side the process stops when I call this function (I think that the process is in loop because I must close iexplore to stop the application).
I would use the Scripting.FileSystemObject to find a file in a server, which I connect with a VPN connection. I'm not sure that the Scripting.FileSystemObject works with a folder, which is in another server, using an ASP page which is on my server.
In other cases the server gives me an ASP error report (line xx in file yy and so on). Here it only says HTTP 500 (not 404). Even if I call the ASP directly. Code:
I am having ASP with the following code to access the file with windows scripting host. The page run on local server IIS 5.1 on Win XP Pro SP2. The IE never show me any error with this, but will keep access the page for very long. This code is running fine on other system. Code:
In my application I need to read the lines from the text file. I use the following script to do that.It doesn't seem to work because of the Norton Anti virus script blocking. I cannot do anything to Norton so I want to find the alternative way to read the lines from the text file. Quote:
Dim objFSO, objTextFile Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile(Server.MapPath("ProgrammeDetails"),1,false) Do While Not objTextFile.AtEndOfStream Response.Write objTextFile.ReadLine & "<BR>" & vbCrLf Loop objTextFile.Close Set objTextFile = Nothing Set objFSO = Nothing
i have a problem on an asp page , running since 1 year ago, whe try to create a file systemobject using set oFSO = CreateObject("Scripting.FileSystemObject") the error returned is :
I'm at a complete loss on what is causing this error. ActiveX Can't create object:"Scripting.FileSystemObject when executing the code below. Every example I've looked at is pretty much identical except for the file names.
What I am ultimately trying to accomplish is when clicking on a link check to see if a file with today's date exists if so link to it. If not, link to a file with yesterday's date.
I'm on an Intranet, and our Intranet server is on the same domain as the users. I have one place where I wanted to create a clickable link which would take the user to the directory for that Ticket. So if you're on the page for Ticket 1000, the word "Files" is surrounded by this: <a href=servername ickets<%=strTicketid%> target="_blank">Files</a>
This works fine if the directory exists. (Not every ticket has a corresponding folder). But if it doesn't exist, users who click the link will get an empty window. Code:
I create an user session with ASP in a Virtual Folder. When the ASP try to delete a subfolder in the same virtual folder app, FSO delete the folder but they clean the session and clean all session variables.
I've downloaded this code from Web. While executing this, the following error msg appears, The page cannot be displayed. The necessary dll scrrun.dll is present in System32 folder. Code:
Is it possbile to check a file exist without using Server.CreateObject("Scripting.FileSystemObject") in asp page??
The reason is our hosting company turn that function off for security reason.
Here is my original code: <% Dim objFSO Set objFSO = Server.CreateObject("Scripting.FileSystemObject") If objFSO.FileExists ("yourfile.txt") Then Response.Write "File exists" Else Response.Write "File does not exist" End If %>
I am just beginning with asp and have gotten an error that I need some help with. I posted a pair of files to an online ASP host server. The files are in the same directory; one is readfile.asp which should open the other which is a simple text file - newText.txt . Code:
Using the below tage, i successfully add a new Record to my Videos table but the varibale i declare with the newly created rs ID is always blank? Code:
I am facing a strange problem in my application. Its a ASP application. I have a drop down one page. When I select a value from the drop down, its an ASP call, after processing ,new session starts. This doesent happen for the first 3 or 4 times when i select the value from the drop down.
Also I noticed that when the new session is created , the old session is still alive. Can You suggest me as to Y the Web Server tries to create the new session, when the existing session is still alive.
After restart some time is everithing ok. After some hours - some days, problem start. Only in pool, where dll VB6 is used, aspx pages (asp ok) does not work.
Event: Failed to execute request because the App-Domain could not be created. Error: 0x8007000e Not enough storage is available to complete this operation.
Source: ASP.NET 2.0.50727.0 Event ID: 1088
OS: Windows 2003 Server SP1
HW: dual Xeon, 4GB RAM, Server is not Domain server. dll VB6 is used in pool where aspx pages does not work, in other pools aspx pages work.
The session_onstart event will fire for every pull BECAUSE no SESSIONID cookie is ever created and the server has to assume that every HTTP REQUEST frame is a new session. The response object is actually just setting a header, of course.
Every redirect is sending a header to the browser equivalent to a "meta refresh" and that once again triggers the session_onstart.
I am reading and setting a cookie using JavaScript in the BODY onload and onunload events respectively. This works fine.
However when I use ASP to set the cookie under some condition where I want to override the last value set in the onunload event, it has no effect. The next onload still has the old value.
The following code simulates the problem I experience....
I am trying to do a simple INSERT into SQL. I've done it tons of times before with the same code, but this time is is placing duplicate entries in the table. Any ideas why this would be happening? Here is my ASP code doing the form processing:
<% set conn=server.createobject("adodb.connection") conn.Open "Driver={SQL Server}; Server=SERVERNAME; Database=DATABASENAME; UID=USER; PWD=PASSWORD" set rs = Server.CreateObject("ADODB.RecordSet")
I'm having a problem dynamically creating an UPDATE query that will write the string value of an existing record set field into a data base.To be more concrete, I can generate a string that looks like this:
UPDATE Person SET Person.name='objRS("oldname")'
but when I try to execute it, the literal objRS("oldname")gets written into the oldname field of the Person table, as opposed to the value 'Betty'. (In a separate write statement, I've already checked that objRS("oldname") prints 'Betty'.)
And if I change it to:
UPDATE Person SET Person.name=objRS("oldname") I get an error saying there is an undefined function 'objRS' in expression. Can anyone help me? If I can get this to work I'll be done with this task.
I run a website that reads our own databases and makes the data available to our users. However, recently someone has sent me a link to a php page that contains data they want me to display on our site. The php creates a csv formatted text string.
Example : I type in www.somewebsite.php and the page returns game1,gamedate,gametime,hometeam,visitor,,,, with real values of course being in these values. the ,,, are null fields that have no value as they expect our website to fill in this data for them from our users. how do I read this data with asp into a recordset, or a database?
I have an asp.net application that generates dynamic images (charts). When I run the application in debug mode from visual studio, or refer to the url with localhost in the name, everything works fine. When I try to access the site with the full machine name (not using localhost), or from another machine, the dynamic images only appear as red x's.
I've searched the groups, but can't find anything that seams to relate. I am assuming this is some sort of security setting, which I have messed around with in IIS as well.
I'm using PerlScript in my ASP page and I have the following problem: Each time the page is refreshed a CSV file is created. I want this file to be available for download. The problem is I can't create the file in the "wwwrootsite" dir, so I can't link to it. I can however create anywhere else on the server.
Is it possible to assign permissions on the fly as you are creating a directory structure on the web server?
I want to create a new folder for each new user of this system I built. Each folder will have the same permissions and will be used for uploading images. Should I just have write permissions on the parent folder and have the folder permissions inherited from the parent? Or is there a better way to do it?
I'm struggling with this problem: in a website I developed, XML files are created by users of the site to describe. The creation is OK, the (new) file is present, but it can not be read by any website visitor.
How can the default permission become at least readable?
It's a ASP script running on W2K, using the FileSystemObject component.
I have some cookies created with javascript, I need to be able to delete them (by expiring them) or set their contents to nothing ("") using ASP. However, when I try to do this, it doesn't work. If I try to set their values to nothing by doing:
for each x in Request.Cookies response.cookies(x)="" next It just creates a duplicate of each of the cookies with no content.
If I try to expire the cookies by doing the following:
for each x in Request.Cookies response.cookies(x).Expires=date-1 next It does nothing. They don't expire.
How can I get ASP to recognise and modify the actual cookies which are there?