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


ADVERTISEMENT

Dynamically Generate The Sql

i have a long recordset that i want to page through. can sql pass back say, 5 records from 20 to 25 out of 1000?
i can then pass 2 variables between the pages to dynamically generate the sql and thus page through the results. can someone post up a simple example of this if its possible?

View Replies View Related

Generate Charts In Serverside Excel Dynamically, Advisable?

I have a new approach to saving charts from server-side Excel when ASP pages are processed. The charts show weather data that is updated every 15 minutes in a database, and instead of just automating the chart production so that every chart is generated every 15 minutes, 24 hrs/day, it seems smarter to generate up to date charts when people want to look at them. But I'm not sure if this is the best approach.

This is what I can do from an ASP page to dynamically chart data:

- run Excel on the server
- open a Worksheet that has a customized chart for a range of cells.
- insert new data in the charted range of cells (chart auto-updates).
- save the chart to a gif file.
- insert the gif into the html page viewed by the client.

Using this approach is convenient because I can customize charts to look exactly as I want without having to find the documentation to automate the chart formatting.

Is it possible to run Excel once on the server, and let all requests for charts use this one running instance of Excel? The alternative is that Excel will run once for each chart request, this seems like it could get out of hand pretty quickly if a lot of people are trying to look at charts at the same time.

Are there better ways to generate charts dynamically on the server?

View Replies View Related

Generate RTF File From ASP

currently, i export data from ASP to Excel. but i want to change it to RTF. i have looked at microsoft website and tried whay i have studied but failed to make it. at microsoft website, the table is created using rtf script but in my case, i just want to create it using html script.

and then, when user click PRINT button, i want my system shows the detail contents of rtf file and then open the Print window later. so user does not need to click File->Print and so on. is there any example script i can study?

View Replies View Related

Generate File

how to generate a text file with data from the db in asp and save that file in clients system.

View Replies View Related

Generate Xml Without Need To Persist It In A File?

i get data with ado i need to get a xml string from the recordset how can i get it without having to persist the recordset in a (xml) text file is there a simple way ?

View Replies View Related

Using Asp To Generate Xml File On Server

Is it possible in a global.asa file (or some other way) to have an xml file generated by an asp script and saved to the server some how?

<%
Dim xmlDoc, rootEl, child1, child2, p'Create an XML document
Set xmlDoc = Server.CreateObject("Microsoft.XMLDOM")'Create a root element and append it to the document
Set rootEl = xmlDoc.createElement("root")
xmlDoc.appendChild rootEl'Create and append child elements
Set child1 = xmlDoc.createElement("child1")
Set child2 = xmlDoc.createElement("child2")
rootEl.appendChild child1
rootEl.appendChild child2'Add an XML processing instruction
'and insert it before the root element
Set p=xmlDoc.createProcessingInstruction("xml","version='1.0'")
xmlDoc.insertBefore p,xmlDoc.childNodes(0)'Save the XML file to the c directory
xmlDoc.Save "c: est.xml"
%>

THis seems to be what i am after but when I try to modify the xmlDoc.Save line to either "/images/listings/test.xml" or imageslistings est.xml" and it comes back saying it can't find the path. If I just leave "text.xml" it comes back saying permission denied. If I can solve this path issue so as to be able to save the file to a directory I think I will have it solved.

View Replies View Related

Generate Unique File Name

I have an application form that when filled out is being written to a singular HTML file. I want to convert it to generate a unique file name each time a user fills it out.

Secondarily, I want to be able to attach the unique file to the email that is sent to us when it is submitted.

Here are the current snippets of code:

set ObjFS = server.createobject("Scripting.FileSystemObject")
set objTheFile = objFS.OpenTextFile("e:credapp2.html",2,-1)
objTheFile.WriteLine(FileToWrite)
objTheFile.Close

and...

objMail2.AttachFile "e:credapp2.html"

View Replies View Related

Generate Excel File Using ASP

With response.contenttype = "application/vnd.ms-excel", I can easily export my data to Excel which is embeded and shown within a browser. If I'm going to save the Excel file through ASP programming, which method can I use? I need to save the data to Excel file with dynamic name (the file name should contain key values and appended with system datetime).

View Replies View Related

Generate Html File

how to create (generate) .html file by using asp. I am not sure if this possibility even exists... if not, is there any other way I could generate .html files? The thing is that I have to retrieve info from database and the generate .html file.

I know I could have it as .asp, but this woudl my index page and I would like to use it for search engine, which are not very happy with other extensions than .html.

View Replies View Related

How To Generate .html File With Asp?

how to create (generate) .html file by using asp. I am not sure if this possibility even exists... if not, is there any other way to do it?

View Replies View Related

Dynamically Name A Zip File.

I am currently struggling with dynamically naming a zip file. Basically I want someone on my ASP site to be able to choose to download a zip file and the zip file to be renamed before it is sent to them with their login name. Does anyone know how I might accomplish this. Code:

View Replies View Related

Generate Unicode Text File

Is it possible to get information from a database and generate it to
unicode text files using ASP?
Is there any product/COM out there that can do this? If not, is there
any other solutions? It doesn't have to be ASP, but it would be nice.

View Replies View Related

Generate An Ms Word File For An Asp Output?

generate an ms word file for an asp output?

<%
x=date
response.write(x)
%>

- is it possible for the date (code above) to be displayed on ms word?

View Replies View Related

Rss.xml File Dynamically Has Issues

Creating an rss.xml file dynamically via ASP/ADO/DB, but find errors in the
file.

Don't think it's an ASP prob to be honest. Think its more to do with the
fact that the ampersands are accepted in the file. Do I take it that you
have to 'escape' all non alphanumeric chars to produce a valid file?

I thought xml files were supposed to eradicate the usual invalid char
problems that tab-delimited and csvs used to have

View Replies View Related

Generate PDF Reporting File With ASP From SQL Server Datas

I'm looking fo a solution to generate automaticaly a PDF file.

My aim is to use a template define by a user and to insert dynamicly
datas form SQL server in this document.

Can you tell me if it exist PDF template like .dot for word ?
If such file exist is it possible to generate list of information like
aacount report with datas coming for Database like Sql server.

View Replies View Related

Creating Excel File Dynamically

I want to update Excel file when i update database.

View Replies View Related

Updating Excel File Dynamically

I want to update Excel file when i update database.

View Replies View Related

Loading Content Of *.txt File Via Asp Dynamically To Browser...

I'm using a flat text file in place of sessions to run my shopping cart. I have a couple different asps' that manipulate the session file to preform tasks like deleting items and updating quantities. The file stores one product along with the user selected options per line so it looks something like this:

product, color, qty, unit_price, selection_total |
product, color, qty, unit_price, selection_total |
...

Code:

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

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 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







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