Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / August 2007

Tip: Looking for answers? Try searching our database.

asp.net 2 @ client coockies

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pelegk1 - 18 Aug 2007 00:06 GMT
i am trying to use this code:
[code]
If (True = Request.Browser.Cookies) Then ' this works!
Dim testCookie As New HttpCookie("LastVisited")
           testCookie.Values.Add("time is now", DateTime.Now.ToString)
           testCookie.Expires = DateTime.Now.AddDays(20)
           testCookie.Domain = "localhost"
           Response.AppendCookie(testCookie)
end if
[/code]
to save a coockie on a localhost and it isnt working.
what am i doing wrong?
what if i put the prject on a temp server can i then write a coockie even if
i dont have a domain?
under which name will i see it in the  Temporary Internet Files folder?
and should i use the above code for a new coockie and for an existing coocike?
or shouldi  use somme diffrent code?

thnaks in advance
peleg
Peter Bromberg [C# MVP] - 18 Aug 2007 17:00 GMT
I'd set the path property to "/" and leave off the localhost "domain". See if
that helps.
Peter
Signature

Recursion: see Recursion
site:  http://www.eggheadcafe.com
unBlog:  http://petesbloggerama.blogspot.com
BlogMetaFinder:    http://www.blogmetafinder.com

> i am trying to use this code:
> [code]
[quoted text clipped - 16 lines]
> thnaks in advance
> peleg
pelegk1 - 18 Aug 2007 20:08 GMT
thnaks alot the path did it!

> I'd set the path property to "/" and leave off the localhost "domain". See if
> that helps.
[quoted text clipped - 20 lines]
> > thnaks in advance
> > peleg
pelegk1 - 18 Aug 2007 20:08 GMT
first thnaks alot
but if say i dont work on localhost but on ip with no domain yet,shold i do
the same?

> I'd set the path property to "/" and leave off the localhost "domain". See if
> that helps.
[quoted text clipped - 20 lines]
> > thnaks in advance
> > peleg
Juan T. Llibre - 18 Aug 2007 20:54 GMT
re:
!> if say i dont work on localhost but on ip with no domain yet,shold i do the same?

Yes. Setting the path to "/" will do it for you.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
> first thnaks alot
> but if say i dont work on localhost but on ip with no domain yet,shold i do
[quoted text clipped - 24 lines]
>> > thnaks in advance
>> > peleg
pelegk1 - 18 Aug 2007 21:20 GMT
great thnaks alot!

> re:
> !> if say i dont work on localhost but on ip with no domain yet,shold i do the same?
[quoted text clipped - 33 lines]
> >> > thnaks in advance
> >> > peleg

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.