Hello All;

It seems that I have just run into a small issue that I am hoping can get resolved pretty quickly, as it is the only thing that is holding me back from completely this part of my task.

In an ASHX file, I am needing to read a cookie to pass its value to a SQL Select statement to pass another value from their to a SQL Insert.

This is what I am using and it breaks everytime.
And since I am using FLASH, it is hard to find out "why" i am getting the error as I cannot view the error code(s).

This is the code

Dim strmegaun As String = context.Request.Cookies("cffmega")("user")

I am passing it to my select statement as:

getUser.Parameters.Add(New System.Data.SqlClient.SqlParameter("@Username", strmegaun))

And it is not working.
I removed the cookie reference and put in the actual value to make sure it got the value and it does, it passes the values to the INSERT statement and everything works fune, until I do the cookie reference. so I know that it is the Cookie
That is causing this issue.

Thank You
Carrzkiss

Can someone please tell me why this is not working?

I tested the code in another site and it works as long as the page is visible.
Since this is running on a JQuery it does not seem to want to work?

Any idea's would be great on this issue.

Carrzkiss

>Can someone please tell me why this is not working?

Set Expires property then see what happens.

The cookie expires in 30 days.
It has about 25 days left on the cookie.
So it is not an Expire issue, as I can read the cookie in an
AJAX example, as well as to the main page.
Just cannot get it to work/read on the JQuery (Uploadify) ASHX Page.

If I cannot get this to work, then I will just see about passing a variable through the JQuery code to the page and see if that will work??

Any others idea's?

Google Chrome is a A** of a program, it was causing all the problems.
IE8 found the problem when Chrome would not.
I am going to have to test FF to see if it is going to act like Chrome or not.

I logged into the site on Chrome, and was able to navigate, but COULD NOT upload images.
It was not finding me as being logged in.
BUT!!! (This is the A** part)
I went over the IE8 and logged into the site, and wa-la
The dag-on thing worked in both IE and Chrome.

So, my script was right the entire time, and for the last 3 days I was chasing a ghost.
So, what is the deal with Google Chrome?
Does it not read cookies properly when they are sent to it or do you have to be logged into IE or what?

Any incite on the google chrome crap please let me know.

Time to complete the development of my site, I am happy now :)

Carrzkiss

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.