I have a small portion of code that trips up my script every time i run it. I get the error message "Input string was not in a correct format". The offending code is:

Code:
Dim sScriptName as string = Request.ServerVariables("SCRIPT_NAME").ToLower()
Dim iLastSlash as integer = sScriptName.LastIndexOf("/")
sScriptName = sScriptName.Substring(iLastSlash + 1)
If (sScriptName.ToString() = Not "default.aspx") And (sScriptName.ToString() = Not "users.aspx") Then
	If Session("Admin") = "" Then
		Response.Redirect("Default.aspx")
	End If
End If
I also get it when running:
Code:
If Session("Admin") = Not DBNull.Value.ToString() Then
...
End If
Any ideas?