asp-classic

How do I set the character set using XMLHttp Object for a POST in classic ASP?

浪子不回头ぞ 提交于 2019-12-07 15:46:26
问题 I have to use the XMLHttp object in classic ASP in order to send some data to another server via HTTP from server to server: sURL = SOME_URL Set oXHttp = Server.CreateObject("Msxml2.XMLHTTP") oXHttp.open "POST", sURL, false oXHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset:ISO-8859-1;" sPost = SOME_FORM_DATA oXHttp.send(sPost) I've been told (by the maintainer of the consuming server) that, depending on whether I use this code from Windows Server 2000 (IIS 5)

Login to ASP website before using PHP Simple HTML DOM Parser

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 15:24:38
问题 I am using "PHP Simple HTML DOM Parser" to parse data from a gaming ASP website. The data that i need to grab are only visible to registered users so i need something to log me in to site before start using it. Can someone suggest me a script or something which it can do this ? Thanks a lot in advance! 回答1: First, you should post with: <?php function do_post_request($url, $data, $optional_headers = null) { $params = array('http' => array( 'method' => 'POST', 'content' => $data )); if (

how to set Visual Studio 2012 to use JavaScript editor for asp files

 ̄綄美尐妖づ 提交于 2019-12-07 14:57:22
问题 How can I tell Visual Studio 2012 to recognize Classic ASP files (extension .asp) as JavaScript? I have registered .asp extension to Script Editor. That used to do the trick in 2010, but doesn't help here. It seems like VS doesn't know what language to use for Script Editor. There is no keyword highlighting, no intelicense. 回答1: This can be changed by adding the extension asp with the editor HTML Editor : Tools -> Options -> Text Editor -> File Extension For Extension type: asp Select the

In Classic asp, can I store a database connection in the Session object?

元气小坏坏 提交于 2019-12-07 14:42:33
问题 Can I store a database connection in the Session object? 回答1: It is generally not recommended to do so, a connection string in the Application variable, with a nice helper function/class is a much preferred method. Here is some reference. (Dead link removed because it now leads to a phishy site) 回答2: I seem to recall doing so will have the effect of single threading your application which would be a bad thing. 回答3: In general, I wouldn't store any objects in Application variables (and

Classic ASP & ASP.Net Authentication

允我心安 提交于 2019-12-07 14:26:36
问题 I have two separate apps (one is classic asp, the other is asp.net) which, from the point of view of the user, should appear seamlessly as one "application". As others have pointed out, the two apps can't share session information, so I am planning to use windows authentication along these lines:- In the ASP world: Request.ServerVariables("AUTH_USER") and in ASP.Net (.Net 2.0): System.Threading.Thread.CurrentPrincipal.Identity.Name which is called from my business logic layer (i.e.

classic asp - reading csv file having alphanumeric data

ⅰ亾dé卋堺 提交于 2019-12-07 13:51:31
问题 I'm having trouble in reading csv file that are having alphanumeric data. below is my code in classic asp: strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _ ls_map_path & ";Extended Properties=""Text;HDR=Yes;FMT=Delimited"";" Set lo_conn = Server.CreateObject("ADODB.Connection") lo_conn.Open strConn Set lo_rs = Server.CreateObject("ADODB.recordset") lo_rs.CursorLocation = adUseClient lo_rs.open "SELECT * FROM " & as_file_name, lo_conn, adOpenStatic, adLockOptimistic, adCmdText and

Running ASP Classic and .NET on Linux

断了今生、忘了曾经 提交于 2019-12-07 13:35:42
问题 I'm looking at a product that was coded in a mix of .NET and ASP Classic. I'm wondering if it's possible to get this running in Linux? I've heard of Mono (which can supposedly run .NET on Linux) and Sun Java Web Server (which can supposedly run ASP Classic on Linux). Are there any other technologies that you would recommend? Also, are there any major pitfalls that I should be aware of? 回答1: Mono works great for ASP.NET. They have an entire site dedicated to ASP.NET on Mono. Probably the best

ASP formatting date

流过昼夜 提交于 2019-12-07 12:36:55
问题 Hello there I'm trying to get a date in ASP to show up in a particular format (yyyymmdd). This is what I've tried so far but no luck. Any help is appreciated. Thanks <tr> <td><b>Call Date</b></td> <% for i = -6 to 0 %> <td align=center> <a href="20a.asp?cldate=<% response.write(DateTime.Date()+i.ToString("yyyyMMdd")) %>" target="_blank">X</a> </td> <% Next %> </tr> 回答1: You can make use of the following functions: Year(Now) '' Year in 4 digits Month(Now) '' Month without leading zero Day(Now)

ASP “Operation not Allowed” error occured while eecute Request.Form method

人走茶凉 提交于 2019-12-07 11:15:42
问题 I have run the following script for increase the file size for upload E:\inetpub\adminscripts cscript adsutil.vbs set w3svc/ASPMaxRequestEntityAllowed size After running the command.I am getting this error... Request object error 'ASP 0104 : 80004005' Operation not Allowed /ewqms370/common/indexintermediate.asp, line 63 ...for this code here: strUserName=Replace(Request.Form("txtUserName"),"'","''") Can anyone see something wrong??? 回答1: What value did you se the AspMaxRequestEntityAllowed

Opening a new window create a new session

此生再无相见时 提交于 2019-12-07 10:23:18
问题 We are upgrading a web-based software from Windows XP with Internet Explorer 6 to Windows 7 with Internet Explorer 9. Furthermore, a webbrowser object is used inside a WPF application. We now have a strange behavior, when opening a window with a url (with an instruction like window.open(url)), the ASP session is "lost" and the new window works with a new from scratch session. I solved this issue by avoiding useless windows opening and instead, I modify the location of the current window. But