t6.aspx 660 B

123456789101112131415161718192021222324252627
  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. try {
  10. browser = Context.ApplicationInstance.GetVaryByCustomString (null, null);
  11. throw new Exception ("B2");
  12. } catch (NullReferenceException) {
  13. }
  14. browser = Context.ApplicationInstance.GetVaryByCustomString (Context, "custom");
  15. if (browser != null)
  16. throw new Exception ("B3");
  17. Response.Clear ();
  18. Response.Write ("OK");
  19. Response.End ();
  20. }
  21. </script>
  22. <body>
  23. </body>
  24. </html>