Implementing A Global Log File For A Web Site

I am trying to implement a single global text file for my web site that will log the actions that my ASP scripts peform. The site I have set up involves about five web pages with scripting in VBscript. Several of these pages also use COM automation to peform certain tasks in Excel macros which also write to the text file.

Currently, I must declare an FSO object on each page. I also have to close the object before I call the COM components (because I write to the log file from the Excel macros, too) and then open it again when control returns to my ASP scripts.

The macros I have written inside Excel are quite intensive, so they chew up some time when they execute. In the end, each user will go through the five web pages to generate an Excel spreadsheet which they can download, and, during this process, will have logged about 15 messages to the text file. Code:

View Replies


ADVERTISEMENT

Implementing File Attachement

I have created a cfm for my website and what my problem is that when it comes to uploding an image in the site i have to manually do it through a ftp program and than write the link in the admin section of the site in the form where i submit than it displays the new image or images.

but i would like to do it so the administrator can click on browse than attach the image and than when submited the image gets uploaded in the choosen folder and the file path is writen in the database (access). is this possable? i have an insert form that has the form to submit and i have created the insert prossersor page that contains the SQL statement that prosessos the form.

View Replies View Related

Global.asa To Track Site Visitors

I found this code for a global.asa file and in the tutorial it says it can be used to display how many people are on a given website. I don't see how this done. Is there a session variable of some sort that I take from this code and output it onto a page?

<SCRIPT LANGUAGE="VBScript" RUNAT="Server"> ....

View Replies View Related

Global.asa File

I am in much need of some help with my global.asa file. I use ASP and mySQL. In a nutshell, When a registered user logs in, a field in I have a field that gets updated in my DB Table. It is a TINYINT. When they log in, it updates the value to 1, when they log out, it updates it to 0. I use a tiny iFrame to create a loop displaying users with the value of 1. Basically a cheasy "Who's Online" function.

How ever I am now trying to create a global.asa file to say when the session times out, I want the global file to just update the value back to 0. I am also attempting it so that if the users browser window closes and then gets reopened PRIOR to the timeout limit, It knows they are still logged in. I can provide my script if anyone thinks they can help. !!!!!!!!!!!!!!!!!!!

I think my final thought would be that when the user closes their browser, that the session ends and the DB field gets updated from a 1 to a 0.

View Replies View Related

Include File In Global.asa

I have written general purpose functions in one of the include file, I want
to use the same in the global.asa. Do you know how to use include file in
global.asa

View Replies View Related

Global.ASA File Limitations

Users are required to log into my website. I store the users name in a session variable. If the user doesn't log out and the session expires after 20 minutes, is it permissable to have code in the session end function of the global.asa which accesses a database and makes alterations to the users login status?

The reason I ask this is that I am having problems trying to get the logout to work for sessions which have timed out. If the users logout using the logout button, the code works fine.

View Replies View Related

Is It Bad To Have A Large GLOBAL.ASA File?

It seems to me that I generally use two types of Functions:

Type #1-Ones that any page on my site might use
Type #2-Ones that only a single page would ever use

Logically, it seems that I should put the Type #1 functions in the GLOBAL.ASA file and the Type #2 functions in the pages that use them. I would like to, however, just go ahead and include ALL of my functions in the GLOBAL.ASA file.

Comments on this? Is this a good idea?

View Replies View Related

What Do I Need To Do To Implement A Global.asa File?

where does the file need to be?(root directory of server? main directory of my application?)

I don't need to include the global.asa file in my asp pages to reference the application variables, right?

can I use application variables without using a global.asa file?

when using a global.asa file, do I need to restart the server(or IIS) every time I make changes to it, or does the application automaticaly reset once a change has been made to it?

at the mo I have a global.asa file that looks like this.

<script language="vbscript" runat="server">
Sub Application_OnStart
Application("visitors")=0
End Sub

Sub Session_OnStart
Application.Lock
Application("visitors")=Application("visitors")+1
Application.UnLock
End Sub

Sub Session_OnEnd
Application.Lock
Application("visitors")=Application("visitors")-1
Application.UnLock
End Sub

</script>
and then I have this line in the asp page to display the number of visitors...

Code:

response.write(Application("visitors"))

I get nothing...!

what am I missing?

View Replies View Related

How The Global.asa File Changes Will Take Effect?

My website is hosted with the ISP and recently I have modified my Global.asa file for the ASP application.

So I think we need to restart the World Wide Web Publishing Service so that the changes in the Global.asa will take effect. I think it will be difficult for the ISP to restart the Service as there many applications will be running. So can you suggest how can my global.asa file changes will take effect so that I can deply those changes?

View Replies View Related

Session.timeout In Global File

Can I put a session.timeout = "45" in the global.asa file? and if yes, under what section?

View Replies View Related

Vritual Directory & Global.asa File

If I don't set a vritual directory for the new application on the IIS (simpley copy the new application to a parent virtual directory), the new application's Global.asa file won't work. Right?

View Replies View Related

Dynamically Generate Global.ASA File?

On each site there is a global.asa file that ties into an Access database. The fields from the Access database instantiate the values of session variables used in the site. I am trying to do away with the need for a database and was wondering if when I set up a site I also set the .asa file for that site.

Then if a shop wants to change something like an address, phone, number, directions, etc., they would go a toolbox area of the site and there would be a form whose field values would be populated by the session variables from the global.asa file.

When the form was submitted I was thinking I could somehow use asp to write a new global.asa file and store it in the server. Is this feasible? Also, what would this mean insofar as permissions on the root directory of the site? I'd imagine they'd have to have write permissions no? Code:

View Replies View Related

File Via FTP Site

I need to access a file on a remote FTP server. Assuming I have all the FTP login credentials, how can I get that file (.txt file) and copy it to my server (so I can use it for my database). I need to have it on my server before I use it because I am not allowed to do anything with the remote file but copy it. (bandwidth crap, or so they say)

View Replies View Related

File On Another Site

How do i include a file on another site (which is accesale via a virtual directory)the file to be included is set up like this:

http://www.mysite.com/virtualdirect...includethis.asp

ive tried all sorts

View Replies View Related

Session Variables Are Not Getting Initialized In Global.asa File

I have initialized some session variables in Global.asa for our web
application. But these session variables are returning null values; it is was
working fine before; Recently we have rebuild our servers.

Please let me know if anyone of you have some idea?

View Replies View Related

Remove Connection Information From The Global.asa File

I have actually an asp web site which use the global.asa file to connect to
the database but for security reason, I want to put username and password
information (or the complete connection string) in a seperate file so only a
special user could read these informations.

View Replies View Related

Deleting A Temp File On Session End From Global.asa

I am trying to write a sub that will delete a spreadsheet file created by the web user. THis is the code I have inserted into the global.asa file, but it is not working.

sub Session_OnEnd
'delete the temporary excel spreadsheet
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(Server.mappath("temp/<%=session.sessionid%>.xls"))
Set objFSO = Nothing
end sub

I have made sure that the temp folder has permissions set for the IUSR_machinename account to be able to delete files. I am running IIS 5 on a windows 2000 server.

View Replies View Related

Using Global ASA File To Detect Language Setting

I am about to begin a web site for a client who wishes the site be in English, German, and Italian. What I am planning on doing is setting up a script in the global asa file that will detect if the users language is set to either it or de and if so, set a session variable to Italian or German, if not, set the session variable to English. In the actual pages themselves, I will use a select or if statement on each section that will have content. The statement's criteria will be the session language variable. I know if I was doing this site for someone who wanted it in 20 languages this may not be practical, but for 3 languages I think I can pull it off. So what's my question you ask? Is my approach sound and practical? If so, can someone show me the snippet of code that would go in my asa file to set the session variable. OH, and also equally important, when this site is spidered by search engines, will Google.com and Google.it and Google.de pick up their respective pages? The spiders have language settings, no? Don't they request pages from a (my) server just like any other request?

View Replies View Related

Global.asa An Error Referring To A File That Is In A Different Location

i have two sites on shared NT hosting

aw.neue.co.uk and smh.neue.co.uk

both sites have their own global.asa files and both appear to be throwing up an error referring to a file that is in a different location

anyone know whats happening?

View Replies View Related

I Want To Include An ASP File From Another Site

Is there a way I can include an ASP file on somebody elses page without useing Java or an Iframe from another web site?

I've tried using #include file but it will only include local files.. is it possible to do this with ASP?

View Replies View Related

Including A File From Another Site...

Am trying to include a txt file from another site...This is the code I am using:

<table width="540" border="1" cellspacing="1" cellpadding="5" align="center" bordercolor="#DCDCDC" style="BORDER-COLLAPSE: collapse">
<tr class="text" align="center">
        <td width="250">
        Name</td>
        <td width="250">Type</td>
        <td width="40">Info</td>
        </tr>
        
<!--#include virtual="http://www.anothersite.com/MyFile.txt" -->         
</table>

The contents of the txt file are all arranged with appropriate html so am hoping the output will be displayed appropriately on this ASP page.

View Replies View Related

Include File Outside Web Site

Is it possible to have an include file that resides outside of the web site parent folder? For instance, lets say you have several websites under Inetpub/global/websites/ but the include file is in Inetpub/inc/ I get a file not found error trying file/virtual starting with the root and even using C:/Inetpub. Example

Inetpub/global/websites/website1/global.asa

Inside global.asa is the statement

<--Include file="C:/inetpub/inc/functions.inc"-->

View Replies View Related

Can I Implement Session Without Global.asa File In My Root Directory....

Can I implement session without global.asa file in my root directory....and is there any good site for sessions tutorial.

View Replies View Related

GLOBAL.ASA Recognize File Located In Subdirectory Of Webserver?

Will IIS6.0 recognize a global.asa file located in a subdirectory on the webserver?

I'd like a file that will execute whenever a file in the subdirectory is browsed - or, at least it is executed the first time a file in the subdirectory is browsed.

View Replies View Related

Implementing Verisign Payflow Pro

I'm testing the verisign service. Has anyone here used this service if so can you share some pointers.

I'm a bit stuck with the variables that the server returns. I want to use them but i'm getting no where.

View Replies View Related

Implementing Shadow Uploader

I found this Shadow Uploader on here, and i see that you can have an email sent, but im having troubles understanding how the email bit works
All i want is for an email to be sent to me saying 'Someone has uploaded an image' and the text from the 'name' field..
Normally i would try and do this for myself, but the site needs to be running by Tuesday and ive got no more time to much around with it.

View Replies View Related

Implementing RSA RSACryptoServiceProvider *and* JavaScript

I'm currently trying to strengthen up the security on a large ASP.NET
application. I use MD5 hashes for the user/password, and a token to 'salt'
the resultant hash. This is secure.

The next step -- and I'm *really* surprised that *everyone* doesn't do
this -- is to prevent 'Evil Eve' from listening in over the network when the
passwords and/or other sensitive information is updated. The best method
here is to use asymetrical encryption using the framework's
RSACryptoServiceProvider. Of course, this won't work on the client because
you have to use JavaScript on the client (forget Java and Activex as these
are out of the question). Therefore I want to implement RSA on the client in
JavaScript. Code:

View Replies View Related

Implementing Audit Trails

I have got around 7 pages where users can edit existing data. The thing is it is required to have an audit trail of the changes made to any table storing in user information. A google search mainly shows all 600$ softwares which can't be afforded by me. how to implement them.

View Replies View Related

ShadowUploader - Help Implementing The Code

i have no probs with the script, it works fine, but i want to be able to upload an image aswell as data (text) from the same page, i've had probs trying to do this as i get an error, cn't remember the error.

View Replies View Related

Saving Site As WORD File

Just a thought...Using

Code:

Response.ContentType = "application/msword"

to save asp pages to MS Word, saves the text on the pages OK, but, pictures, icons etc are just saved as a link to the original picture file . If the picture/image is not on the current PC opening the WORD file, then none is shown..

I was wondering if I could save the asp pages WITH images/pictures & icons using MS WORD on the server and then the users downloading the .doc file from the server to their PC, would this embed the pictures etc in the .doc file, so it could be shown on any PC. (which has WORD or a WORD Viewer installed).

If this is possible could someone point me in the direction as to how to get started opening WORD on the server and saving the .doc file on the server.

View Replies View Related

Implementing Secure Paswords/usernames

What's the best way to implement a secure passwords. The passwords already exist but i want the users to then change them.

View Replies View Related

How To Write A Statement To Increase Session Expire Time In Global.asa File

i want to increase my session time so that it does not expire till the user closes the site.

i have written in global.asa file the following code:

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

Sub Session_OnStart
Session.Timeout = -1
End Sub

</script>

but it doesnt work and my sesion still expires.

View Replies View Related

Implementing Current Date Into Form Variable

<input type="hidden" name="date" value= (Date)>

When I use:

<% Response.Write (Date)%> if returns the date I want.

I need to enter it to this date value in my form. What is wrong with my code above? It should be obvious, but I can't figure it out....

View Replies View Related







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