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.
I have a site wich is in a subdirectory of the webSite. I have to use a global.asa file to set session.timeOut even i create an IIS application on the subDirectory global.asa don't run ?!?
if i create a virtual directory instead of IIS application, the global.asa run fine. How can i do to run global.asa on a subDirectory ?
i would like to be able to print a txt/.doc file from the client end. the file is located on my server. Since there are multiple files (invoices)..i dont want the client to open each on individually and print them.. Is there any way of printing them. even if i can print one of them, i can print the rest by putting them in a loop, since they are named apporpriately.
I want to download or save a file from remote location to my local computer everyday. for example. i have an excel file . so i need to write a script to download this file automatically everyday. How do i do this.
I am using windows 2000 server with IIS already install. I have copied test.asp file to wwwroot directory and tried to run it but it did not work ..and i gave me this error msg.
http://localhost/test.asp or http://127.0.0.1/test.asp or http://my_server_name_here/test.asp
The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. HTTP 500 - Internal server error Internet Explorer
I have even tried to run the iisstart.asp and localstart.asp which already exist at wwroot directory when IIS is installed.However, it still could not work.
Does anyone know why ? I how do i know that the webserver and ASP engine is working properly.
I am creating an asp application which is essentially a file management app. I am trying to get my head around a technically issue wonder if someone can offer some help.
I want to be able to force the download of the files are attached to a particular record. The code which i use to force the download is:
I need to provide a way to download a software and its corresponding manual from a web page.
So far I have done the sign in page where people give their data. I will then give access to a page with a link allowing to download the required file(s).
My worry is how to avoid that somebody grabs the URL of the file and send it to another for downloading directly from the server. What can I do to avoid this ?
I have a web server running on a machine. When the users connect to that machine, it loads the ASP page. The ASP page has a ActiveX control on it and it gets downloaded to the client's machine. I have made the control as a signed control so there is no problem in download.
Likewise, in the virtual directory path on the server, I have one clientsettings.MSI and that needs to be run on the server. Whenever the user tries to connect to the web page, in onload event of the web page, the .MSI file should be installed on the clients machine. For this to happen what all needs to be done ?
Having finally mastered freeASPUpload, I really want the files being uploaded to the web server to automatically be forwarded to my local inhouse server. I'm sure there has to be a way.
I'm using freeaspupload script and have had help adding a feature where the email address of the user is added to the file name being uploaded (line 135 below) which is:
streamFile.SaveToFile path & (Session("PMMS_EMAIL")) & "~~" & fileItem.FileName, 2 and it works successfully.
Can a line of code be added, that will automatically create a subdirectory, named: "users email address", upon upload submission? Thanks. I look forward to your reply.....
i want to create one application which is when user click on a button, a document that located in the folder in my computer will be printed automatically. The location of the document will be hardcoded.
Also, i need to specify the url or path of the printer so that when user click on the button, the document will be printed automatically through the specific printer. How can i do this?is there any example of application or source code like this for me to see for guideline?
I am writing an asp file to edit records in an access2000 db. I do a query on the primary key, then if EOF and BOF (nothing found), it writes to the db. If not, it does a second test to see if any info has changed. Here's the relevant code:
I am looking for some help creating a login page. I want to have a Access DB with the username/password/forward address. I want it to forward the user to there page depending on the username. I have seen many login pages but none that will forward to a web page depending on the username.
I do contract work for an organization that has some of the word code I have ever seen. I think they are using some sort of screwy CMS or something.
The code on their pages are pages stacked on pages, in other word one page loaded into a browser might have 3 <html><body></body></html> sets. Its really bad. So I started working on a page that has a form. It is included in the main page with this line of code:
When we send a mail using the code below,we do not get simplified chinese characters if they are present in the body but we get junk in the mail and we need to change the mails encoding to simplified chinese to see the Chinese characters.
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.
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
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.
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.
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...
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?
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?
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:
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:
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?
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.
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.
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?