asp-classic

How can I use Javascript OO classes from VBScript, in an ASP-Classic or WSH environment?

筅森魡賤 提交于 2019-12-18 09:26:08
问题 I know I can call top-level functions defined in JS from VBScript, and vice versa, like this: <%@ language="Chakra" %> <script language='JavaScript' runat='server'> function jsFunction1() { for (var i=0;i<10;i++) Response.Write(i+"<br>"); vbFunction2(); } </script> <script language='VBScript' runat='server'> Sub vbFunction1 () Response.Write("VB Hello <br/>" & VbCrLf) jsFunction1() End Sub Sub vbFunction2 () Response.Write("VB Goodbye <br/>" & VbCrLf) End Sub </script> <script language=

Can't run exe from classic ASP script on IIS 7.5

半城伤御伤魂 提交于 2019-12-18 09:03:04
问题 I am attempting to upgrade an existing system from Windows XP Professional / IIS 5.1 to Windows 7 Ultimate (32-bit) / IIS 7.5. The original system ran a classic ASP website (only available to the localhost) that used 'ASPExec' to launch desktop applications on the local machine (.bat, .cmd, .exe, etc). Under Windows 7 Ultimate / IIS 7.5, the applications fail to launch from the ASP page. As tests (The end goal is not to launch notepad), I have tried: <% Set Executor = Server.CreateObject(

Stored Procedure failing on a specific user

ぐ巨炮叔叔 提交于 2019-12-18 08:55:19
问题 I have a Stored Procedure that is constantly failing with the error message "Timeout expired," on a specific user. All other users are able to invoke the sp just fine, and even I am able to invoke the sp normally using the Query Analyzer--it finishes in just 10 seconds. However with the user in question, the logs show that the ASP always hangs for about 5 minutes and then aborts with a timeout. I invoke from the ASP page like so " EXEC SP_TV_GET_CLOSED_BANKS_BY_USERS '006111' " Anybody know

Implement object-caching in classic ASP memory-leaking

天涯浪子 提交于 2019-12-18 07:10:09
问题 I have tried to implement different caching-implementations in a classic ASP site in order to offload the database during heavy traffic. My approach was this: Create a global HashTable object in global.asa where I later on store jscript-objects within <object id="SIZE_LIST" progid="System.Collections.HashTable" runat="Server" scope="Application"></object> This gives me a global HashTable-object that I at certain time-intervals replace the content of the HashTable. The size will only vary

Implement object-caching in classic ASP memory-leaking

a 夏天 提交于 2019-12-18 07:10:09
问题 I have tried to implement different caching-implementations in a classic ASP site in order to offload the database during heavy traffic. My approach was this: Create a global HashTable object in global.asa where I later on store jscript-objects within <object id="SIZE_LIST" progid="System.Collections.HashTable" runat="Server" scope="Application"></object> This gives me a global HashTable-object that I at certain time-intervals replace the content of the HashTable. The size will only vary

Classic ASP Integrated Security in connection string

不想你离开。 提交于 2019-12-18 06:56:26
问题 I have old classic ASP application (not asp.net) that I need to configure to use Microsoft SQL Server 2008. It works well with following config string: SERVER=myServer;DRIVER=SQL SERVER;DATABASE=myDatabase;UID=sa;PWD=somepass But I need to use integrated security. But got error in any types of declaration that I tried. Something like that and a lot of variations don't work: SERVER=myServer;DRIVER=SQL SERVER;DATABASE=myDatabase;Integrated Security=SSPI; So my question is: how connection string

How to execute a bat file from a classic asp page on the server

↘锁芯ラ 提交于 2019-12-18 06:11:31
问题 I have a simple bat file that runs an access macro when executed, i need to know how to execute this bat file from a asp page, i have given all the permissions to the iusr_machinename for that particular folder containing the script file and the asp file. Thank you Note: I don't want to run anything on the client system, i just want to run a bat file on the same system the asp application is running 回答1: Assuming you understand the security implications of doing this, the code is as simple as

How to execute a bat file from a classic asp page on the server

早过忘川 提交于 2019-12-18 06:10:11
问题 I have a simple bat file that runs an access macro when executed, i need to know how to execute this bat file from a asp page, i have given all the permissions to the iusr_machinename for that particular folder containing the script file and the asp file. Thank you Note: I don't want to run anything on the client system, i just want to run a bat file on the same system the asp application is running 回答1: Assuming you understand the security implications of doing this, the code is as simple as

How to return a JSON object in classic ASP

喜夏-厌秋 提交于 2019-12-18 05:45:05
问题 I want to return a JSON object using a classic ASP script (it's part of an AJAX request). If I just send the reponse as text like: response.write("{ query:'Li', suggestions:['Liberia','Libyan Arab Jamahiriya','Liechtenstein','Lithuania'], data:['LR','LY','LI','LT'] }") will this work, or do I actually need a JSON library? Edit: I'm trying to get the autocomplete plugin at http://www.devbridge.com/projects/autocomplete/jquery/#howto to work. javascript: $(document).ready(function() { var a = $

Catching a tab close event in web browser?

强颜欢笑 提交于 2019-12-18 05:07:09
问题 Is there any way of knowing if the user closes a tab in a web browser? Specifically IE7, but also FireFox and others as well. I would like to be able to handle this situation from our asp code if the current tab containing our web site closes. 回答1: Attach an "onbeforeunload" event. It can execute code just before the browser/tab closes. 回答2: onbeforeunload also gets called on the following events - * Close the current browser window. * Navigate to another location by entering a new address or