asp-classic

How to check if a POST submitted field exists in VBScript?

蹲街弑〆低调 提交于 2019-12-29 01:38:07
问题 After a form is submitted, how does one check server-side if a particular field exists? For example: If [Exists] Request("FieldName") Then ... End If 回答1: Check if it's not empty. There are a few different ways, but the one I've seen more frequently used is along the lines of: If Request("FieldName") <> "" Then 'etc. End If I usually explicitly check the Form and QueryString collections with some variation of one of the code below if I may be getting the variable from one or the other

ASP to ASP.NET Session Variables

三世轮回 提交于 2019-12-28 17:44:54
问题 We have a website in classic asp that we are slowly migrating to ASP.NET as necessary. The problem of course is how classic asp and ASP.NET handle Sessions. After spending the last few hours researching the web, I found many articles, but not one that stood out over the others. Is there a best practice for transferring session variables from and to classic asp and asp.net? Security is a must and any explanation with examples is much appreciated. 回答1: A simple bridge to pass a single session

Execute Stored Procedure from Classic ASP

青春壹個敷衍的年華 提交于 2019-12-28 13:54:49
问题 For some fantastic reason I find myself debugging a problem in a Classic ASP page (at least 10 years of my life lost in the last 2 days). I'm trying to execute a stored procedure which contains some OUT parameters. The problem is that one of the OUT parameters is not being populated when the stored procedure returns. I can execute the stored proc from SQL management studio (this is 2008) and all the values are being set and returned exactly as expected. declare @inVar1 varchar(255) declare

IIS7 - only serves up one page at a time. It's a making me crAzY!

橙三吉。 提交于 2019-12-28 12:03:45
问题 Situation: Classic ASP application, using a custom Application Pool. Default settings. On some IIS7 machines, IIS decides to serve only one page at a time. So if multiple load any pages from a site, each one has to load in succession. e.g. If I load http://foo.com/default.asp from one browser, and from another machine I load http://foo.com/differenturl.asp, the first has to finish before the other will load. It's almost like the w3p process is single threaded. Note, there is a setting called

Get the type of a variable in VBScript

浪子不回头ぞ 提交于 2019-12-28 11:49:10
问题 How do I get the type of a variable using VBScript? 回答1: Is VarType what you need? Returns a value indicating the subtype of a variable. +--------------+-------+---------------------------------------------+ | Constant | Value | Description | +--------------+-------+---------------------------------------------+ | vbEmpty | 0 | Empty (uninitialized) | | vbNull | 1 | Null (no valid data) | | vbInteger | 2 | Integer | | vbLong | 3 | Long integer | | vbSingle | 4 | Single-precision floating

Accessing a request's body using classic ASP?

≯℡__Kan透↙ 提交于 2019-12-28 06:25:13
问题 How do I access what has been posted by a client to my classic ASP server? I know that there is the Request.Forms variable, but the client's request was not made using a Form. The client request's body is just a string made using a standard POST statement. Thanks 回答1: You need to read request bytes if content type of request sent by client is not form data. In this case, request is not a form-data that is accessible through name-value pairs so you cannot use Request.Form collection. I suggest

Classic ASP and ASP.NET Integration

风流意气都作罢 提交于 2019-12-28 05:52:13
问题 In a previous job we had a classic ASP application that no one wanted to migrate to ASP.NET. The things that it did, it did very well. However there was some new functionality that needed to be added that just seemed best suited to ASP.NET. The decision was made to allow the system to become a weird hybrid of ASP and ASP.NET. Our biggest sticking point was session management and we hacked together a solution to pass session values through form variables. I've talked to others that handled

Is codepage 65001 and utf-8 the same thing?

十年热恋 提交于 2019-12-28 05:16:40
问题 <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!--#include file="conn.asp"--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Is the above code right? 回答1: Yes. UTF-8 is CP65001 in Windows (which is just a way of specifying UTF-8 in the legacy codepage stuff). As far as I read ASP can handle UTF-8 when

How do I enable upload of large files in classic ASP on IIS 7?

霸气de小男生 提交于 2019-12-28 01:55:59
问题 Recently I had to get an old ASP application working in IIS 7.5 on a W2K8 server. Almost everything works fine, except that I can't seem to get it to accept uploads larger than ~200kB. I did find a setting, that from what I can understand should to the trick, in the applicationHost.config, I set the max request size to 100 MB like this: <location path="TheNameOfMySite"> <system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="104857600" /> </requestFiltering> <

How do I create a document on the server by running an existing storedprocedure or the sql statement of that procedure on a R2008 sql server

纵饮孤独 提交于 2019-12-26 03:47:10
问题 I have an application that runs a stored procedure which generates the results of a dynamic form. the same procedure is used for many forms which would then have different columns. I want to call a stored procedure to run the existing stored procedure and dump the results to a newly created document on the server and return the path to the file. from the asp classic program side I can then generate a link for download of the report. Something like the following might have worked on the older