473,322 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Cookie Encoding/sharing ASP.Net and ASP

Hi,

i have a little problem with cookie encoding. Our ASP.Net web-app uses
UTF-8/Unicode Encoding as default. Now we write an cookie with for example
the username in it. In Germany names can contain umlauts like äöüß...

Another web-app, written in ASP from another developer, read out the cookie
and have a problem with umlauts. They uses the ISO-8859-1 encoding, so there
are cryptic signs instead of the umlauts.

How can i save the username in the cookie with another encoding? I have
tried things like Encoding.Convert(unicode,iso, encodedBytes) but it doesn´t
work.

Thanks for any hint....

Stephan

Sep 26 '07 #1
2 5031
On Sep 26, 10:52 am, Stephan Bomholt
<StephanBomh...@discussions.microsoft.comwrote:
Hi,

i have a little problem with cookie encoding. Our ASP.Net web-app uses
UTF-8/Unicode Encoding as default. Now we write an cookie with for example
the username in it. In Germany names can contain umlauts like äöüß...

Another web-app, written in ASP from another developer, read out the cookie
and have a problem with umlauts. They uses the ISO-8859-1 encoding, so there
are cryptic signs instead of the umlauts.

How can i save the username in the cookie with another encoding? I have
tried things like Encoding.Convert(unicode,iso, encodedBytes) but it doesn´t
work.

Thanks for any hint....

Stephan
Hallo Stephan

according to this KB article http://support.microsoft.com/kb/313282
ASP cookies are encoded in UrlEncode format, so maybe the problem is
that you would need to decode the data using UrlDecode in ASP.NET? Try
this

Sep 26 '07 #2
Hello Stephan,

Mads Kristensen wrote about this recently. see there http://feeds.feedburner.com/~r/netSl...2987/post.aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
SBHi,
SB>
SBi have a little problem with cookie encoding. Our ASP.Net web-app
SBuses UTF-8/Unicode Encoding as default. Now we write an cookie with
SBfor example the username in it. In Germany names can contain umlauts
SBlike äöüß...
SB>
SBAnother web-app, written in ASP from another developer, read out the
SBcookie and have a problem with umlauts. They uses the ISO-8859-1
SBencoding, so there are cryptic signs instead of the umlauts.
SB>
SBHow can i save the username in the cookie with another encoding? I
SBhave tried things like Encoding.Convert(unicode,iso, encodedBytes)
SBbut it doesn´t work.
SB>
SBThanks for any hint....
SB>
SBStephan
SB>
Sep 26 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Johnny | last post by:
Searched on google for any info relating to this before posting here but found none. I set up a web service using nusoap on apache php 4.3.8 on windows with error_reporting = E_ALL and had that...
3
by: Karsten Grombach | last post by:
Hi, I'm trying the following: - Imitate a Logon using a Post with HttpWebRequest on remote Webserver (asp 3.0 page using https) - On success redirect to the page (encapsuled in an iframe)...
3
by: Ben | last post by:
I'm having problems with cookies from asp.net to asp back to asp.net. It seems like I can set a cookie in asp.net fine, and alter it at will, as soon as asp touches it, asp.net won't have...
7
by: Doug | last post by:
An ASP.NET session cookie set on "www.mydomain.com" can not be accessed on "search.mydomain.com"; hence, a new session and cookie are being created on every sub-domain. This is occuring because...
2
by: Xpou | last post by:
Hi, I have a windows form app which makes post httpwebrequests to the same pages of the same web site several times. This web site generates a "phpsessid" which is a session id residing in...
1
by: CR1 | last post by:
I found a great cookie script below, but don't know how to make it also pass the values sent to the cookie, to a querystring as well for tracking purposes. Can anyone help? If there was a way to...
1
by: AnthonyC | last post by:
I am having a problem tracking down what I believe to be a problem with the way cookies are being used on our website application. When user log onto the application, an in-memory (per-session)...
3
by: Dan | last post by:
Hi, I am trying to refresh the cookie to make sure the timeout is reset by simply calling a blank page on my site. I am doing this because I have an external site hosted in my web that isn't...
2
by: arijitdas | last post by:
Hi, We have an ASP.NET 2.0 web application where we want to share few user specific data between server and client side code using cookie. We are seeing a very strange behavior that it does not...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.