Skip to content

Instantly share code, notes, and snippets.

@normansolutions
Last active September 17, 2015 20:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save normansolutions/6c84c627ea9502e753eb to your computer and use it in GitHub Desktop.
Save normansolutions/6c84c627ea9502e753eb to your computer and use it in GitHub Desktop.
@using System.Configuration;
@{
string ComplexURLFromWebConfig = ConfigurationManager.AppSettings["ComplexURLQueryString"].ToString().Trim();
@* QueryString sent from url *@
string QueryStringComplexURL = (Request.QueryString["ComplexURLQueryString"] ?? "").ToString().Trim();
if (ComplexURLFromWebConfig != QueryStringComplexURL || Request.Cookies["NSSecureMethodCookie"] == null)
{
var data = "Unathorised";
Response.Write(data);
Response.End();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment