CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Links in emails

Print topic Send  topic

Author Message
Ron
Posted: 01/02/2004, 10:52 AM

I'm using ASP w/templates and CC security to generate an email that contains a link to a page using the following:

strURL= "http://"+Request.ServerVariables("SERVER_NAME")+Request.ServerVariables("SCRIPT_NAME")
strURL= Mid(strURL,1,InstrRev(strURL,"/"))
"See details at " & strURL & "CaseResponse.asp?CaseNum=" & lngCase

This is an intranet app so I put the following in the Open Any Page event:

Dim intPos

If Session("NetID") = "" Then
intPos = InStr(Request.ServerVariables("LOGON_USER"), "\") + 1
Session("NetID") = UCase(Mid(Request.ServerVariables("LOGON_USER"), intPos))
End If

I also have the following at the end of the Global Functions:

Function CheckSecurity(pbytLevel)
If Session("NetID") = "" Then
cn.Close
Set cn = Nothing
response.redirect("SecAccessDenied.asp?QueryString=" & toURL(request.serverVariables("QUERY_STRING")) & "&ret_page=" & toURL(request.serverVariables("SCRIPT_NAME")))
Else
If CLng(SecLevel()) < CLng(pbytLevel) Then
cn.Close
Set cn = Nothing
response.redirect("SecNoPrivilages.asp?QueryString=" & toURL(request.serverVariables("QUERY_STRING")) & "&ret_page=" & toURL(request.serverVariables("SCRIPT_NAME")))
End If
End If
End Function

My problem is when the user clicks on the link from the email and they do not already have the site open in there browser they get the access denied page because there Session("NetID") = "". If they do already have the site open the page opens fine. Can anyone please explain why this is?
Edd
Posted: 01/02/2004, 2:02 PM

CheckSecurity is being called before page open, check what calls the "CheckSecurity" function it is probabling in the Globals area.


Edd
[www.syntech.com.au]

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.