asp-classic

How can I run sqlcmd.exe from an ASP page?

偶尔善良 提交于 2019-12-22 08:06:22
问题 As part of our database revision control (and auto-installation) procedures we need to be able run sqlcmd.exe on various .sql files from within an ASP page. The code I'm using to do this is: Dim cmd : cmd = "sqlcmd -S " & DATABASE_SERVER & " -U " & DATABASE_UID & " -P " & DATABASE_PWD & " -d " & DATABASE_NAME & " -i """ & scriptPath & """ -b" Dim wshShell : Set wshShell = Server.CreateObject("WScript.Shell") Dim return : return = wshShell.Run(cmd, 0, True) I have the code working on my

Authenticating Website Members as Users in CKFinder v3

旧巷老猫 提交于 2019-12-22 06:59:58
问题 Before beginning this question, I should point out that my knowledge of ASP.NET & C# is pretty much nil. I'm in the process of trying to integrate the ASP.NET version of CKFinder v3 into a site built in a different language and all is going well so far; I have everything setup as I want it and it's working when I grant unrestricted access to CKF but I'm stuck at the point now of trying to restrict access to it by authenticating only certain members of my site to use it. All the pages that

What to put in a session variable

扶醉桌前 提交于 2019-12-22 05:37:11
问题 I recently came across a ASP 1.1 web application that put a whole heap of stuff in the session variable - including all the DB data objects and even the DB connection object. It ends up being huge. When the web session times out (four hours after the user has finished using the application) sometimes their database transactions get rolled back. I'm assuming this is because the DB connection is not being closed properly when IIS kills the session. Anyway, my question is what should be in the

Mapping classic asp pages to .net in IIS

a 夏天 提交于 2019-12-22 05:28:12
问题 I'm trying to map requests for classic asp pages to be handled by .net, so that it runs through a custom httpmodule. In IIS I have remapped asp requests to aspnet_isapi.dll - I'm sure I've done this bit right Now in my test app I am getting this error: Server Error in '/TestASPRedirect' Application. -------------------------------------------------------------------------------- This type of page is not served. Description: The type of page you have requested is not served because it has been

How to redirect with ASP classic

五迷三道 提交于 2019-12-22 05:24:28
问题 I want to redirect from one URL to another: http://female.deals.com/ http://male.deals.com/ How can I achieve that with the URL changing to the new URL in the browser and with a page going straight to the new URL without going to the old URL and making a refresh? I looked through some scripts on the Internet and they didn’t work, I also don’t know ASP classic. So I am struggling to make that redirect work. 回答1: <% Response.Redirect "http://www.sitename.com" %> And plus for "all" the

What's the relation between classic asp and a IIS application pool?

醉酒当歌 提交于 2019-12-22 05:20:12
问题 Does asp run in the IIS application pool for which the website is configured? Or is the application pool only for asp.NET applications. How do those two relate to each other, what do i need to know to understand who's doing what and where are they doing it... 回答1: An ASP Classic application will run in the application pool to which it is assigned. ASP.NET application also run in their assigned application, hence its possible that one or more ASP.NET applications and one or more ASP

What is the difference between Dim and Public in Classic ASP?

99封情书 提交于 2019-12-22 04:26:34
问题 A question about scope was raised today and it got me thinking. I've always understood VBScript scope and how to declare Globally and Locally. It occurred to me though that I never use Public variables but tend to use Dim instead when declaring Globally. As far as I understood it Dim is the same as Public , but if that's the case why have both of them? Is there a difference between the two and is it good practice to use one over the other? Update: This question is aimed purely at VBScript,

How to check form submission ASP classic

丶灬走出姿态 提交于 2019-12-22 03:51:02
问题 I'm setting up a form in ASP classic and it will reload after submission (action self) But this time it shows results of previous submissions, so how can I check that a POST submission has been made? Like in PHP: if($_POST['submit']) { show results... } 回答1: You have several options: Method 1 - Check the request method: If Request.ServerVariables("REQUEST_METHOD") = "POST" Then 'Show Results... End If Method 2 - add a hidden field to your form with a value then check if that value has been

ZURB Foundation, switching tab programmatically

二次信任 提交于 2019-12-22 03:45:35
问题 Im using asp with foundation, is there anyway to switch between a tab to another using JS or ASP? Link (Simple tab). 回答1: A possible solution is to assign an id to the tab link and click it using jQuery. Given the following code excerpt, notice the id assigned to the anchor link... <dd><a href="#simple2" id="tabId">Simple Tab 2</a></dd> You could activate this link using this line of jQuery. $("#tabId").click(); 回答2: If you give the first tab and the first LI .active by default in the HTML,

ZURB Foundation, switching tab programmatically

三世轮回 提交于 2019-12-22 03:45:03
问题 Im using asp with foundation, is there anyway to switch between a tab to another using JS or ASP? Link (Simple tab). 回答1: A possible solution is to assign an id to the tab link and click it using jQuery. Given the following code excerpt, notice the id assigned to the anchor link... <dd><a href="#simple2" id="tabId">Simple Tab 2</a></dd> You could activate this link using this line of jQuery. $("#tabId").click(); 回答2: If you give the first tab and the first LI .active by default in the HTML,