asp-classic

How to set IIS website's default encoding?

孤人 提交于 2019-12-21 07:41:12
问题 My website is a combination of classic ASP and ASP.NET My pages' default encoding is currently ISO-8859-1 . Even if there's no <meta> tag, the response page will be encoded ISO-8859-1 . How to change it to UTF-8 ? 回答1: You could try adding the header to the HTTP Response Headers list for that site. If none is specified, it will be delivered in whatever the user agent requests, which is likely why you're seeing the ISO-8859-1 "Properties" => "HTTP Headers" => "File Types..." => "New Type...".

XML output parameters with ADODB in ASP Classic

假如想象 提交于 2019-12-21 06:57:39
问题 I found this error looking for a solution to a problem of retrieving XML at ASP classic: Declaring XML output parameters with ADODB in ASP Classic I have the same error working with Classic ASP and SQL Server 2003. I used to work with a .dll in VB6, where I could get the XML code. But now I need to do it from SQL direct to ASP. Did you manage to solve it? My code in classic ASP so far is: set objCommandoOP = Server.CreateObject("ADODB.Command") Set objCommandoOP.ActiveConnection = objConexion

Upload/Download File using REST or Web Services

纵饮孤独 提交于 2019-12-21 06:08:31
问题 Is it possible to Upload/Download a file using REST or any other Web Service and send HTML code? This has to be possible using: PHP, Java or ASP. 回答1: I think this will be helpful. At least when it comes to Java. Actualy, have a look at whole tutorial Here is an example how to do it by using Spring: Add commons-io and commons-fileupload dependencies to your pom.xml . Configure multipart resolver in your servlet context xml file: <beans:bean id="multipartResolver" class="org.springframework

How to send Outlook tasks requests by mail without Outlook?

佐手、 提交于 2019-12-21 05:04:08
问题 I need to replicate the Outlook feature/functionnality to send some tasks requests to someone (see here) but with mails sent from a webserver using ASP.NET C# and without Outlook installed on the webserver (thus using outlook automation is not possible). I already check what are the possiblities to do this, and it seems a common way to send tasks to someone is to generate an .ics file in iCalendar format, and include that file to the mail (see this stackoverflow question). It works great,

Using SQLite with Classic ASP

为君一笑 提交于 2019-12-21 04:43:14
问题 I am building a "quick little" app which needs a small database. I want to use Classic ASP (i.e. not ASP.NET), and I am wondering about SQLite for the database. It is possible to use SQLite from Classic ASP? How do I open / create / use a SQLite database from ASP? Any help / pointers gratefully recieved! 回答1: It is easily possible. First install the ODBC driver from http://www.ch-werner.de/sqliteodbc/ Then you can connect with e.g. DRIVER=SQLite3 ODBC Driver;Database=mydb.sqlite;LongNames=0

Unit Testing for VBScript, ASP Code and SQL Server 2000

隐身守侯 提交于 2019-12-21 04:29:09
问题 I have a very old project implemented in (classic) ASP and SQL Server 2000. Because of quality concerns, I've been considering the possibility of implementing some form of automated quality testing. Though, the web pages are ASP the project is really 85% SQL Server stored procedure, functions, views and DTS. (Lots of dependency on DTS) A lot of code generation occurs from SQL Server. In regards to the DTS, we are hoping to possibly upgrade the database to SQL Server 2005 -- so If unit testing

What does (?: do in a regular expression

眉间皱痕 提交于 2019-12-21 03:41:17
问题 I have come across a regular expression that I don't fully understand - can somebody help me in deciphering it: ^home(?:\/|\/index\.asp)?(?:\?.+)?$ It is used in url matching and the above example matches the following urls: home home/ home/?a home/?a=1 home/index.asp home/index.asp?a home/index.asp?a=1 It seems to me that the question marks within the brackets (?: don't do anything. Can somebody enlighten me. The version of regex being used is the one supplied with Classic ASP and is being

How to get Custom Error Pages working for Classic ASP with IIS 7 Integrated Pipeline

我们两清 提交于 2019-12-21 02:46:16
问题 I'm working on a website with legacy Classic ASP pages (being converted to ASP.NET on an as needed basis) and new ASP.NET pages. Use of IIS 7 Integrated Pipeline has been very helpful with our configuration. For example, we were able to get forms authentication working auto-magically with the classic ASP pages simply by configuring the appropriate sections of the web.config file (i.e. no changes were required to the Classic ASP pages, for more info see this). A colleague of mine believes that

get current url of the page (used URL Rewrite)

笑着哭i 提交于 2019-12-20 19:47:45
问题 I am working on classic asp application. I have use URL rewrite on some pages. How can i get current url of the page in classic asp? Example: http://www.site.com/page.asp ---> url rewrite in IIS ---> http://www.site.com/home/page so here i want current url of the page which is http://www.site.com/home/page Please help me. Thanks. 回答1: You can try to output all ServerVariables like so: for each key in Request.Servervariables Response.Write key & " = " & Request.Servervariables(key) & "<br>"

ASP/VBScript - Int() vs CInt()

半城伤御伤魂 提交于 2019-12-20 18:02:06
问题 What is the difference in ASP/VBScript between Int() and CInt() ? 回答1: Int() The Int function returns the integer part of a specified number. CInt() The CInt function converts an expression to type Integer. And the best answer comes from MSDN CInt differs from the Fix and Int functions, which truncate, rather than round, the fractional part of a number. When the fractional part is exactly 0.5, the CInt function always rounds it to the nearest even number. For example, 0.5 rounds to 0, and 1.5