Request and Respond doesn't exist in new .NET framework..

Please support our VB.NET advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2007
Posts: 28
Reputation: sniper1983 is an unknown quantity at this point 
Solved Threads: 0
sniper1983 sniper1983 is offline Offline
Light Poster

Request and Respond doesn't exist in new .NET framework..

 
0
  #1
Oct 14th, 2008
Hi,

I have an old web-application in production which works fine. Now I want to make some changes and loads it into MS web developer express with the newest .NET framework installed. The problem occours when loading the website into the program. It seems that the "My" doesn't support request and response on cookies anymore.

ex. My.Request.Cookies("TestEmail")

I have succeeded finding the alternative to respond: System.Web.HttpContext.Current.Response.Cookies.Add

But have not been able to find the new way for Request. Can somebody help me doing this?
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 115
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: Request and Respond doesn't exist in new .NET framework..

 
0
  #2
Oct 14th, 2008
You'll get it with:
  1. Dim Resp As System.Net.HttpWebResponse
  2. ' Make WebRequest
  3. ' Resp.Cookies has the cookies
Take a look at System.Net.WebResponse and System.Net.HttpWebResponse namespaces. You should find everything you need in them (and in Request namespaces of cource).
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 28
Reputation: sniper1983 is an unknown quantity at this point 
Solved Threads: 0
sniper1983 sniper1983 is offline Offline
Light Poster

Re: Request and Respond doesn't exist in new .NET framework..

 
0
  #3
Oct 14th, 2008
Originally Posted by Teme64 View Post
You'll get it with:
  1. Dim Resp As System.Net.HttpWebResponse
  2. ' Make WebRequest
  3. ' Resp.Cookies has the cookies
Take a look at System.Net.WebResponse and System.Net.HttpWebResponse namespaces. You should find everything you need in them (and in Request namespaces of cource).
Thank you for your help. I have found out that I might use it like this:

System.Web.HttpContext.Current.Request.Cookies.Item("Role").Value()

instead of
My.Request.Cookies("Role").Value()

I just don't hope that the change will change behaviour elsewhere in the program. It hasn't until now, so maybe this is the way.

I think it is weird that the framework has changed these things. A lot of older websites must be edited quite a bit.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 115
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: Request and Respond doesn't exist in new .NET framework..

 
0
  #4
Oct 14th, 2008
IMHO the difference between classic ASP and ASP.NET is so huge that in most cases it's a lot more easier to take only the "application logic" and rewrite from the scratch with ASP.NET
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the VB.NET Forum


Views: 686 | Replies: 3
Thread Tools Search this Thread



Tag cloud for VB.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC