asp-classic

Forcing IE To display word document in browser

自闭症网瘾萝莉.ら 提交于 2019-12-08 04:03:52
问题 We have an ASP Classic application that provides document management. We have a fetch page that fetches the document from SAN storage and delivers it to the user, based on whether or not they are logged in. With IE6 and Word 2000 (when I wrote the code :)) The word documents displayed in the browser. Now, with IE8 and Word 2010 installed, we are always prompted to open/save the document. We: Set the mimetype (Response.ContentType = GetMIMEType(basename)) Set the charset (REsponse.Charset = ""

Specify target columns on import (CSV to Access)

孤街浪徒 提交于 2019-12-08 03:58:00
问题 I've found out how to import a CSV into my Access database via another question. But in the answer there is no information on how to target specific columns upon import. How can I be sure that the correct columns from the CSV get placed into the correct columns in my database? I need to be able to edit/add-to the column values as they get imported using classic ASP . Examples: The 4th column in the CSV is a userid, I need to be able to add "@domain.com" to the end as it enters the database

asp classic how to trap errors when connecting to an oracle linked server

ぐ巨炮叔叔 提交于 2019-12-08 03:49:30
问题 I have a query in classic ASP like this: sql_test="select * from Openquery(it_test, 'select * from IT_DB.HOST') the problem is that I want to test the connection to the linked server before executing it and getting an error on the page. If the connection to the linked server doesn't work (ex: db down) I can execute a query on the local SQL server 2000 db avoiding getting an error on the page. 回答1: I tend to use this code... 'GetDataSet error columns... const C_ERROR = "ERROR" 'Used when an

Uploading in ASP to IIS 5.1

和自甴很熟 提交于 2019-12-08 03:31:00
问题 First - I know XP isn't great at hosting, but as the site is only for my personal use, and I already have an XP licence, that's what I'm using... I'm using the pure asp upload script from link text to upload images to a website hosted on a Windows XP Pro pc. The upload script works great on other sites I have developed but these were all using IIS 6 or above. The problem I'm having is uploading files bigger than about 200K. There is a Microsoft support page link text that seems to answer my

Send a JSON string to a RESTful WS from Classic ASP

橙三吉。 提交于 2019-12-08 03:30:19
问题 I am basically a noob in classic ASP and VBScript, so I would like to get some help to achieve the goal I have here. I've built a JSON string and I need to send it to a RESTful web service using VBScript. How do I do that? I have some code, but I don't think it works: strJSONToSend = JSONstr 'this is where I use my built JSON string webserviceurl = "url here" Set objRequest = Server.createobject("MSXML2.XMLHTTP.3.0") objRequest.open "POST", webserviceurl, False objRequest.setRequestHeader

How to see the actual server side error message in the browser?

半城伤御伤魂 提交于 2019-12-08 02:53:38
问题 I'm having a trouble reproducing an issue a user is having in IE, but something that always bugged me is how can I see the error message from classic ASP page in IE for example on a dev server. In IE all I see is for example: This page contains programming error And that's it. Note: since this is server side, it applies to all browsers. 回答1: I remember this one! You need to go into ie settings > advanced > uncheck "show friendly http errors" 回答2: Is the problem just in IE? anyway i found this

How to use Geocoding API v3 in Classic ASP

淺唱寂寞╮ 提交于 2019-12-08 02:29:21
问题 wondering if anyone could help me. I'm trying to return the results of lat and lng of an address. New to coding and have got stuck. The following code worked fine until the Geocoding went from v2 to v3. Can you tell me where I'm going wrong? and do I need a new v3 key or key at all? Thanks in advance. <% Function GetXML(url) Dim xmlobj Set xmlobj = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") xmlobj.setTimeouts 30000, 30000, 30000, 30000 xmlobj.Open "GET", url, False xmlobj.send() If

HTML inside XML CDATA being converted with < and > brackets

北慕城南 提交于 2019-12-08 01:22:37
问题 I have some sample XML: <sample><![CDATA[Line 1<br />Line 2<br />Line 3<br />]]></sample> I'm using ASP to output this XML using a stylesheet like so: Set xmlHttp = Server.CreateObject("Microsoft.XMLHTTP") xmlHttp.open "GET", URLxml, false xmlHttp.send() Set xslHttp = Server.CreateObject("Microsoft.XMLHTTP") xslHttp.open "GET", xXsl, false xslHttp.send() Set xmlDoc = Server.CreateObject("MICROSOFT.XMLDOM") Set xslDoc = Server.CreateObject("MICROSOFT.XMLDOM") xmlDoc.async = false xslDoc.async

Making a HTTP request to API possible with VB/ASP classic?

混江龙づ霸主 提交于 2019-12-08 01:03:43
问题 Is it possible to make requests to a Web API with ASP classic? For example just something as simple as the Flickr API, or was this sort of thing not supported way back when? 回答1: It's quite possible: Dim req Set req = Server.CreateObject("MSXML2.ServerXMLHTTP") req.open "GET", "http://blabla.com", False req.send() Response.Write(req.responseText) You should be able to find examples of how to parse XML and JSON here on stackoverflow.com 来源: https://stackoverflow.com/questions/2883444/making-a

Rewrite Rule to Rewrite All EXCEPT File Extension

此生再无相见时 提交于 2019-12-08 00:38:52
问题 I've got a rule setup to rewrite everything going into a subdirectory like so: <rule name="Forms Directory" stopProcessing="true"> <match url="^forms/(.*)" /> <action type="Redirect" url="forms.htm" redirectType="Permanent" /> </rule> However, I want to make a slight change to allow it to access an ASP file in the forms folder. So I want to keep the same rule but exclude any .asp from matching the rule. I tried the following but couldn't get it to operate as expected: <rule name="Forms