Article ID: 313282 - Last Review: February 23, 2007 - Revision: 2.7 PRB: ASP.NET Does Not Encode Cookies in UrlEncode Format by DefaultThis article was previously published under Q313282 On This PageSYMPTOMS
When you develop ASP.NET applications that share cookies between earlier versions of Microsoft Active Server Pages (ASP) and ASP.NET code, the data may not be encoded or unencoded as expected.
CAUSE
In earlier versions of Microsoft Active Server Pages (ASP), cookies are encoded in UrlEncode format when they are written, and cookies are unencoded when they are read. However, ASP.NET does not encode or unencode cookies in UrlEncode format by default. As a result, you may encounter unexpected behavior in ASP.NET applications.
MORE INFORMATIONSteps to Reproduce the Behavior
REFERENCESFor additional information about ASP.NET articles and resources, click the article number below
to view the article in the Microsoft Knowledge Base:
305140
(http://support.microsoft.com/kb/305140/EN-US/
)
INFO: ASP.NET Roadmap
For additional information about state management in ASP.NET, click the article number below
to view the article in the Microsoft Knowledge Base:
307598
(http://support.microsoft.com/kb/307598/EN-US/
)
INFO: ASP.NET State Management Overview
For additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
302390
(http://support.microsoft.com/kb/302390/EN-US/
)
HOW TO: Use Cookies in an ASP Page
For more information, refer to the following Microsoft Web sites:
HttpServerUtility.UrlEncode Method http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebHttpServerUtilityClassUrlEncodeTopic.asp (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebHttpServerUtilityClassUrlEncodeTopic.asp) HttpServerUtility.UrlDecode Method http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebHttpServerUtilityClassUrlDecodeTopic.asp (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebHttpServerUtilityClassUrlDecodeTopic.asp) HttpCookie Class http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebHttpCookieClassTopic.asp (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebHttpCookieClassTopic.asp) HttpResponse.Cookies Property http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebHttpResponseClassCookiesTopic.asp (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebHttpResponseClassCookiesTopic.asp) HttpRequest.Cookies Property http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebHttpRequestClassCookiesTopic.asp (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebHttpRequestClassCookiesTopic.asp)
| Article Translations
|
Back to the top
