ASP - Knowledge Base Archives - Hivelocity Hosting https://www.hivelocity.net/kb/tag/asp/ Dedicated Servers, Private Cloud & Colocation Fri, 26 Jan 2024 16:56:16 +0000 en-US hourly 1 https://wordpress.org/?v=6.6 How can I find the path to my website in ASP? https://www.hivelocity.net/kb/how-can-i-find-the-path-to-my-website-in-asp/ https://www.hivelocity.net/kb/how-can-i-find-the-path-to-my-website-in-asp/#respond Sat, 13 Nov 2010 11:06:21 +0000 https://kb.hivelocity.net/?p=1253 The following asp command will give you the path to the root of your site. response.write server.mappath(“/”)

The post How can I find the path to my website in ASP? appeared first on Hivelocity Hosting.

]]>
The following asp command will give you the path to the root of your site.

response.write server.mappath(“/”)

The post How can I find the path to my website in ASP? appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/how-can-i-find-the-path-to-my-website-in-asp/feed/ 0
What is Global.asa file ? https://www.hivelocity.net/kb/what-is-global-asa-file/ https://www.hivelocity.net/kb/what-is-global-asa-file/#respond Sat, 13 Nov 2010 10:33:06 +0000 https://kb.hivelocity.net/?p=1186 The Global.asa file is an optional file that can contain declarations of objects, variables, and methods that can be accessed by every page in an ASP application. All valid browser scripts (JavaScript, VBScript, JScript, PerlScript, etc.) can be used within Global.asa. The Global.asa file can contain only the following: Application events Session events <object> declarations …

What is Global.asa file ? Read More »

The post What is Global.asa file ? appeared first on Hivelocity Hosting.

]]>
The Global.asa file is an optional file that can contain declarations of objects, variables, and methods that can be accessed by every page in an

ASP application. All valid browser scripts (JavaScript, VBScript, JScript, PerlScript, etc.) can be used within Global.asa.

The Global.asa file can contain only the following:

Application events
Session events
<object> declarations
TypeLibrary declarations
the #include directive
Note: The Global.asa file must be stored in the root directory of the ASP application, and each application can only have one Global.asa file.
——————————————————————————–

Events in Global.asa
In Global.asa you can tell the application and session objects what to do when the application/session starts and what to do when the

application/session ends. The code for this is placed in event handlers. The Global.asa file can contain four types of events:

Application_OnStart – This event occurs when the FIRST user calls the first page from an ASP application. This event occurs after the Web

server is restarted or after the Global.asa file is edited. The “Session_OnStart” event occurs immediately after this event.
Session_OnStart – This event occurs EVERY time a NEW user requests his or her first page in the ASP application.

Session_OnEnd – This event occurs EVERY time a user ends a session. A user ends a session after a page has not been requested by the

user for a specified time (by default this is 20 minutes).

Application_OnEnd – This event occurs after the LAST user has ended the session. Typically, this event occurs when a Web server stops. This

procedure is used to clean up settings after the Application stops, like delete records or write information to text files.

A Global.asa file could look something like this:

<script language=”vbscript” runat=”server”>sub Application_OnStart
””some code
end subsub Application_OnEnd
””some code
end subsub Session_OnStart
””some code
end subsub Session_OnEnd
””some code
end sub</script>

Note: We cannot use the ASP script delimiters (<% and %>) to insert scripts in the Global.asa file, we will have to put the subroutines inside the

HTML <script> tag.

More info at https://www.w3schools.com/asp/asp_globalasa.asp

The post What is Global.asa file ? appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/what-is-global-asa-file/feed/ 0
Configure an ASP Web Application in IIS 5.0 https://www.hivelocity.net/kb/how-to-configure-an-asp-web-application-in-iis-5-0-2/ https://www.hivelocity.net/kb/how-to-configure-an-asp-web-application-in-iis-5-0-2/#respond Sat, 13 Nov 2010 07:18:31 +0000 https://kb.hivelocity.net/?p=984 1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager. 2. In the Internet Information Services window, click to expand * server name, where server name is the name of the server. 3. Right-click the Web site or the starting-point directory of the application that you want, and then …

Configure an ASP Web Application in IIS 5.0 Read More »

The post Configure an ASP Web Application in IIS 5.0 appeared first on Hivelocity Hosting.

]]>
1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager.
2. In the Internet Information Services window, click to expand * server name, where server name is the name of the server.
3. Right-click the Web site or the starting-point directory of the application that you want, and then click Properties.
4. Depending on the starting-point directory that you selected, click the Home Directory, Virtual Directory, or Directory tab.
5. Under Application Settings, click Configuration, and then click the App Options tab.
6. Click to select the Enable session state check box if you want ASP to create a session for each user who access an ASP application.
7. Click to select the Enable buffering check box if you want ASP to collect all output that is generated by the ASP page before the output is sent to the requesting Web browser.
8. Click to select the Enable parent paths check box if you want ASP to use relative paths to the parent directory of the current directory (paths using the .. syntax).

NOTE: If you enable this option, do not enable Execute permissions in the parent directories. This is to prevent a script in a subdirectory from running an unauthorized program in a parent directory.
9. In the Default ASP language box, type the language that you want to use. This box specifies the language that is used to process commands within the ASP delimiters (<% and %>). Note that VBScript is the default ASP language.

NOTE: You can override the default language in your ASP page by using the <%@LANGUAGE%> directive.
10. In the ASP Script timeout box, type the length of time that want the ASP to allow a script to run.

NOTE: You can set the timout period to a value between 1 and 2147483647.
11. Click OK twice to save your changes and return to the Internet Information Services window.
12. Quit IIS.

The post Configure an ASP Web Application in IIS 5.0 appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/how-to-configure-an-asp-web-application-in-iis-5-0-2/feed/ 0
How to Create an ASP Web Applicationin IIS 5.0 https://www.hivelocity.net/kb/how-to-create-an-asp-web-application-in-iis-5-0/ https://www.hivelocity.net/kb/how-to-create-an-asp-web-application-in-iis-5-0/#respond Sat, 13 Nov 2010 07:16:16 +0000 https://kb.hivelocity.net/?p=980 1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager. 2. Click to expand * server name, where server name is the name of the server. 3. Right-click the directory that you want to use as the application starting point, and then click Properties. NOTE: You can use the …

How to Create an ASP Web Applicationin IIS 5.0 Read More »

The post How to Create an ASP Web Applicationin IIS 5.0 appeared first on Hivelocity Hosting.

]]>
1. Click Start, point to Programs, point to Administrative Tools, and then click Internet Services Manager. 2. Click to expand * server name, where server name is the name of the server. 3.

Right-click the directory that you want to use as the application starting point, and then click Properties.

NOTE: You can use the home directory of a Web site as the application starting point.

4.

In the directory name Properties dialog box (where directory name is the name of the directory that you selected), do one of the following:

If you selected a Web site, click the Home Directory tab.

-or-

If you selected a virtual directory, click the Virtual Directory tab.

-or-

If you selected a physical directory, click the Directory tab.
5.

Under Application Settings, click Create.

NOTE: If the Create button is not present, a default application has already been specified. In this case, click Remove to remove the default application, and then click Create.

6. In the Application name box, type the name of the application that you want. Note that the application starting point is displayed next to Starting point. 7.

In the Execute Permissions list, click the level of permissions that you want to give this application. For example, for ASP scripts or Internet Database Connector (IDC) scripts, click Scripts only.

NOTE: The Scripts only option is more secure than the Scripts and Executables option.

8. In the Application Protection list, click High (Isolated), and then click Apply. 9. Click the Documents tab. 10. If your application uses a default document that is not displayed in the document list, click Add. 11. Type the name of the document in the Default Document Name box, and then click OK. 12. Select the newly added document, and then click the up arrow button until the new document is at the top of the document list.

The post How to Create an ASP Web Applicationin IIS 5.0 appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/how-to-create-an-asp-web-application-in-iis-5-0/feed/ 0
What is ASP Caching? https://www.hivelocity.net/kb/what-is-asp-caching/ https://www.hivelocity.net/kb/what-is-asp-caching/#respond Sat, 13 Nov 2010 06:59:54 +0000 https://kb.hivelocity.net/?p=953 The ASP Template Cache stores templates: pre-compiled ASP pages in text format (#includes have been evaluated, and so on). Its size is governed by the AspScriptFileCacheSize setting in the metabase, which defaults to 250. The ASP Script Engine Cache holds ASP templates that have been compiled into byte code. Its size is governed by the …

What is ASP Caching? Read More »

The post What is ASP Caching? appeared first on Hivelocity Hosting.

]]>
The ASP Template Cache stores templates: pre-compiled ASP pages in text format (#includes have been evaluated, and so on). Its size is governed by the AspScriptFileCacheSize setting in the metabase, which defaults to 250. The ASP Script Engine Cache holds ASP templates that have been compiled into byte code. Its size is governed by the AspScriptEngineCacheMax setting in the metabase, which defaults to 125. The relationship between the two is that an ASP page is cached once in the template cache, but it can appear many times in the script engine cache if it is being executed on many threads simultaneously. A site with a lot of memory and a lot of distinct ASP pages that get hit often will probably want to increase AspScriptFileCacheSize (monitor ASP counters with System Monitor to diagnose). There is much less need to increase AspScriptEngineCacheMax; the main reason would be that the defaults are inadequate for machines with 8 or more processors. AspScriptEngineCacheMax should have a metabase value that is equal to or greater than the number of CPUs plus one, multiplied by AspProcessorThreadMax. AspProcessorThreadMax defaults to 25.

Every process that hosts ASP will have its own ASP Template and Script Engine Caches. By default that is just one process because ASP applications run at medium isolation in the pooled Dllhost process.

When ASP gets a request for a page, it checks the ASP Template Cache first. If there’s an instance of that page cached there, the request is forwarded to the Script Engine Cache. If the requested page is not in the Template Cache, it is compiled into a template and forwarded to the ASP Script Engine Cache. If an instance of the page is cached in the Script Engine Cache and it is ready to run, that engine is run. Failing that, if there is an instance of the page that is already executing, ASP clones that running engine and executes the clone. This avoids the cost of re-parsing the template into byte code. If there is no script engine associated with the page, ASP takes the precompiled template from the ASP Template Cache, creates a new script engine and has it compile the template into byte code, and then executes it. When a page finishes executing, the script engine is put at the head of the free list. If the free list has grown larger than AspScriptEngineCacheMax, the least-recently used script engine is destroyed. A hit in the script engine cache means that ASP can avoid recompiling the template into byte code.

The post What is ASP Caching? appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/what-is-asp-caching/feed/ 0
How do I install IIS 6.0 and its components? https://www.hivelocity.net/kb/how-do-i-install-iis-6-0-and-its-components/ https://www.hivelocity.net/kb/how-do-i-install-iis-6-0-and-its-components/#comments Sat, 13 Nov 2010 06:57:51 +0000 https://kb.hivelocity.net/?p=949 To install IIS using the Configure Your Server Wizard 1. From the Start menu, click Manage Your Server. 2. Under Managing Your Server Roles, click Add or remove a role. 3. Read the preliminary steps in the Configure Your Server Wizard and click Next. 4. Under Server Role, click Application server (IIS, ASP.NET) and then …

How do I install IIS 6.0 and its components? Read More »

The post How do I install IIS 6.0 and its components? appeared first on Hivelocity Hosting.

]]>
To install IIS using the Configure Your Server Wizard

1. From the Start menu, click Manage Your Server.
2. Under Managing Your Server Roles, click Add or remove a role.
3. Read the preliminary steps in the Configure Your Server Wizard and click Next.
4. Under Server Role, click Application server (IIS, ASP.NET) and then click Next. By default, the wizard installs and enables IIS, COM+, and DTC.
5. If you want to serve either of the optional technologies (FrontPage Server Extensions or ASP.NET), on the Application Server Options page, select the appropriate check boxes, and then click Next.
6. Read the summary and click Next.
7. Complete the wizard, and then click Finish.

The Configure Your Server Wizard enables ASP.NET by default, unlike the Add/Remove Windows components install method below.

To install IIS, add components, or remove components using Control Panel

1. From the Start menu, click Control Panel.
2. Double-click Add or Remove Programs.
3. Click Add/Remove Windows Components.
4. In the Components list box, click Application Server.
5. Click Details.
6. Click Internet Information Services Manager.
7. Click Details to view the list of IIS optional components. For a detailed description of IIS optional components, see “Optional Components” in this topic.
8. Select all optional components you wish to install.

The World Wide Web Publishing Service optional component includes important subcomponents like the Active Server Pages component and Remote Administration (HTML). To view and select these subcomponents, click World Wide Web Publishing Service and then click Details.

1. Click OK until you are returned to the Windows Component Wizard.
2. Click Next and complete the Windows Component Wizard.

IIS Directories

IIS installs the following directories:
\InetPub
systemroot\Help\IISHelp
systemroot\System32\InetSrv
systemroot\System32\InetSrv\MetaBack

These directories contain user content and cannot be moved. You can, however, select the location of your Wwwroot and Ftproot directories at installation by using a script during unattended setup. If you uninstall IIS, the IISHelp directory is removed. The InetPub and InetSrv directories remain on your computer.

IIS Initial Configuration Backup

When you first install IIS, a backup of the initial metabase configuration is automatically created in the systemroot\System32\InetSrv\MetaBack directory. This backup can be used to restore the IIS configuration to its state immediately following IIS installation. This is a useful tool for solving metabase corruption or configuration problems, and can help you recover a known good configuration without needing to reinstall IIS. This backup is not password protected, and can only be used to restore settings on the system on which it was created.

The post How do I install IIS 6.0 and its components? appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/how-do-i-install-iis-6-0-and-its-components/feed/ 1
How Can I Place All Form Fields in to Variables in ASP? https://www.hivelocity.net/kb/how-can-i-place-all-form-fields-in-to-variables-in-asp/ https://www.hivelocity.net/kb/how-can-i-place-all-form-fields-in-to-variables-in-asp/#respond Sat, 13 Nov 2010 05:44:38 +0000 https://kb.hivelocity.net/?p=862 For Each Field In Request.Form TheString = Field & “=Request.Form(“”” & Field & “””)” If eval(TheString) Then Execute(TheString) Else Response.Write “Internal Error (ReadFormVariables Function)” End if Next   Popular Links Looking for more information on ASP? Search our Knowledge Base! Interested in more articles about Coding? Navigate to our Categories page using the bar on …

How Can I Place All Form Fields in to Variables in ASP? Read More »

The post How Can I Place All Form Fields in to Variables in ASP? appeared first on Hivelocity Hosting.

]]>
For Each Field In Request.Form
TheString = Field & “=Request.Form(“”” & Field & “””)”
If eval(TheString) Then
Execute(TheString)
Else
Response.Write “Internal Error (ReadFormVariables Function)”
End if
Next

 

Popular Links

Looking for more information on ASP? Search our Knowledge Base!

Interested in more articles about Coding? Navigate to our Categories page using the bar on the left or check out these popular articles:

Popular tags within this category include: CGI Scripts, Zend Optimizer, PIP, Python, and more.

Don’t see what you’re looking for? Use the search bar at the top to search our entire Knowledge Base.

 

The Hivelocity Difference

Seeking a better Dedicated Server solution? In the market for Private Cloud or Colocation services? Check out Hivelocity’s extensive list of products for great deals and offers.

With best-in-class customer service, affordable pricing, a wide-range of fully-customizable options, and a network like no other, Hivelocity is the hosting solution you’ve been waiting for.

Unsure which of our services is best for your particular needs? Call or live chat with one of our sales agents today and see the difference Hivelocity can make for you.

The post How Can I Place All Form Fields in to Variables in ASP? appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/how-can-i-place-all-form-fields-in-to-variables-in-asp/feed/ 0
How can I return a directory of current page in ASP? https://www.hivelocity.net/kb/how-can-i-return-a-directory-of-current-page-in-asp/ https://www.hivelocity.net/kb/how-can-i-return-a-directory-of-current-page-in-asp/#respond Sat, 13 Nov 2010 05:43:37 +0000 https://kb.hivelocity.net/?p=860 set FSO = server.createobject(“Scripting.Filesystemobject”) Full_ASP_FILE_PATH = server.mappath(Request.ServerVariables(“PATH_INFO”)) PATH_ONLY = Fso.GetParentFolderName(Full_ASP_FILE_PATH) Response.write “This ASP page is being run in the folder: ” & PATH_ONLY

The post How can I return a directory of current page in ASP? appeared first on Hivelocity Hosting.

]]>
set FSO = server.createobject(“Scripting.Filesystemobject”)
Full_ASP_FILE_PATH = server.mappath(Request.ServerVariables(“PATH_INFO”))
PATH_ONLY = Fso.GetParentFolderName(Full_ASP_FILE_PATH)
Response.write “This ASP page is being run in the folder: ” & PATH_ONLY

The post How can I return a directory of current page in ASP? appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/how-can-i-return-a-directory-of-current-page-in-asp/feed/ 0
Do you have a sample hello world test script for ASP.NET? https://www.hivelocity.net/kb/do-you-have-a-sample-hello-world-test-script-for-asp-net/ https://www.hivelocity.net/kb/do-you-have-a-sample-hello-world-test-script-for-asp-net/#respond Sat, 13 Nov 2010 05:32:58 +0000 https://kb.hivelocity.net/?p=849 Solution Simply save to file.aspx and view in browser: <%@ Page Language=”VB” %><%= “Hello World!” %>

The post Do you have a sample hello world test script for ASP.NET? appeared first on Hivelocity Hosting.

]]>
Solution

Simply save to file.aspx and view in browser: <%@ Page Language=”VB” %><%= “Hello World!” %>

The post Do you have a sample hello world test script for ASP.NET? appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/do-you-have-a-sample-hello-world-test-script-for-asp-net/feed/ 0
Can ASP run on my Linux server? https://www.hivelocity.net/kb/can-asp-run-on-my-linux-server/ https://www.hivelocity.net/kb/can-asp-run-on-my-linux-server/#respond Tue, 09 Nov 2010 12:57:44 +0000 https://kb.hivelocity.net/?p=630 Using the Chilisoft software, it is possible to run ASP scripts. These scripts can provide database connectivity, however they cannot reference custom COM objects.

The post Can ASP run on my Linux server? appeared first on Hivelocity Hosting.

]]>
Using the Chilisoft software, it is possible to run ASP scripts. These scripts can provide database connectivity, however they cannot reference custom COM objects.

The post Can ASP run on my Linux server? appeared first on Hivelocity Hosting.

]]>
https://www.hivelocity.net/kb/can-asp-run-on-my-linux-server/feed/ 0