Cookie code now works offline but displays HTTP 500 online 
Author Message
 Cookie code now works offline but displays HTTP 500 online

Hi again,

Sorry for re-posting so soon, but this is now officially driving me mad. I
have reworked the code somewhat, and it now works for me offline on IIS.
When I upload it to my web-server however it just displays HTTP 500 error. I
think it has something to do with the CInt function and data type
mismatches, but am unsure. If anyone can point me in the right direction I
would be v. grateful, or let me know where I can find samples of this kind
of coding.

The basic idea is that if the cookie doesn't exist one is set with a count
of 1 and the sendSMS() function is called. If a cookie does exist then check
to see if its value is less than maxperday. If it is call the sendSMS()
function and increment the count by one. If it is equal or greater than
maxperday, then don't send.

That's what I know I want in my head, but getting it to work here is proving
more difficult than I imagined.

Any help greatly appreciated,
Colin Mc Mahon.

dim numberSent
dim maxperday
maxperday = 10

function sendSMS()
 Set CDOMail = Server.CreateObject("CDONTS.NewMail")

 CDOMail.Subject = Request.Form("name")
 CDOMail.Body = Request.Form("msg")
 Set CDOMail = nothing
End Function

If Len (Request.Cookies("sentmessages")) <> 0 Then
 numberSent= CInt(Request.Cookies("sentmessages"))
 If numberSent <= maxperday then
  Response.Cookies("sentmessages") = Request.Cookies("sentmessages") + 1
<!--#include file="sent.asp" -->
<!--#include file="overQuota.asp" -->
 End if
Response.Cookies("sentmessages") = 1
Response.Cookies("sentmessagers").Expires = Date + 1
<!--#include file="sent.asp" -->
End If

Mon, 23 Aug 2004 04:23:02 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Vb .net redirect to a http 500 error page

2. HTTP 500 Internal Server Error

3. Checking if outlook2000 is working Online or Offline

4. HTTP 500 Internal server error

5. HTTP 500 Internal server error

6. ASP http 500 error / Frames / Please Help

7. HTTP 500 - Internal server error ASP

8. error http 500

9. HTTP 500 - Internal server error

10. Pset doesn't work on my Thinkpad 500

11. Linux/GhostScript/Epson Stylus 500: They Work

12. Testing wheter online / offline.


Powered by phpBB® Forum Software