asp-classic

Running both .NET and classic ASP locally using IIS7

Deadly 提交于 2019-12-10 11:58:24
问题 I have a windows 7 development machine, and my legacy application uses both ASP.NET and classic ASP. What can I configure IIS7 so I can run this application locally? Currently anytime I need to test ASP code changes, I have to push to a different server. 回答1: We do this at work. We found that you cannot share classic asp and .Net application pools. So make sure that your classic and .Net sites use different application pools. Configure a classic pool to have "No Managed Code" under .Net

Looping through JSON using ASPJSON

陌路散爱 提交于 2019-12-10 11:57:13
问题 I am using Classic ASP and ASPJSON (http://www.aspjson.com/) to try to loop through JSON test data returned via a Mandrill Webhook. This is the sample JSON data - I realise the 2nd block is the same as the first, but I need to use it since when I do this on the live system the webhook data will be returned in batches in a single JSON file / post. { "event":"hard_bounce", "msg":{ "ts":1365109999, "subject":"This an example webhook message", "email":"example.webhook@mandrillapp.com", "sender":

Search based on matched criteria

試著忘記壹切 提交于 2019-12-10 11:54:54
问题 I'm using the following query to return all records where at least 2 conditions match (provided by Quassnoi). SELECT * FROM ( SELECT ContentID FROM ( SELECT ContentID FROM VWTenantPropertiesResults WHERE ContentStreet = 'Holderness Road' UNION ALL SELECT ContentID FROM VWTenantPropertiesResults WHERE ContentTown = 'Hull' UNION ALL SELECT ContentID FROM VWTenantPropertiesResults WHERE ContentPostCode = 'HU' ) qi GROUP BY ContentID HAVING COUNT(*) >= 2 ) q JOIN VWTenantPropertiesResults r ON r

CDO.Message .Send causes script execution timeout

别等时光非礼了梦想. 提交于 2019-12-10 11:43:59
问题 I have the following code: Set myMailanon = CreateObject("CDO.Message") myMailanon.MimeFormatted = True Set myConfanon = Server.CreateObject("CDO.Configuration") Set objBPanon = myMailanon.AddRelatedBodyPart("http://www.foo.bar/img/logo1.jpg", "http://www.foo.bar/img/logo1.jpg", CdoReferenceTypeName) objBPanon.Fields.Item("urn:schemas:mailheader:Content-ID") = "<http://www.foo.bar/img/logo1.jpg>" objBPanon.Fields.Update ConfURLanon = "http://schemas.microsoft.com/cdo/configuration/" with

Does ASP(VBScript) have a function similar to PHP's ini_get?

落爺英雄遲暮 提交于 2019-12-10 11:26:10
问题 I am converting a File Upload PHP script to ASP. The PHP script gets the post_max_size variable from php.ini with ini_get(). $POST_MAX_SIZE = ini_get('post_max_size'); First, is there a similar file or methodology employed by IIS or .NET. If there is, is there a similar variable that controls the max post size. And assuming both of those are true, is there something similar in ASP(VBScript) that can pull the variable from IIS or .NET? I am not an ASP developer, so I am at a complete loss. Any

Classic ASP Server.MapPath() doesn't work as expected in global.asa

浪尽此生 提交于 2019-12-10 11:23:34
问题 In Classic ASP, Server.MapPath() doesn't always work properly in the Application_OnStart event within global.asa . I have an ASP page at "\testfolder\test.asp" within a virtual root, I have an XSLT file at "\xsl\transform.xsl" . My virtual root is located in "c:\inetpub\wwwroot\testapp\" . I use MapPath within the ASP page to get the full path to the XSLT file. The call is: sXslPath = Server.MapPath("xsl\transform.xsl") Some times MapPath returns "c:\inetpub\wwwroot\testapp\xsl\transform.xsl"

Classic ASP using C# .net DLL Object doesn't support this property or method

旧城冷巷雨未停 提交于 2019-12-10 11:09:15
问题 Hey all this is my first time creating a COM object for a classic asp page. The process I followed when creating this COM DLL is this: 1) Used the Strong Name Tool (sn.exe) and placed the .snk file within the app. (sn -k myKey.snk) 2) Added: [assembly: AssemblyKeyFile(@"myKey.snk")] [assembly: ComVisible(true)] to the AssemblyInfo.cs. I do get a warning on the KeyFile saying: Use command line option '/keyfile' or appropriate project settings instead of 'AssemblyKeyFile' 3) Ran the following

WinHttp errors on option 9 / Win2008 / Classic ASP

痴心易碎 提交于 2019-12-10 10:15:55
问题 The Server I am connecting to requires TLS 1.1. My attempts fail. I am on a Windows Server 2008 R2 Standard SP1 64bit machine using Classic ASP. Here is my code: const WinHttpRequestOption_SecureProtocols = 9 const SecureProtocol_TLS1_1 = 512 dim objHTTP set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1") No error: objHTTP.Option(9) = 128 'No error: objHTTP.Option(9) = &H80 'Errors right here: objHTTP.Option(WinHttpRequestOption_SecureProtocols) = SecureProtocol_TLS1_1 'Errors right here

Error when accessing cookies when a cookies without a name exists

不问归期 提交于 2019-12-10 10:08:55
问题 On a few of the Classic ASP websites I manage for the last few days I have been getting some error notifications (with no error number) that always show an error on a line number where a cookie value is being requested. Looking at the request for each of these errors, they all have unusual cookies, and look like some sort of hack attempt. The lines that are indicated as causing the error are all like this: strCookieCart = Request.Cookies("cart") Here's a couple of samples of the cookies being

Write ASP-style cookie (with keys) using Javascript; read using classic ASP

有些话、适合烂在心里 提交于 2019-12-10 09:42:09
问题 In Classic ASP, a single cookie can be a collection of name/value pairs. For instance, a cookie collection named "user" could be created to have keys which contains information about a user: ("user")("firstname")="John" ("user")("lastname")="Smith" ("user")("country")="Norway" ("user")("age")="25" Is it possible to write that kind of cookie using Javascript, so that ASP would recognize it and parse it accordingly? 回答1: Should be doable. Your asp example would make a cookie that would look