asp.net - Redirect from Global.asax file -


We have a shop that we have modified to contract with a company. He added the following in our Globl.asaks file:

  protected void Application_PreRequestHandlerExecute (object sender, EventArgs e) {string exFilePath = Request.AppRelativeCurrentExecutionFilePath.ToLower (); If ((!! ExFilePath.EndsWith ( ". Aspiaks") and; exFilePath.EndsWith ( ". Ashx")). ExFilePath.StartsWith ( "~ / admin") || exFilePath.StartsWith ( "~ / js (" ~ / errors ") || exFilePath.StartsWith (" ~ / fckeditor ") with (" ~ / app_themes ") with exFilePath.Starts (" ~ / property ")} exFilePath.StartsWith (" ~ / errors ")   

The purpose of this is to carry any person to a login screen, unless they are not going to the folders for which Ogin does not require security.

I now have them http: // [mysite] /vendorstore/PasswordHelp.aspx?Key=123&Check=V7Xc1BsH913V needs to be on

If someone can help me modify the global file, I would be grateful. I tried to add.

thanks

Itemprop = "text">

If more then your change:

  if (exeFilePath.EndsWith ("/ Passwordhelp.aspx") || (ExFilePath.EndsWith (".aspx") & ExFilePath.EndsWith (". Ashx")). ExFilePath.StartsWith ("~ / admin") || ExFilePath.StartsWith ("~ / js") || ExFilePath.StartsWith exFilePath.StartsWith ("~ / fckeditor"). ExFilePath.StartsWith ("~ / with images") exFilePath.StartsWith ("~" ("~ / errors")} exFilePath.Starts ("~ / Errors") ("~ / Webcharts"))   

Make sure you're using lowercase ("passwordhelp.aspx") ("~ / Layout ")} exFilePath.StartsWith (" ~ / webcharts "))" and make sure it is before you! ExeFilePath.EndsWith (".aspx") and ".shx" check.

Comments