Encoding Cookie.
When I run the ASP page for the first time, I find out, that the Cookie file name contains some several special characters such as %5F, which are encoded with a URLEncode function. So, I have the following string (after convert): ....
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Response.cookie In Session_onstart Event And IE 6.0 Cookie Acceptance
When I set a cookie in global.asa in the sub session_onstart, even if I have "privacy" in IE 6.X set to "block all cookies" the cookie is still set, and I can get it on other pages. I can't find an article that addresses this as a specific issue. Why does the browser get the cookie when it is set in the session_onstart event even when I have "block all cookies" set?
Session Cookie Vs. Regular Cookie
I want to know what's the differences between session cookie and regular cookie. In ASP, when we create cookie, we do the following to identify an user: Response.Cookies("name") = value Is this regular cookie? How about session cookie? and when to use which?
ASP Encoding!
I am running the Script Encoder on ASP file, however I gets this message no matter what I do to this file, I even clean up most of the html tags. Why the Script Encoder Object failed to encoded asp file, but it works fine on .js files. Here is the message I gets: Microsoft(R) Windows 98 (C)Copyright Microsoft Corp 1981-1999. C:Encoded Script>screnc *.asp c: emp Scripting encoder object ("Scripting.Encoder") failed on C:Encoded Scriptine2c.asp
Encoding
I want to encode the data send from my website to server page. ie I want to hide from the user.
URL Encoding
I have a page that got a textbox to submit a string to another page, when the second page recieve the string the url of that page looks like this: Code:
Character Encoding
I have a partner sending me by post method to an asp page some text (xml string). It arrives to my page encoded as follows %9a%2f%Purchaseorder%3....f The < and > and spaces are replaced by nuùmbers and percentage sign I am using Request.BinaryRead(BytesTotal) and then doing response write and I am getting exactly the same string with the encoding How can tell my asp page to translate the encoded text to normal text?
XML-Encoding Problems
I'm using ASP to load an XML file. German Umlaute work fine all the time (I use <?xml version="1.0" encoding="iso-8859-1"?> so they should). Except this time where I add a text to a child which I then fill with text which contains an "ä". The ASP-error is: "An Invalid character was found in text content." (Or I believe that's the English translation, I get a German one, as I'm on a German system.) I read something about this error however even some suggested fixed don't work. I installed the latest MSXML (4) and use "Msxml2.DOMDocument.4.0" for server-createObject. Actually all I want to do is save some text coming from a textarea back into a little file.
Encoding The Ampersand(&) In A Url
I'm trying to use a popup window initiated from javascript to display pictures. Some of the directories and pictures contain &'s in the name or path. I've read the posts about Encoding but I cannot seem to get the get this working. Encoding the path to replace the & with %26 just gives me a page not found. <script language="javascript"> function NewWindow(url, w, h) { url = "http://intranet/Marketing_Photos/" + url; window.open(url,"_blank","width=" + w + ",height=" + h + ",left=0,top=0,scrollbars=yes,resizable=yes"); } </script> url is the subdir and picture name, i.e. subdir/pic.jpg Mareting_Photos is an IIS Virtual Directory pointing to a different server. Everything works, the pictues display, except when I pass a url with an & in the path then I get the page not found error. I can type in http//intranet/Marketing_Photos/SomeDir/Some%26PicName.jpg (replacing the & with %26) in the browser address bar but I get a page not found.
Encoding Proplem
for arabic language im using the write code which is <%@ Language=VBScript CodePage = "1256"%> it works good when i try to display data but no good work when i try to insert data im using sql server 2000 database.and most of my pages r self refrencing like that if st=1 then code here end if and of course im using the encoding code 1 time above the page </DIV><DIV>
Chinese Encoding
I developed a site in English but need it to be viewed in chinese. Is it possible if so how do i go about it. I've tried various ways but i can't get it to work. I've done the following but it yieled no results. <body lang="zh-TW" xml:lang="zh-TW"> Is there anything else i can do....
Ansi Encoding
i need to connect to a dbf database with ansi/oem encoding the connection is ok but i have problem with page encoding the characters don't display as they should! does anyone have any suggestions??
BASE64 Encoding
I've finished my whole application and now I don't like the whole session variables that I am using. I have a form, user fills in info clicks submit and using CDOSYSMail an email link gets created with an encoded query string. i.e http://www.yahoo.ca?#$@%@&#%#$@&^@%# which translates into http://www.yahoo.ca?userID=54&LocationID=Denver. Now when the user get's this email and clicks on the link I have a decode function(again using BASE64) that takes that url and decodes it to http://www.yahoo.ca?userID=54&LocationID=Denver. My app then connects to the database and pulls info associated with that querystring. I am doing the passing from page to page using session variables. I do not want to do this? Any ideas How I can take what is encoded in the url link and decode it on the next page? Let me know if there is a simple solution to this. I love the encode/decoding function.
Page Encoding - RSS
I am getting an error in my attempt to run RSS feeds via ASP Error... encoded as "utf-8", but your server is reporting "US-ASCII" I've tried windows-1251 but do not seem to be able to change the output from the servers default The problem is the data from an Access db contains hyphens and ampersands etc which cause a problem if the db content in the xml is read as US-ASCII How can I encode the page in ASP so that it can display the correct encodingmfor xml.
UTF8 Encoding
I have an oracle database where I store my html files on. While uploading I call the server.HTMLencode function to encode the blog but that's not enough. Once that is called I would like to encode the rest of the text through UTF8. Is there a predefined function that I can use to do this?
Character Encoding
I have created ASP with database application over a PHP based software. My problem is I get data from Excel files with an encoding as SJIS (Shift-JIS) and save it to the database. And the PHP software is the one that displays data in the web but using UTF-8 (unicode). I need an API in ASP that will convert charactrers from SJIS to UTF-8.
Encoding ASP Files
Does anyone know of a good way to encode/encrypt ASP files so the code is hidden, but still able to be read by IIS when requested? I have done some searches and have found that using vbscript.encode would work, but that it is very weak and tools are readily available to decode them. I have also seen two products that claim to do this, but they either just used vbscript.encode, or didn't work even on extremely simple asp files.
Transfer-Encoding: Chunked
When I get the following input stream of chunked data I ge Request.TotalBytes = -1 because there is not Content-Length. The following will work because I hardcoded the correct length: TotalBytes = 16 strBRequest = Request.BinaryRead(TotalBytes) I get: 16 bytes of data (see below) However, if I don't know the length and try to use something > 16 li 100 then I get at error and the TotalBytes is set to 16 and th strBRequest is empty. Does anybody know how to determine how to get around this. I am usin Transfer-Encoding: chunked because I do not know how much data is bein uploaded (could be very very large). POST /test.asp HTTP/1.1 Accept: */* Host: 192.168.1.10 Content-Type: application/x-www-form-urlencoded Transfer-Encoding: chunked 10 16 bytes of data
Hebrew Encoding Issue
I have an asp page that shows the contents of HTML files in a textarea using the Server.HTMLEncode method. It works perfectly with HTML files having english contents. When trying to show HTML with Hebrew I see all the text correct, except the hebrew part, appearing as jibberish. I use the hebrew encoding "windows-1255" in all the files with codepage=1255 in the beginng of the asp page. Using a special text editor I detected the encoding of the jibberish text - it's windows-1252.The problem started when i uploaded the page to a remote server. in my local server it runs ok.I should say that all the html pages are readable when entering their url in the browser and i can also make changes in hebrew to a database using asp (from that remote server).I think the problem has something to do with the way the remote server opens the file.
Outlook Mail Encoding
im sending a mail with CDONTS now if im combining 2 languages in the same mail, i have a problem (languages are hebrew and english) if im using dir=rtl the words in english appear backwards (the letters order is reversed) if im using dir=lrt the hebrew is reversed . how can i fix this thing.
Encoding Problem With MS Access
We have a MS Access database, and we are working with greek encoding. When we insert data into the database, it's fine, everything in the database is stored properly in greek. However, when we retrieve from the database, everything is return as "????S???" (something like that with a lot of question marks). What we've tried so far are adding CODEPAGE="1253" on top of the script, but that doesn't seem to help. I also tried response.Charset="UTF8", but no luck. Anyone know what else can I try to have the data being retrieved with proper encoding?
Creating An Xml Doc That Includes Encoding.
I'm trying to make an xml doc that gets passed to sql server, but I keep getting an xml parsing error. When i printed out the xml string, the encoding is not on there despite my putting it there... Code:
Xml, Character Encoding, Asp Question
I've been doing a lot of work both creating and consuming web services, and I notice there seems to be a discontinuity between a number of the different cogs in the wheel centering around windows-1252 and that it is not equivalent to iso-8859-1. Looking in the registry under HKEY_CLASSES_ROOTMIMEDatabaseCharset and Codepage, it seems that all variations on iso-8859-1 (latin1, etc) are mapped to code page 1252, which I'm assuming is windows-1252 in execution terms. So if I set the codepage=1252 and Response.Charset=iso-8859-1 in ASP, it seems that I'm *really* going to get out windows-1252, not iso-8859-1. This becomes somewhat noticable in html since a lot of commonly used elements (like the free-floating bullet •), which *aren't* really 8859-1, get interpreted as such in browsers. Code:
ServerXMLHTTP And Double-byte Encoding
I am trying to use ServerXMLHTTP to post data containing Japanese characters, but the data posts as question marks, boxes or just random ascii characters. Here is the code I am using:
Character Encoding Problem: ISO-8859-1 And UTF-8
I'm having the following problem: I have an ASP page that calls another JSP page, passing some strings as parameters. The strings have special characters, such as "ó" and "ê" (Portuguese characters). When passing those parameters, the JSP page receives them as UTF-8 characters, with 2 bytes each, but we would like them to be treated as ISO-8859-1 characters. Code:
Character Encoding Problem: ISO-8859-1 And UTF-8
I'm having the following problem: I have an ASP page that calls another JSP page, passing some strings as parameters. The strings have special characters, such as "ó" and "ê" (Portuguese characters). When passing those parameters, the JSP page receives them as UTF-8 characters, with 2 bytes each, but we would like them to be treated as ISO-8859-1 characters. Code:
Character Encoding Into An Access Database
I have a client that will be submitting a form that will have copy/text in 3 languages, English, German, and Italian. The last two languages have a lot of special characters. What I am finding is that when the form is submitted the characters for german and italian get stored in an Access database as jibberish if you will. how to make sure that the text is submitted, stored, and then displayed as it should be?
ASP Code For RFC2104 HMAC Encoding
I need to convert the following PHP code to work in ASP (not .net) and I'm a little lost! // Calculate signature using HMAC: http://www.faqs.org/rfcs/rfc2104.html function calculate_RFC2104HMAC ($data, $key) { return base64_encode ( pack("H*", sha1((str_pad($key, 64, chr(0x00)) ^(str_repeat(chr(0x5c), 64))) . pack("H*", sha1((str_pad($key, 64, chr(0x00)) ^(str_repeat(chr(0x36), 64))) . $data)))) ); } This code is directly from Amazon as part of the web services, required for each submission. They have a lot code samples but nothing in ASP. Any helpers ?
Char Encoding In Asp Send Mail Via Form
I have this piece of code in an .asp file. I call this file through a form and I send an email Set myMail=CreateObject("CDO.Message") myMail.Subject="my subject" myMail.From=Request("email") myMail.To="myemail@mail.com" Dim Body Body = Body & "Name: " & Request("name") & VbCrLf Body = Body & "E-mail: " & Request("email") & VbCrLf Body = Body & "-----" & VbCrLf Body = Body & Request("the_message") & VbCrLf myMail.TextBody=Body myMail.Send set myMail=nothing The problem is when I try to fill in the form with greek characters. They appear in the email as ????? or very confused characters with no recovery.
How To Set Cookie To Nothing?
The problem is that the code for "change_school.asp" takes the user right to "portal.asp". I checked the code of "change_school.asp" and it does indeed set a cookie value for "school", but for some reason "default.asp" is still finding the old cookie stored and then redirecting...any ideas guys? 'code for change_school.asp...clears the cookie "school" and redirects to page (default.asp) where user can select a new school <% Response.Cookies("school")= "" Response.Redirect "default.asp" %> 'code for default.asp which allows user to select a new school, and if the cookie "school" has some value then they are redirected. <% If request.cookies("school") <> "" then Response.Redirect "portal.asp" end if %>
Cookie And SQL?
On this website i am building it has password protection on certain pages. So i have a "login" portion on the right side of the page, that is shown on every page. When someone logs in is it possible to change that little section to just say Welcome so and so? Instead of having the username and password form with submit button?? Or is this something that requires some java to hide it? Part II When someone logs in i want them to recieve a cookie, in that cookie i want it to contain the person's name (wich i want the to be put next to the "welcome back on part I), email address, and up to four other numerical values. (some people will have greater access to sections of the site depending on who they are) Is is possible to grab this information from the SQL database and put in the cookie? If so can anyone please show me, point me in right direction, ect?
Cookie Value
I'm using FrontPage Database results wizards to retrieve data from Access. I have a cookie containing a number I'd like to insert in a custom query. Whenever the page opens, I want the query to run using the value in the cookie. I haven't been able to figure out how to transfer the cookie value into something the FP webbot will accept in the query.
Cookie
What i am trying to do is this: I want to make a cookie. If someone comes back to a page (say after an hour after they left)i want them to get a specific popup. If someone comes back after than hour I want them to get a different popup, telling them something different.
Cookie Detection
I'm going to go down this route of Cookie detection <% If Request.Querystring("Check") = "" Then Session("cookietest") = "True" Response.Redirect("cookietest.asp?Check=True") Else If Session("cookietest") Then <!-- Execute code if enabled --> Else <!-- Execute code if disabled --> End If End If %> I’m a little worried, do you know how spiders work with regards to this sort of thing? My site gets some traffic due to it being spidered by the likes of google and I don’t want to loose that flow. If I use this at the entry point of my site to redirect browsers with cookies turned off to a page telling them to turn them on will that stop the spiders?
Cookie Availability
If my user turns cookies off, both permanent and temporary cookies can't be used or only permanent cookies can't be saved on the user's machine?
Cookie Not Being Deleted.. How Do I?
I have a cookie with a path of "/" im trieng to delete it before the expired time has comed anyway i am trieng to delete it by setting the cookie to "" like so: Response.Cookies("name") = ""; but its not working but...i found out that if i dont set the path it is being deleted but i have to set the path because from some reason without it i have issues where the cookie is not found in some pages.
A Cookie Disappears, But Not All Of Them
I have a problem with a Cookie in an ASP page. Without any apparent reason, one of the Cookies disappears, but the others are ok. I'm at Page1, a link goes to Page2. Page2 redirects to Page3 and Page3 redirects to Page1. When I'm back to Page1, sometime, one of the cookies don't exist anymore... But the others are there! The disappeared Cookie isn't always the same, in the 18 Cookies that I have. The environment is composed of 4 clustered servers. Page1 is SSL, but not Page2 and Page3. I don't have more than 4KB (1.86KB to be more precise) of data and I don't have more that 20 Cookies on the same domain. I added the following code:
Retrieving Cookie Value
I want to retrieve the value of a cookie to make a form a little more user friendly (our intranet is configured to set a cookie for User First Name, Last Name and Email when they log in) Unfortunately I can't figure out how to retrieve the value of the cookie. I've been trying: <% Response.write Request.Cookies(UserLName) %> But it gives me an error - I used Checky to make sure the cookies are there and they do exist: Name:mascot Value: UserLName=Tarby Can someone give me some advice?
How To Remove Cookie?
How can I remove a cookie from the client in ASP? I'm not talking about setting the value to a blank string and I've tried this: [vbs] Response.Cookies("mycookie").Expires = Now() [/vbs] and [vbs] Response.Cookies("mycookie").Expires = Date() - 100 [/vbs] Neither of which work. Is there any way to completley remove the cookie?
Cookie Array
Is there a way to store an array of information in a cookie? ie. a user can have a "x" long list of a variable stored in a cookie, so when they return to the site this information can be retrieved.
Get Cookie Path
Is it possible to get the physical path of a cookie? (C:Document and SettingsmyLoginCookies) Because I need "myLogin" (the Windows Login), and I can't get with request.ServerVariables("logon_user") or ("author_user") or whatever...
Write Db Value To A Cookie?
I select 'name' from the customer table. Is it possible to write it into a cookie? <% Response.Cookies("customer")("firstname") = '" & objRecordset(NAME) & "' %> when I try to write the above using <% Response.Write (Request.Cookies("customer")("firstname")) %> i get the following ....
Cookie Testing
I need to revisit cookie testing. On the home page and every product page I write a cookie. I do this because some users enter by direct links to product pages. <% Response.Cookies("cookietest") = ("49") Response.Cookies("cookietest").Expires = Date + 2 %> On the cart page I test for the cookie... <% If Request.Cookies("cookietest") <"49" Then Response.Redirect("err.asp?e=1") End If %> I have a user that insists he has cookies enabled, yet he keeps getting redirected to my error page which suggests he does not have cookies enabled. What could cause this? Is the above too simple for all circumstances? Is there more extensive code that I could setup on a hidden page where I can send users to get read out on how they actually have their browsers setup? i.e. Run a test on their browser and the results are emailed to me.
Creating A New Cookie
I have an asp page where i created cookies-for admin and for user. The aspx page reads these cookies. Everything seems to work fine but now i have to create a new cookie if cookie has expired or if cookie is null. Also, i am having problems with the expire because if the username belongs to the admin for example and then i want to change the username that belongs to a normal user the cookie recognises the first (admin) cookie. How do i solve this? .....
Cookie Poisoning
I have created a page where i got sth like this: if (request.cookies("example") <> "" response.redirect("login.asp") response.end end if (I will try to explain as easy i can), so in the login.asp using a .mdb i get the username and check with the password, and putting the username in the cookie in this case called example, but using some cookie poisoning i can be anybody logged in, even sb out of the table of users, i didn't use the session object, i wanted to use a cookie because i got curiosity and i didn't understand what is the difference, and actually i don't understand so much...anyways i got 2 questions, how i do sth for protect the cookie for cookie poisoning and what is the difference between the session and the cookie (from the little what i know is that the session is a predefined cookie that has some encrypting stuff and that so on and got some properties, methods right? and the cookie is just a information holder without any extra stuff as the session object has, am i right?)
Encrpyt A Cookie
I have created code to create a cookie about a user when their login and when they tick a remember me box. The problem is though the the data in the cookie is stored in plain text. Which means I can use firefox and it webdeveloper tool to look at the cookie and change the values. My question is how do you encrpyt a cookie so it doesnt store the info in plain text?
Cookie Abandon
well in session we got session.abandon and all the bad sessions gone... i need to delete cookies from users side, there is option for this in asp dot net but in classic asp how we can do it? Response.Cookies("firstname").Expires=?
Cookie Not Being Prompted
I use the following simple code in an asp to test how cookies work ... <%@ Language=VBScript %> <% Response.Cookies("CookieTest")="Lovely Cookie !" Response.Cookies("CookieTest").Expires=DateAdd("n",5,Now()) %> <HTML><BODY>The cookie has arrived !</BODY></HTML> I've set my IE6.0 to prompt me for all cookies, which it does for all web pages I visit, but not for the above asp page which is hosted from IIS5.1 on my PC. I can see the cookie being created in my Cookies folder, but would like to be prompted first!
|