PDA

Click to See Complete Forum and Search --> : enable cookies problem


micksterbooty
May 18th, 2001, 11:57 PM
Hello I have a bit of a problem
My site works find on pws but when I uploaded onto server i think I have a problem with my global.asa

<script language="vbscript" runat=server>
Sub Session_OnStart
'Shopping cart array
Const cartAttributes = 5
Const maxCartItems = 10
ReDim arrcart(cartAttributes,maxCartItems)

Session("MyCart") = arrcart
Session("cartItem") = 0

End Sub
</script>

from add product.asp page:
Dim scartItem
scartItem = Session("cartItem")

If scartItem = "" Then
Response.Redirect "error.asp?msg=" & Server.URLEncode ("We noticed you do not accept cookies. Please enable cookies to shop.")
end if

My problem is i am getting redirected even though I have cookies enabled.

Has the problem got something to do with where the golbal.asa is position on the sever:
server directory:
databases folder
site1file folder
site2file folder(global.asa file inside this folder)
i.e golbal.asa only relates to site2)

Thanks in advance for any help
mick

sail3005
May 19th, 2001, 09:35 AM
As far as i know, the global.asa has to be in the root directory of the server.

JoshT
May 21st, 2001, 06:21 AM
As far as i know, the global.asa has to be in the root directory of the server.

It has to be in the root directory of the web application. You can set any folder you want to be a web application by configuring it in the IIS manager.

sail3005
May 21st, 2001, 05:52 PM
Ok, i did not know that.