I have written a shopping cart using ASP .NET (VB). It has been running
quite successfully on a site for about a year or so. I use the SessionID as
the key to hold information on the shopping cart.
I have copy / pasted the code into a new site. Everything is working,
EXCEPT for the shopping cart holding the SessionID. I have watched the
variable, and each time I hit the 'Update' button in a datalist, the session
ID changes. That is a HUGE problem, and I am about to throw a computer out a
window.
The session ID is supposed to stay the same!!! Where do I look? The sites
are on the same server. IIS 6.0 W2K3 server and updated patches.
I am using a datalist to display the cart that is stored in the database
using the sessionID as the key. The datalist uses LinkButtons (update |
delete) to run code that updates the QTY or deletes the item all together.
Again, this is all of the same code that I have been using on another site
for more than a year, and works fine.
The cart code is all on one page, and posts back to itself. I wrote code
that displays the sessionid on the top of the page, and it changes when I hit
the update or delete buttons. On the site that works, this does not happen.
I have gone back to the site that works, and have checked all of the session
settings that I could find, and the only one I found was in the web.config
file (as expected). I copy / pasted that session state code into the new
site, and the session cookie is still not working correctly.
Code Snippets From Web.Config:
<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="30"
/>
What else can be wrong? I HOPE it is not a bug with .NET, and it is a
configuration difference of the two sites, even though I have gone through
them with a fine tooth comb. How can it be the code, since it is working on
another site? I am not saying that it isn't my code, but I want to know what
could be wrong with it, if it works elsewhere.
Thanks in advance,
--
Thanks,
Brad Simon 8 1975
Hi Brad,
It looks like the machine you are having problems with seem to have some
tight security, which is not accepting cookies. Try reducing the security
level and see to make sure it accept the cookies. asp.net by default make
use of cookies to store the sessionID
--
Kumar Reddi http://kumarreddi.blogspot.com
"Brad Simon" <bs****@simondeveloping.com> wrote in message
news:C8**********************************@microsof t.com... I have written a shopping cart using ASP .NET (VB). It has been running quite successfully on a site for about a year or so. I use the SessionID as the key to hold information on the shopping cart.
I have copy / pasted the code into a new site. Everything is working, EXCEPT for the shopping cart holding the SessionID. I have watched the variable, and each time I hit the 'Update' button in a datalist, the session ID changes. That is a HUGE problem, and I am about to throw a computer out a window.
The session ID is supposed to stay the same!!! Where do I look? The sites are on the same server. IIS 6.0 W2K3 server and updated patches.
I am using a datalist to display the cart that is stored in the database using the sessionID as the key. The datalist uses LinkButtons (update | delete) to run code that updates the QTY or deletes the item all together. Again, this is all of the same code that I have been using on another site for more than a year, and works fine.
The cart code is all on one page, and posts back to itself. I wrote code that displays the sessionid on the top of the page, and it changes when I hit the update or delete buttons. On the site that works, this does not happen.
I have gone back to the site that works, and have checked all of the session settings that I could find, and the only one I found was in the web.config file (as expected). I copy / pasted that session state code into the new site, and the session cookie is still not working correctly.
Code Snippets From Web.Config: <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="30" />
What else can be wrong? I HOPE it is not a bug with .NET, and it is a configuration difference of the two sites, even though I have gone through them with a fine tooth comb. How can it be the code, since it is working on another site? I am not saying that it isn't my code, but I want to know what could be wrong with it, if it works elsewhere.
Thanks in advance, -- Thanks, Brad Simon
Brad..
Try what Kumar Adviced and see if it will solve your problems..
I guess it should!
Patrick
"Brad Simon" wrote: I have written a shopping cart using ASP .NET (VB). It has been running quite successfully on a site for about a year or so. I use the SessionID as the key to hold information on the shopping cart.
I have copy / pasted the code into a new site. Everything is working, EXCEPT for the shopping cart holding the SessionID. I have watched the variable, and each time I hit the 'Update' button in a datalist, the session ID changes. That is a HUGE problem, and I am about to throw a computer out a window.
The session ID is supposed to stay the same!!! Where do I look? The sites are on the same server. IIS 6.0 W2K3 server and updated patches.
I am using a datalist to display the cart that is stored in the database using the sessionID as the key. The datalist uses LinkButtons (update | delete) to run code that updates the QTY or deletes the item all together. Again, this is all of the same code that I have been using on another site for more than a year, and works fine.
The cart code is all on one page, and posts back to itself. I wrote code that displays the sessionid on the top of the page, and it changes when I hit the update or delete buttons. On the site that works, this does not happen.
I have gone back to the site that works, and have checked all of the session settings that I could find, and the only one I found was in the web.config file (as expected). I copy / pasted that session state code into the new site, and the session cookie is still not working correctly.
Code Snippets From Web.Config: <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="30" />
What else can be wrong? I HOPE it is not a bug with .NET, and it is a configuration difference of the two sites, even though I have gone through them with a fine tooth comb. How can it be the code, since it is working on another site? I am not saying that it isn't my code, but I want to know what could be wrong with it, if it works elsewhere.
Thanks in advance, -- Thanks, Brad Simon
It is not the client. I checked the settings, and it is set to allow
cookies. Not to mention it does not work in a test environment
(localhost/<BadCart>), but the other site does in the same test environment
(localhost/GoodCart>).
The exact same issues are in production. I have both carts on the same
production server (there is no reference from the live site to the bad cart).
The domain the bad cart is on is set to allow cookies, also, and it still
exhibits the same behavior.
"Kumar Reddi" wrote: Hi Brad, It looks like the machine you are having problems with seem to have some tight security, which is not accepting cookies. Try reducing the security level and see to make sure it accept the cookies. asp.net by default make use of cookies to store the sessionID -- Kumar Reddi http://kumarreddi.blogspot.com
"Brad Simon" <bs****@simondeveloping.com> wrote in message news:C8**********************************@microsof t.com...I have written a shopping cart using ASP .NET (VB). It has been running quite successfully on a site for about a year or so. I use the SessionID as the key to hold information on the shopping cart.
I have copy / pasted the code into a new site. Everything is working, EXCEPT for the shopping cart holding the SessionID. I have watched the variable, and each time I hit the 'Update' button in a datalist, the session ID changes. That is a HUGE problem, and I am about to throw a computer out a window.
The session ID is supposed to stay the same!!! Where do I look? The sites are on the same server. IIS 6.0 W2K3 server and updated patches.
I am using a datalist to display the cart that is stored in the database using the sessionID as the key. The datalist uses LinkButtons (update | delete) to run code that updates the QTY or deletes the item all together. Again, this is all of the same code that I have been using on another site for more than a year, and works fine.
The cart code is all on one page, and posts back to itself. I wrote code that displays the sessionid on the top of the page, and it changes when I hit the update or delete buttons. On the site that works, this does not happen.
I have gone back to the site that works, and have checked all of the session settings that I could find, and the only one I found was in the web.config file (as expected). I copy / pasted that session state code into the new site, and the session cookie is still not working correctly.
Code Snippets From Web.Config: <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="30" />
What else can be wrong? I HOPE it is not a bug with .NET, and it is a configuration difference of the two sites, even though I have gone through them with a fine tooth comb. How can it be the code, since it is working on another site? I am not saying that it isn't my code, but I want to know what could be wrong with it, if it works elsewhere.
Thanks in advance, -- Thanks, Brad Simon
Brad,
Lets assume there is nothing wrong with the cookie permission. How about,
trying a cookieless session. Try setting Cookieless = true, in the
sessionState element. Now your sessionID will be part of the url. Just try
doing this for testing purposes. See, if each postback changes the sessionID
in the url. Let me know what you found
--
Kumar Reddi http://kumarreddi.blogspot.com
"Brad Simon" <bs****@simondeveloping.com> wrote in message
news:F4**********************************@microsof t.com... It is not the client. I checked the settings, and it is set to allow cookies. Not to mention it does not work in a test environment (localhost/<BadCart>), but the other site does in the same test environment (localhost/GoodCart>).
The exact same issues are in production. I have both carts on the same production server (there is no reference from the live site to the bad cart). The domain the bad cart is on is set to allow cookies, also, and it still exhibits the same behavior.
"Kumar Reddi" wrote:
Hi Brad, It looks like the machine you are having problems with seem to have some tight security, which is not accepting cookies. Try reducing the security level and see to make sure it accept the cookies. asp.net by default make use of cookies to store the sessionID -- Kumar Reddi http://kumarreddi.blogspot.com
"Brad Simon" <bs****@simondeveloping.com> wrote in message news:C8**********************************@microsof t.com... >I have written a shopping cart using ASP .NET (VB). It has been running > quite successfully on a site for about a year or so. I use the > SessionID > as > the key to hold information on the shopping cart. > > I have copy / pasted the code into a new site. Everything is working, > EXCEPT for the shopping cart holding the SessionID. I have watched the > variable, and each time I hit the 'Update' button in a datalist, the > session > ID changes. That is a HUGE problem, and I am about to throw a computer > out a > window. > > The session ID is supposed to stay the same!!! Where do I look? The > sites > are on the same server. IIS 6.0 W2K3 server and updated patches. > > I am using a datalist to display the cart that is stored in the > database > using the sessionID as the key. The datalist uses LinkButtons (update > | > delete) to run code that updates the QTY or deletes the item all > together. > Again, this is all of the same code that I have been using on another > site > for more than a year, and works fine. > > The cart code is all on one page, and posts back to itself. I wrote > code > that displays the sessionid on the top of the page, and it changes when > I > hit > the update or delete buttons. On the site that works, this does not > happen. > > I have gone back to the site that works, and have checked all of the > session > settings that I could find, and the only one I found was in the > web.config > file (as expected). I copy / pasted that session state code into the > new > site, and the session cookie is still not working correctly. > > Code Snippets From Web.Config: > <sessionState > mode="InProc" > stateConnectionString="tcpip=127.0.0.1:42424" > sqlConnectionString="data > source=127.0.0.1;Trusted_Connection=yes" > cookieless="false" > timeout="30" > /> > > What else can be wrong? I HOPE it is not a bug with .NET, and it is a > configuration difference of the two sites, even though I have gone > through > them with a fine tooth comb. How can it be the code, since it is > working > on > another site? I am not saying that it isn't my code, but I want to > know > what > could be wrong with it, if it works elsewhere. > > Thanks in advance, > -- > Thanks, > Brad Simon
Yes, it does work that way. I have tried it before and it works fine.
Assuming I have everything right (big assumption), does anyone know if there
are any issues that ASP .NET has with with cookie sessions? It is not like I
am new to using a session cookie, or cookies at all. I have been monkeying
around with this for 4 weeks now.
I am still open to trying anything. The cookieless session is not an option
(unfortunately), it is not my decsion on that. They don't like the funny
looking URLs it does.
A thought I just had. Their is no difference in the code of the shopping
cart at all. The page (cart.aspx) is the only one that even uses the session
variable, and it looses the session id without even leaving the page
(clicking the update or delete buttons). The only other difference I can
think of between the two sites is the rest of the site. Parts of the bad
cart site is ASP pages (again, not my choice), the good cart is 100% ASP
..NET. Is THAT the issue? I don't see how it would be since the session id
gets lost without even leaving the page.
"Kumar Reddi" wrote: Brad, Lets assume there is nothing wrong with the cookie permission. How about, trying a cookieless session. Try setting Cookieless = true, in the sessionState element. Now your sessionID will be part of the url. Just try doing this for testing purposes. See, if each postback changes the sessionID in the url. Let me know what you found -- Kumar Reddi http://kumarreddi.blogspot.com
"Brad Simon" <bs****@simondeveloping.com> wrote in message news:F4**********************************@microsof t.com... It is not the client. I checked the settings, and it is set to allow cookies. Not to mention it does not work in a test environment (localhost/<BadCart>), but the other site does in the same test environment (localhost/GoodCart>).
The exact same issues are in production. I have both carts on the same production server (there is no reference from the live site to the bad cart). The domain the bad cart is on is set to allow cookies, also, and it still exhibits the same behavior.
"Kumar Reddi" wrote:
Hi Brad, It looks like the machine you are having problems with seem to have some tight security, which is not accepting cookies. Try reducing the security level and see to make sure it accept the cookies. asp.net by default make use of cookies to store the sessionID -- Kumar Reddi http://kumarreddi.blogspot.com
"Brad Simon" <bs****@simondeveloping.com> wrote in message news:C8**********************************@microsof t.com... >I have written a shopping cart using ASP .NET (VB). It has been running > quite successfully on a site for about a year or so. I use the > SessionID > as > the key to hold information on the shopping cart. > > I have copy / pasted the code into a new site. Everything is working, > EXCEPT for the shopping cart holding the SessionID. I have watched the > variable, and each time I hit the 'Update' button in a datalist, the > session > ID changes. That is a HUGE problem, and I am about to throw a computer > out a > window. > > The session ID is supposed to stay the same!!! Where do I look? The > sites > are on the same server. IIS 6.0 W2K3 server and updated patches. > > I am using a datalist to display the cart that is stored in the > database > using the sessionID as the key. The datalist uses LinkButtons (update > | > delete) to run code that updates the QTY or deletes the item all > together. > Again, this is all of the same code that I have been using on another > site > for more than a year, and works fine. > > The cart code is all on one page, and posts back to itself. I wrote > code > that displays the sessionid on the top of the page, and it changes when > I > hit > the update or delete buttons. On the site that works, this does not > happen. > > I have gone back to the site that works, and have checked all of the > session > settings that I could find, and the only one I found was in the > web.config > file (as expected). I copy / pasted that session state code into the > new > site, and the session cookie is still not working correctly. > > Code Snippets From Web.Config: > <sessionState > mode="InProc" > stateConnectionString="tcpip=127.0.0.1:42424" > sqlConnectionString="data > source=127.0.0.1;Trusted_Connection=yes" > cookieless="false" > timeout="30" > /> > > What else can be wrong? I HOPE it is not a bug with .NET, and it is a > configuration difference of the two sites, even though I have gone > through > them with a fine tooth comb. How can it be the code, since it is > working > on > another site? I am not saying that it isn't my code, but I want to > know > what > could be wrong with it, if it works elsewhere. > > Thanks in advance, > -- > Thanks, > Brad Simon
Hi Brad,
It certainly looks like the issue with your case is having both asp and
asp.net pages together. I never developed an application which had both the
kinds of pages. But, as I am aware you need to provide both Global.asa and
Global.asax, as application information is provided differently and accessed
differently for each type of the page. Do you have both these Global's?
--
Kumar Reddi http://kumarreddi.blogspot.com
"Brad Simon" <bs****@simondeveloping.com> wrote in message
news:1B**********************************@microsof t.com... Yes, it does work that way. I have tried it before and it works fine.
Assuming I have everything right (big assumption), does anyone know if there are any issues that ASP .NET has with with cookie sessions? It is not like I am new to using a session cookie, or cookies at all. I have been monkeying around with this for 4 weeks now.
I am still open to trying anything. The cookieless session is not an option (unfortunately), it is not my decsion on that. They don't like the funny looking URLs it does.
A thought I just had. Their is no difference in the code of the shopping cart at all. The page (cart.aspx) is the only one that even uses the session variable, and it looses the session id without even leaving the page (clicking the update or delete buttons). The only other difference I can think of between the two sites is the rest of the site. Parts of the bad cart site is ASP pages (again, not my choice), the good cart is 100% ASP .NET. Is THAT the issue? I don't see how it would be since the session id gets lost without even leaving the page.
"Kumar Reddi" wrote:
Brad, Lets assume there is nothing wrong with the cookie permission. How about, trying a cookieless session. Try setting Cookieless = true, in the sessionState element. Now your sessionID will be part of the url. Just try doing this for testing purposes. See, if each postback changes the sessionID in the url. Let me know what you found -- Kumar Reddi http://kumarreddi.blogspot.com
"Brad Simon" <bs****@simondeveloping.com> wrote in message news:F4**********************************@microsof t.com... > It is not the client. I checked the settings, and it is set to allow > cookies. Not to mention it does not work in a test environment > (localhost/<BadCart>), but the other site does in the same test > environment > (localhost/GoodCart>). > > The exact same issues are in production. I have both carts on the same > production server (there is no reference from the live site to the bad > cart). > The domain the bad cart is on is set to allow cookies, also, and it > still > exhibits the same behavior. > > "Kumar Reddi" wrote: > >> Hi Brad, >> It looks like the machine you are having problems with seem to have >> some >> tight security, which is not accepting cookies. Try reducing the >> security >> level and see to make sure it accept the cookies. asp.net by default >> make >> use of cookies to store the sessionID >> -- >> Kumar Reddi >> http://kumarreddi.blogspot.com >> >> "Brad Simon" <bs****@simondeveloping.com> wrote in message >> news:C8**********************************@microsof t.com... >> >I have written a shopping cart using ASP .NET (VB). It has been >> >running >> > quite successfully on a site for about a year or so. I use the >> > SessionID >> > as >> > the key to hold information on the shopping cart. >> > >> > I have copy / pasted the code into a new site. Everything is >> > working, >> > EXCEPT for the shopping cart holding the SessionID. I have watched >> > the >> > variable, and each time I hit the 'Update' button in a datalist, the >> > session >> > ID changes. That is a HUGE problem, and I am about to throw a >> > computer >> > out a >> > window. >> > >> > The session ID is supposed to stay the same!!! Where do I look? >> > The >> > sites >> > are on the same server. IIS 6.0 W2K3 server and updated patches. >> > >> > I am using a datalist to display the cart that is stored in the >> > database >> > using the sessionID as the key. The datalist uses LinkButtons >> > (update >> > | >> > delete) to run code that updates the QTY or deletes the item all >> > together. >> > Again, this is all of the same code that I have been using on >> > another >> > site >> > for more than a year, and works fine. >> > >> > The cart code is all on one page, and posts back to itself. I wrote >> > code >> > that displays the sessionid on the top of the page, and it changes >> > when >> > I >> > hit >> > the update or delete buttons. On the site that works, this does not >> > happen. >> > >> > I have gone back to the site that works, and have checked all of the >> > session >> > settings that I could find, and the only one I found was in the >> > web.config >> > file (as expected). I copy / pasted that session state code into >> > the >> > new >> > site, and the session cookie is still not working correctly. >> > >> > Code Snippets From Web.Config: >> > <sessionState >> > mode="InProc" >> > stateConnectionString="tcpip=127.0.0.1:42424" >> > sqlConnectionString="data >> > source=127.0.0.1;Trusted_Connection=yes" >> > cookieless="false" >> > timeout="30" >> > /> >> > >> > What else can be wrong? I HOPE it is not a bug with .NET, and it is >> > a >> > configuration difference of the two sites, even though I have gone >> > through >> > them with a fine tooth comb. How can it be the code, since it is >> > working >> > on >> > another site? I am not saying that it isn't my code, but I want to >> > know >> > what >> > could be wrong with it, if it works elsewhere. >> > >> > Thanks in advance, >> > -- >> > Thanks, >> > Brad Simon >> >> >>
DING DING DING DING - you win!!!! Thank you so very much.
That is what I get when I let a client do some of the work. He developed in
ASP, I brought the project in, and then added ASPX pages as needed.
I did not have EITHER of those pages. I put a basic one of each, and it
works. It could easily have only needed the ASAX page.
I KNEW it would be something simple I overlooked.
Thanks again, you don't know what a pain this has been!
"Kumar Reddi" wrote: Hi Brad, It certainly looks like the issue with your case is having both asp and asp.net pages together. I never developed an application which had both the kinds of pages. But, as I am aware you need to provide both Global.asa and Global.asax, as application information is provided differently and accessed differently for each type of the page. Do you have both these Global's? -- Kumar Reddi http://kumarreddi.blogspot.com
"Brad Simon" <bs****@simondeveloping.com> wrote in message news:1B**********************************@microsof t.com... Yes, it does work that way. I have tried it before and it works fine.
Assuming I have everything right (big assumption), does anyone know if there are any issues that ASP .NET has with with cookie sessions? It is not like I am new to using a session cookie, or cookies at all. I have been monkeying around with this for 4 weeks now.
I am still open to trying anything. The cookieless session is not an option (unfortunately), it is not my decsion on that. They don't like the funny looking URLs it does.
A thought I just had. Their is no difference in the code of the shopping cart at all. The page (cart.aspx) is the only one that even uses the session variable, and it looses the session id without even leaving the page (clicking the update or delete buttons). The only other difference I can think of between the two sites is the rest of the site. Parts of the bad cart site is ASP pages (again, not my choice), the good cart is 100% ASP .NET. Is THAT the issue? I don't see how it would be since the session id gets lost without even leaving the page.
"Kumar Reddi" wrote:
Brad, Lets assume there is nothing wrong with the cookie permission. How about, trying a cookieless session. Try setting Cookieless = true, in the sessionState element. Now your sessionID will be part of the url. Just try doing this for testing purposes. See, if each postback changes the sessionID in the url. Let me know what you found -- Kumar Reddi http://kumarreddi.blogspot.com
"Brad Simon" <bs****@simondeveloping.com> wrote in message news:F4**********************************@microsof t.com... > It is not the client. I checked the settings, and it is set to allow > cookies. Not to mention it does not work in a test environment > (localhost/<BadCart>), but the other site does in the same test > environment > (localhost/GoodCart>). > > The exact same issues are in production. I have both carts on the same > production server (there is no reference from the live site to the bad > cart). > The domain the bad cart is on is set to allow cookies, also, and it > still > exhibits the same behavior. > > "Kumar Reddi" wrote: > >> Hi Brad, >> It looks like the machine you are having problems with seem to have >> some >> tight security, which is not accepting cookies. Try reducing the >> security >> level and see to make sure it accept the cookies. asp.net by default >> make >> use of cookies to store the sessionID >> -- >> Kumar Reddi >> http://kumarreddi.blogspot.com >> >> "Brad Simon" <bs****@simondeveloping.com> wrote in message >> news:C8**********************************@microsof t.com... >> >I have written a shopping cart using ASP .NET (VB). It has been >> >running >> > quite successfully on a site for about a year or so. I use the >> > SessionID >> > as >> > the key to hold information on the shopping cart. >> > >> > I have copy / pasted the code into a new site. Everything is >> > working, >> > EXCEPT for the shopping cart holding the SessionID. I have watched >> > the >> > variable, and each time I hit the 'Update' button in a datalist, the >> > session >> > ID changes. That is a HUGE problem, and I am about to throw a >> > computer >> > out a >> > window. >> > >> > The session ID is supposed to stay the same!!! Where do I look? >> > The >> > sites >> > are on the same server. IIS 6.0 W2K3 server and updated patches. >> > >> > I am using a datalist to display the cart that is stored in the >> > database >> > using the sessionID as the key. The datalist uses LinkButtons >> > (update >> > | >> > delete) to run code that updates the QTY or deletes the item all >> > together. >> > Again, this is all of the same code that I have been using on >> > another >> > site >> > for more than a year, and works fine. >> > >> > The cart code is all on one page, and posts back to itself. I wrote >> > code >> > that displays the sessionid on the top of the page, and it changes >> > when >> > I >> > hit >> > the update or delete buttons. On the site that works, this does not >> > happen. >> > >> > I have gone back to the site that works, and have checked all of the >> > session >> > settings that I could find, and the only one I found was in the >> > web.config >> > file (as expected). I copy / pasted that session state code into >> > the >> > new >> > site, and the session cookie is still not working correctly. >> > >> > Code Snippets From Web.Config: >> > <sessionState >> > mode="InProc" >> > stateConnectionString="tcpip=127.0.0.1:42424" >> > sqlConnectionString="data >> > source=127.0.0.1;Trusted_Connection=yes" >> > cookieless="false" >> > timeout="30" >> > /> >> > >> > What else can be wrong? I HOPE it is not a bug with .NET, and it is >> > a >> > configuration difference of the two sites, even though I have gone >> > through >> > them with a fine tooth comb. How can it be the code, since it is >> > working >> > on >> > another site? I am not saying that it isn't my code, but I want to >> > know >> > what >> > could be wrong with it, if it works elsewhere. >> > >> > Thanks in advance, >> > -- >> > Thanks, >> > Brad Simon >> >> >>
I am glad I brought smiles on your face
--
Kumar Reddi http://kumarreddi.blogspot.com
"Brad Simon" <bs****@simondeveloping.com> wrote in message
news:49**********************************@microsof t.com... DING DING DING DING - you win!!!! Thank you so very much.
That is what I get when I let a client do some of the work. He developed in ASP, I brought the project in, and then added ASPX pages as needed.
I did not have EITHER of those pages. I put a basic one of each, and it works. It could easily have only needed the ASAX page.
I KNEW it would be something simple I overlooked.
Thanks again, you don't know what a pain this has been!
"Kumar Reddi" wrote:
Hi Brad, It certainly looks like the issue with your case is having both asp and asp.net pages together. I never developed an application which had both the kinds of pages. But, as I am aware you need to provide both Global.asa and Global.asax, as application information is provided differently and accessed differently for each type of the page. Do you have both these Global's? -- Kumar Reddi http://kumarreddi.blogspot.com
"Brad Simon" <bs****@simondeveloping.com> wrote in message news:1B**********************************@microsof t.com... > Yes, it does work that way. I have tried it before and it works fine. > > Assuming I have everything right (big assumption), does anyone know if > there > are any issues that ASP .NET has with with cookie sessions? It is not > like I > am new to using a session cookie, or cookies at all. I have been > monkeying > around with this for 4 weeks now. > > I am still open to trying anything. The cookieless session is not an > option > (unfortunately), it is not my decsion on that. They don't like the > funny > looking URLs it does. > > A thought I just had. Their is no difference in the code of the > shopping > cart at all. The page (cart.aspx) is the only one that even uses the > session > variable, and it looses the session id without even leaving the page > (clicking the update or delete buttons). The only other difference I > can > think of between the two sites is the rest of the site. Parts of the > bad > cart site is ASP pages (again, not my choice), the good cart is 100% > ASP > .NET. Is THAT the issue? I don't see how it would be since the > session > id > gets lost without even leaving the page. > > "Kumar Reddi" wrote: > >> >> Brad, >> Lets assume there is nothing wrong with the cookie permission. How >> about, >> trying a cookieless session. Try setting Cookieless = true, in the >> sessionState element. Now your sessionID will be part of the url. Just >> try >> doing this for testing purposes. See, if each postback changes the >> sessionID >> in the url. Let me know what you found >> -- >> Kumar Reddi >> http://kumarreddi.blogspot.com >> >> "Brad Simon" <bs****@simondeveloping.com> wrote in message >> news:F4**********************************@microsof t.com... >> > It is not the client. I checked the settings, and it is set to >> > allow >> > cookies. Not to mention it does not work in a test environment >> > (localhost/<BadCart>), but the other site does in the same test >> > environment >> > (localhost/GoodCart>). >> > >> > The exact same issues are in production. I have both carts on the >> > same >> > production server (there is no reference from the live site to the >> > bad >> > cart). >> > The domain the bad cart is on is set to allow cookies, also, and it >> > still >> > exhibits the same behavior. >> > >> > "Kumar Reddi" wrote: >> > >> >> Hi Brad, >> >> It looks like the machine you are having problems with seem to >> >> have >> >> some >> >> tight security, which is not accepting cookies. Try reducing the >> >> security >> >> level and see to make sure it accept the cookies. asp.net by >> >> default >> >> make >> >> use of cookies to store the sessionID >> >> -- >> >> Kumar Reddi >> >> http://kumarreddi.blogspot.com >> >> >> >> "Brad Simon" <bs****@simondeveloping.com> wrote in message >> >> news:C8**********************************@microsof t.com... >> >> >I have written a shopping cart using ASP .NET (VB). It has been >> >> >running >> >> > quite successfully on a site for about a year or so. I use the >> >> > SessionID >> >> > as >> >> > the key to hold information on the shopping cart. >> >> > >> >> > I have copy / pasted the code into a new site. Everything is >> >> > working, >> >> > EXCEPT for the shopping cart holding the SessionID. I have >> >> > watched >> >> > the >> >> > variable, and each time I hit the 'Update' button in a datalist, >> >> > the >> >> > session >> >> > ID changes. That is a HUGE problem, and I am about to throw a >> >> > computer >> >> > out a >> >> > window. >> >> > >> >> > The session ID is supposed to stay the same!!! Where do I look? >> >> > The >> >> > sites >> >> > are on the same server. IIS 6.0 W2K3 server and updated patches. >> >> > >> >> > I am using a datalist to display the cart that is stored in the >> >> > database >> >> > using the sessionID as the key. The datalist uses LinkButtons >> >> > (update >> >> > | >> >> > delete) to run code that updates the QTY or deletes the item all >> >> > together. >> >> > Again, this is all of the same code that I have been using on >> >> > another >> >> > site >> >> > for more than a year, and works fine. >> >> > >> >> > The cart code is all on one page, and posts back to itself. I >> >> > wrote >> >> > code >> >> > that displays the sessionid on the top of the page, and it >> >> > changes >> >> > when >> >> > I >> >> > hit >> >> > the update or delete buttons. On the site that works, this does >> >> > not >> >> > happen. >> >> > >> >> > I have gone back to the site that works, and have checked all of >> >> > the >> >> > session >> >> > settings that I could find, and the only one I found was in the >> >> > web.config >> >> > file (as expected). I copy / pasted that session state code into >> >> > the >> >> > new >> >> > site, and the session cookie is still not working correctly. >> >> > >> >> > Code Snippets From Web.Config: >> >> > <sessionState >> >> > mode="InProc" >> >> > stateConnectionString="tcpip=127.0.0.1:42424" >> >> > sqlConnectionString="data >> >> > source=127.0.0.1;Trusted_Connection=yes" >> >> > cookieless="false" >> >> > timeout="30" >> >> > /> >> >> > >> >> > What else can be wrong? I HOPE it is not a bug with .NET, and it >> >> > is >> >> > a >> >> > configuration difference of the two sites, even though I have >> >> > gone >> >> > through >> >> > them with a fine tooth comb. How can it be the code, since it is >> >> > working >> >> > on >> >> > another site? I am not saying that it isn't my code, but I want >> >> > to >> >> > know >> >> > what >> >> > could be wrong with it, if it works elsewhere. >> >> > >> >> > Thanks in advance, >> >> > -- >> >> > Thanks, >> >> > Brad Simon >> >> >> >> >> >> >> >> >> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Berrucho |
last post by:
Please Help!
I recently posted this same issue but got no answer... please help
Using VB.NET, IIS5, W2K Adv SP3 all patches, .net 1.0, VS.NET 2002
Using forms authentication, persistent cookie...
|
by: Mike Kline |
last post by:
Hi There!
I'm creating a HttpModule and after AcquireRequestState event, I tried to
access the HttpApplication.Session.SessionID and somehow I'm getting a new
value on every Refersh of ASPX...
|
by: Andy Fish |
last post by:
Hi,
I have an asp.net application that is using Forms Authentication and
maintaining http session state using cookies in the normal way.
when the user clicks the logout button I do this:
...
|
by: Reza Solouki |
last post by:
Help,
I posted another thread here asking help because I was losing my session
information(got no response). After a lot of searching on different sites I
discovered that my sessionID changes...
|
by: XML newbie: Urgent pls help! |
last post by:
If I get SessionID in 1 function how do I carry that SessionID(value of this
SessionID) to another function or another form within the same project
|
by: rlueneberg |
last post by:
I am trying to foward the old sessionID using "Session.SessionID" to
an HttpWebRequest CookieContainer so that I can capture the requested
page session variables but it is not working as it is...
|
by: Rolf Welskes |
last post by:
Hello,
the following sample application in ASp.net 2.0 / VS2005 (Webproject).
in an testPage.aspx
................
<P><A href="01Test01A.aspx">Link to 01Test01 A</A></P>
<P><A...
|
by: rn5a |
last post by:
I am working on a database driven application wherein the SessionID
gets populated in a database table column.
After populatating the DB table column with several SessionIDs, I have
noticed that...
|
by: Jim |
last post by:
Using either EW or VSE2008, I want to have a GridView that will:
- Insert the logged in user's UserId from either the User table or the
membership table when the user inserts a record.
- When the...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |