Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About joecool2005

  • Rank

Contact Methods

  • ICQ
  1. Hi, In ASP classic, when I call "request.form", my application crashes. I'm using Windows Server 2012 R2 with IIS 8.5. But in Windows 7 with IIS 7.5, the same code works. Here's my code <html> <head> <% response.write(request.form("fname")) response.write(" " & request.form("lname")) %> </head> <body> <form method="post" action="simpleform.asp"> First Name: <input type="text" name="fname"><br> Last Name: <input type="text" name="lname"><br><br> <input type="submit" value="Submit"> </form> </body> </html> Please help thanks
  2. Cookie without HttpOnly flag set

    Hi, I have more than a 1000 files of asp files. How do you to set the HttpOnly flag on all cookies? Sometimes cookies are generated by the apps. Thanks
  3. Response.AddHeader Set-Cookie

    Hi, I have a cookie with specific key like this Response.Cookies("user")("firstname")="John"Response.Cookies("user")("Lastname") ="Smith"Response.Cookies("user").Path = "/"&"; HttpOnly"Response.Cookies("user").Secure = TrueResponse.Cookies("user").Expires = DateAdd("m",15,Now()) How do you use Response.AddHeader when the cookie "user" has multiple keys? I want the cookie in mode HttpOnly and secure=true. Thanks
  4. HttpWebRequest the spaces are not preserved

    Hi, In this code Dim email As String = "this is a test" Dim password As String = "YOUR PASSWORD" Dim URLAuth As String = "http://test.ca/webrequest.asp" Dim postString As String = "inputEmailHandle=this is a test&inputPassword=" + password Dim byteArray As Byte() = Encoding.UTF8.GetBytes(postString) Const contentType As String = "application/x-www-form-urlencoded" System.Net.ServicePointManager.Expect100Continue = False Dim cookies As New CookieContainer() Dim webRequest__1 As HttpWebRequest = TryCast(WebRequest.Create(URLAuth), HttpWebRequest) webRequest__1.Method = "POST" webRequest__1.ContentType = contentType webRequest__1.CookieContainer = cookies webRequest__1.ContentLength = byteArray.Length webRequest__1.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2008070208 Firefox/3.0.1" webRequest__1.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" webRequest__1.AllowAutoRedirect = True webRequest__1.Referer = "https://www.google.ca/" Dim requestWriter As Stream = webRequest__1.GetRequestStream() requestWriter.Write(byteArray, 0, byteArray.Length) requestWriter.Close() Dim resp As WebResponse = webRequest__1.GetResponse() Response.Write(CType(resp, HttpWebResponse).StatusDescription) requestWriter = resp.GetResponseStream() Dim responseReader As New StreamReader(requestWriter) Dim responseData As String = responseReader.ReadToEnd() Response.Write(responseData + "---") responseReader.Close() requestWriter.Close() webRequest__1.GetResponse().Close() Instead of displaying "this is a test" is displays "thisisatest"Any idea why the spaces are not preserved? Thx
  5. cookie HttpOnly global.asa

    After the cookie is set in global.asa, I added this in asp file<meta http-equiv="content-type" content="text/html; charset=UTF-8">and it still showed me path=/%3B%20HttpOnly
  6. cookie HttpOnly global.asa

    Is it possible to add value into cookie dynamically in global.asa?I want to set the cookie before the application start.
  7. cookie HttpOnly global.asa

    Hi, In global.asa when I create a cookie with HttpOnly like this Response.Cookies("mycookie")("x") = "abc";Response.Cookies("mycookie").Path ="/; HttpOnly") it displayed me this path=/%3B%20HttpOnly How can I fix this in global.asa? ThxJoe
  8. Trouble with left join

    Hi, In the following query select o.Price, t1.EnglishMessage from Products p, OrderItems o LEFT JOIN TranslateMessage t1 ON p.ProductName= t1.TranslateMessageIDwhere p.ProductID = o.ProductID and o.OrderId=62 I got the following errorThe multi-part identifier "p.ProductName" could not be bound. Sounds like it does not like when I use more than one table.Any solution? Thx
  9. anchor in firefox

    Ok I found my error. In my code I had this <tr><a name="T4RSP"></a> <td><b>T4RSP</b> - RRSP Income</td> <td> <a href="java script:void(0);" onclick="searchTOC('Q2PENS*', 'G92E8');"><IMG src='../pic/fix.gif' border='0' title='Let's go'> Pension income and T4A</a></td> <td>Tick <i>Income from pension or T4A </i> in the <a href="java script:void(0);" onclick="searchTOC('PREINT*', '');">Interview setup</a>. </td> </tr> it should be this <tr> <td><a name="T4RSP"></a><b>T4RSP</b> - RRSP Income</td> <td> <a href="java script:void(0);" onclick="searchTOC('Q2PENS*', 'G92E8');"><IMG src='../pic/fix.gif' border='0' title='Let's go'> Pension income and T4A</a></td> <td>Tick <i>Income from pension or T4A </i> in the <a href="java script:void(0);" onclick="searchTOC('PREINT*', '');">Interview setup</a>. </td> </tr> <a name="T4RSP"></a> was in the wrong place. Sounds like FF is more sensitive. Now it's workingThanks for you helpJoe
  10. anchor in firefox

    I'm using FF 4.0. Instead of scrolling down in the right section, it always stays at the top.
  11. anchor in firefox

    Hi,Why this anchor works in Internet Explorer but not in Firefox?https://secure.drtax.ca/ufile/2010/help/hlp_tslip.htm#T4RSPThxJoe
  12. parseInt problem

    Hi,When I dodocument.write(parseInt("02"));it displays 2but when I dodocument.write(parseInt("08"));it displays 0 instead of 8.Why?ThxJoe
  13. accent asp.net to asp classic

    Hi,In my asp.net file I have the following form with data <Form action="login.asp" method="post" name="myForm" ENCTYPE="x-www-form-urlencoded"> <input type="text" name="uid" value="frédéric <input type=submit value="submit" /> </Form> So on my login.asp why I seefrédéric instead of frédéric How do I encode it?Thanks
  14. create database and table

    Hi On the following SQL file CREATE DATABASE employeeDBuse employeeDBCREATE TABLE Persons(P_Id int NOT NULL,LastName varchar(255) NOT NULL,FirstName varchar(255),Address varchar(255),City varchar(255),PRIMARY KEY (P_Id)) I got an error because the database employeeDB is not created.How do you in the same script create a database then a table?ThxJoe
  15. expired page

    Hi,When add the following code <HEAD> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> <META HTTP-EQUIV="Expires" CONTENT="-1"></HEAD> Why the page is not expired when the user clicks on the back button?thx joe