|
|
|
Using out-process components under IIS4
|
Total Hit (2755) |
By default IIS 4 doesn't permit to use the Server.CreateObject command with an out-process ActiveX EXE component. To do so, you must manually create the AllowOutOfProcCmpts registry value under the path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\ASP\Parameters, and set its value to 1
....Read More |
Rating
|
|
|
Ensure that server-side debugging is disabled in production sites
|
Total Hit (5155) |
Before going to production, you should ensure that the server-side script debugging is off for your ASP application. In fact, not only does server-side debugging slow down your application, it also forces all ASP request to be served by the same thread. In other words, you don't take advantage of II
....Read More |
Rating
|
|
|
Quickly create HTML tables from an ADO Recordset
|
Total Hit (5769) |
The ADO Recordset object exposes the GetString method, which returns the values in the Recordset into a formatted string. Here's its syntax:
res = GetString([StringFormat As StringFormatEnum = adClipString], _
[NumRows As Long = -1], [ColumnDelimeter As String], _
[RowDelimeter As Str
....Read More |
Rating
|
|
|
Redirect the browser when the output has already been sent
|
Total Hit (3574) |
If from an ASP page you try to use Response.Redirect after having written anything to the browser, you'll get an error saying that the page's headers have already been written. To avoid this you should put the code that checks if the browser needs to be redirected to another page at the very beginni
....Read More |
Rating
|
|
|
Split large HTML tables in smaller ones
|
Total Hit (2845) |
In general, a browser can't render an HTML table before the closing &/TABLE> tag is received. This means that the end user might wait for several seconds before a table result is displayed. The easiest way to have results appear as soon as they are available is subdivide a large HTML table into many
....Read More |
Rating
|
|
|
The MapPath method slows down execution
|
Total Hit (5084) |
The Server.MapPath method slightly shows down the execution of your ASP scripts, because IIS has to access some internal variables. For this reason you should try to avoid it if possible. In other words, you should code absolute physical paths in your ASP code, instead of using virtual paths that yo
....Read More |
Rating
|
|
|
Tricks with Server.MapPath
|
Total Hit (2934) |
The Server.MapPath method can be used to retrieve several interesting properties about the running ASP application, for example:
«Code LangId=5»
' the current directory
currDir = Server.MapPath(".")
' the parent directory
parentDir = Server.MapPath("..")
' the application's root director
....Read More |
Rating
|
|
|
Two ways to access ASP objects from within a component
|
Total Hit (8687) |
You can write ASP components that work under any version of IIS by adding a special public method, named OnStartPage, to the public class module of the ActiveX DLL project. This method is then called by IIS whenever a script instantiates an object through the Server.CreateObject command. This is the
....Read More |
Rating
|
|
|
Understanding IIS Isolation Levels
|
Total Hit (3125) |
Internet Information Server introduced the notion "Isolation Level", which is also present in IIS4 under a different name. IIS5 supports three isolation levels, that you can set from the Home Directory tab of the site's Properties dialog:
Low (IIS Process): ASP pages run in INetInfo.Exe, the mai
....Read More |
Rating
|
|
|
Use Global.asa Metadata directive to access type libraries
|
Total Hit (2844) |
Most ADO statements require special constants to be passed as arguments to method calls, as in:
«Code LangId=5»
rs.Open "Authors", cn, adOpenForwardOnly, adLockReadOnly, adCmdTable
The above line is surely more readable than:
rs.Open "Authors", cn, 0, 1, 1
«/Code»
but for the fir
....Read More |
Rating
|
|
|
Use Response.IsClientConnected after long queries
|
Total Hit (2931) |
When you perform a complex and time-consuming query in your ASP program, you should periodically test whether the client is still connected, using the IsClientConnected method of the Response object, as in :
«Code LangId=5»
' a lenghty query here
' ...
' check whether the client is connected be
....Read More |
Rating
|
|
|
Use Server.HTMLEncode for strings stored in a database
|
Total Hit (2780) |
If your ASP pages display strings stored in database fields, you should always process the strings with the Server.HTMLEncode method, otherwise the string won't be displayed correctly in the user's browser if it contains characters that have a special meaning to HTML, such as the quote ("), the less
....Read More |
Rating
|
|
|
Correct installation of Server service on Windows NT4 for SQL
|
Total Hit (2693) |
It is especially important to correctly set Windows NT4's Server service in "Application Server" mode to ensure that the Server service doesn't absorb all the available hardware resources while providing network services for file management. As its name suggests, when in "Application Server" mode, r
....Read More |
Rating
|
|
|
Enumerate all the indexes in a SQL Server database
|
Total Hit (4006) |
The indexing schema plays a fundamental role in performance tuning, and tools such as the Index Tuning Wizard that can suggest efficient schemas on the grounds of a database usage. Once the indexing schema has been completed, you should document it in order to know which tables have primary keys, wh
....Read More |
Rating
|
|
|
Enumerate the users' rights on a DB's objects
|
Total Hit (2741) |
SQL Server provides several security levels, and the control that the system administrators can pursue over the DB's objects is extremely accurate. It's often useful to know which rights each user has. As you might know already, a lot of administrative SQL Server tasks can be performed through the p
....Read More |
Rating
|
|
|
ISSUE : IIS6.0 prevents the upload of files more than +200 KB
|
Total Hit (2960) |
IIS6.0 prevents the upload of files more than +200KB. So you need to make some changes in the default IIS settings first.
«b»Background«/b»
For IIS6.0 users, the AspMaxRequestEntityAllowed property specifies the maximum number of bytes allowed in the entity body of an ASP request. If a Conten
....Read More |
Rating
|
|
|
Force Download to client browser.
|
Total Hit (5839) |
Forces users to have choice of downloading a binary file. This was becomming a problem with Word documents - as they would either open within the browser or open externally. You may need to change the FileName variable.
«Code LangId=5» <%
Dim Stream
Dim Contents
Dim FileName
....Read More |
Rating
|
|
|
|
|
|
|
How To Manipulate Text Files in an ASP Page
|
Total Hit (1074) |
This article describes how to create, write, read, move, copy, and delete text files from within an Active Server Pages (ASP) page.
You may want to use a text file for the sake of simplicity (when a database or more complicated file format may be excessive) or when prior data exists in the form o
....Read More |
Rating
|
|
|
ADO Tutorial
|
Total Hit (3778) |
«big»«u»«b»ADO Tutorial«/b»«/u»«/big»
«b»ADO Introduction«/b»
This chapter explains what ADO is, and how it can be used.
«b»ADO Database Connection«/b»
This chapter explains how to connect to a database using ADO.
«b»ADO Recordset«/b»
This chapter explains how to access an ADO Recordset
....Read More |
Rating
|
|
|
ASP Including Files
|
Total Hit (1096) |
You can insert the content of one ASP file into another ASP file before the server executes it, with the #include directive. The #include directive is used to create functions, headers, footers, or elements that will be reused on multiple pages.
|
Rating
|
|
|
HOW TO: Use Database and ASP Sessions to Implement ASP Security
|
Total Hit (3632) |
This step-by-step procedure illustrates how to implement forms-based security for Active Server Pages (ASP) applications. You can use this mechanism when your application is secure, when you want to allow only authenticated users, and when the users are not part of your internal domain (such as Inte
....Read More |
Rating
|
|
|
Downloading Files with VBScript and ASP
|
Total Hit (1453) |
The primary use for a system like this is to allow downloading of any TEXT based file that would normally be served via a client's browser and be unable to be downloaded. This system works great when setting up downloads for files with the following extensions: *.txt, *.htm, *.html or *.asp . This s
....Read More |
Rating
|
|
|
File downloading with COM and ASP
|
Total Hit (3130) |
This article is about direct file downloading through a COM component. It uses the IResponse interface to send a file directly to the client browser.
With this approach you can protect your files from being downloaded by an unauthorized person.
|
Rating
|
|
|
Download multiple files in one http request
|
Total Hit (2761) |
HTTP protocol was designed to send one file per one request. Sometimes you will need to send more files - usually when a client selects several files for download and the files have to be delivered to the client. I created ASP sample which will do such task - the sample is located at http://www.pstr
....Read More |
Rating
|
|