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


ADVERTISEMENT

Remove OLE Information For Images In DB

I'm woundering if anyone can lead me to a tech article on how to remove the
OLE header from an images that get stored in an SQL image field via MS
Access forms.

I cannot use an ASP upload page since the user will be using an Access form
and does not want to jump around from Access to a web browser do do data
entry.

I'm not worried about performance because it's not a very big DB and the
server has plenty of hardware.

View Replies View Related

Storing Global Information

I'm developing an intranet and I would like for first time visitors (per session) to check a table's settings so that the intranet would act accordingly.

in tblIntranetSettings, I have a field called fldIntranetDown. This field holds a 0 or 1 value (0 meaning the Intranet is not down and 1 meaning that it is)

I would like for the supposed system to check this value and perform a function dependant on the value it finds. My thoughts were to use the Session_OnStart of the global.asa, but to my understanding that is only fired off as a new session is created (yes, this checks the value, but read on for a possible snafu)

Now, if I had a visitor who did this check, and it came up as 0, allowing them to peruse the intranet, and something came up where I changed that value to 1, thus closing the intranet, said user could still roam, as that the check SHOULDN'T be made on a per page request basis (that would be a hog, wouldn't it?)

So my question is, "How can I develop some kind of system where the database values are stored for all to reference without multiple hits on the DB and only updated (to be checked) when their values are changed?"

Please don't feel like you have to give the EXACT answer here. If you say something like "You'll need to look into XXX, that do what you want", then that is all I need (I like doing the research, I'm just stumped for an answer to HOW I can go about doing this)

I'm using ASP/VBScript on a WindowsXP/2K network with Access2K2/SQL2K DBs.

View Replies View Related

Remove Connection From Applicaiton Object

The connection object is stored in a application object in a database.asp file which is included on all the pages. This is something that I didn't code but I am incharge of fixing it because we are having alot of problems with the IIS.

How do I remove the connection object from the application object? I am a bit confused, what if i just use a variable to set the connection and then still include the file on all the pages. Would that work? Code:

View Replies View Related

Global.asa Db Connection

I'm new to asp and I was told that I need a global.asa file in order to connect to a db (within our intranet).

okay, great fine...now I have an 'example' of a global.asa file. now, how do i go about connecting to a db from my asp page using this global.asa file?

View Replies View Related

Connection Object Using Global.asa

i am making a site using asp. in this i am using mssql server2k as backend. i ve created a dsn. i want use global.asa file for creating connection object so that i don't ve to create con object in every .asp page. for that i ve write following code

<script language="vbscript" runat="server">
sub Application_onStart()

set con=server.createobject("adodb.connection")
con.open "dsn=pc;uid=sa;pwd=;database=dbname"

end sub
sub Application_onEnd()
set con=nothing

end sub
sub Session_onStart()

end sub
sub Session_onEnd()

end sub
</script>

now anyone tell me how to use that connection object in any asp file for fetching the recordset.

View Replies View Related

Connection Info In Global.asa

Our ASP web application uses connection object from global.asa.
We hard coded Uid and pwd in global.asa.

Is there any way we can encrypt this Uid and Pwd in global.asa, or can
we access them through environment variables, if so can some one give me a
sample of code( to access environment variables through asp code.)

View Replies View Related

Connection String In Global.asa

I currently have my SQL Server connection string in an Application variable in the global.asa. Could that be a security risk? I have heard that with Cold Fusion, when there is a page error. the actual Connection String is written to the screen as part of the error page.

I'm quite sure that would not occur in ASP but just wanted to be sure, and get a few expert opinions.

View Replies View Related

Connection String In Global.asa

I was looking at another post, and what the person did was:

Dim strConn
strConn = "string"
application("strConn") = strConn
Now, am I able to create a connection object in my global.asa like so, and then keep my existing syntax for all my hundreds of queries?

Dim strCon
strCon = string
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open strCon
?

I'm trying to SAVE bandwidth, so I want to create my connection in global.asa instead of each time my include file 'top.asp' is executed. I can also close it easily...

PS. I believe Application_OnStart() is the best place to put it, am I correct?

View Replies View Related

Connection Strings -- Global.asa

1. Connection strings need to be in global.asa file always?
2. How can we encrypt the connection string userid and passwd in global.asa?

View Replies View Related

Audio File Information

how to use vbscript to read a directory of audio files, recursively, and get the actual length, in seconds, of each file? The files will be wavs and aiff's.

View Replies View Related

Grabbing Information From A .txt File

I have seen people's ASP scripts which call an external .txt file and compare it to a form's returned information (i.e. a password and login system), and--with my being new to ASP--I couldn't figure out how. What I want to do is write a form's results to a .txt document and retrieve those results via JavaScript, HTML, ASP, PHP, etc.

View Replies View Related

ASP Error Event Information Is Missing The File Name

I am using Windows 2003/IIS 6. The following event occurs during the day. i
want to debug the culprit ASP page which is causing this, but having hard
time without knowing on what page and website where the error occurs.
May anyone have any idea:

1)how to change the server configuration so it will log the page, or
2) is the error log stored elsewhere (i checked
onWINDOWSsystem32LogFilesHTTPERR, but it logs different sort of errors),
or
3)is there another way to log only errors (we have an internal error
monitoring system, but this error seems to escape it. maybe it's on
global.asa)? 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

Write Information Form A Comma Separated Text File Onto An ASP Pag

I have a text file that has two lines in it, the first line gives item
labels, my second line gives values for those labels. I would like to use
ASP to present this data on a web page. I also want the page to reload every
10 seconds so that any updates to the text file would be relfected on the web
page.

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

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

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

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

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

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

More Than 1 Connection In The Same File

I am trying to do more than 1 connection in the same file and i am getting some errors...

With 1 connection it works flawless... but when i try to add another i got a error point to "data_sourcea".

Can someone show me some tip (best pratice) on how to do this?

Code following:

<%
Dim rs, data_source, no
no = 0
data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("..

View Replies View Related

Opening DB Connection In ASP File

I am trying to open a DB connection in an ASP file (with an HTML interface). I have some idea how to do it, but I am not quite sure. It is linking to an Access DB. It is very simple, I am posting some data to the DB. Only one connection is needed to open.

View Replies View Related







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