1<%@ Page language="c#" debug="true"%> 2<html> 3<script runat="server"> 4 void Page_Load (Object sender,EventArgs e) 5 { 6 string browser = Context.ApplicationInstance.GetVaryByCustomString (Context, "browser"); 7 if (browser == null) 8 throw new Exception ("B1"); 9 10 try { 11 browser = Context.ApplicationInstance.GetVaryByCustomString (null, null); 12 throw new Exception ("B2"); 13 } catch (NullReferenceException) { 14 } 15 16 browser = Context.ApplicationInstance.GetVaryByCustomString (Context, "custom"); 17 if (browser != null) 18 throw new Exception ("B3"); 19 20 Response.Clear (); 21 Response.Write ("OK"); 22 Response.End (); 23 } 24</script> 25<body> 26</body> 27</html> 28