Read IP address from Cookie

Ø

Øyvind Isaksen

Hello!

Have a site that contains both ASP (3.0) and ASP.NET files.
When I log inn, my login.asp write info to a cookie to use for
authentication in my asp.net files. One of the things I write to the cookie
is the users local IP address. My problem comes when I try to "use" this IP
address in my asp.net files. When I print out the IP adress from the cookie,
it looks like theis:

127%2E0%2E0%2E1

It has to be in a format like this: 127.0.0.1

How can this be done correct??


---------------------------------------------------------------
This is how I read from the cookie in my asp.net file:

Dim ip As String = Request.Cookies("login")("ip")
Response.Write(ip & "<br>")

OUTPUT: 127%2E0%2E0%2E1
 
S

S. Justin Gengo

Oyvind,

You'll want to utilize:

Server.HtmlEncrypt

and

Server.HtmlDecrypt

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
G

Guest

It's URLEncoded (or is that HTMLEncoded?)
Look for the corresponding Decode method, or just do a .Replace()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,222
Members
46,810
Latest member
Kassie0918

Latest Threads

Top