My environment is as following:
computer name | OS | software
iis.example.com | win2016 | iis , shibboleth sp
glassfish.example.com | win2016 | glassfish
dc.example.com | win2016 | ad ds, ad fs
when i access https://iis.example.com/secure,I can see the following information in the browser:
Server Variables
Name = tom
Email = tom@yahoo.com
Tel = 0251-4584-635
which ths default.aspx file under secure folder is as following:
<% @ Page Language="C#" %>
<%
Response.Write("<h3>Server Variables</h3>");
Response.Write("Name = " + Request["name"] + "<br>");
Response.Write("Email = " + Request["HTTP_MAIL"] + "<br>");
Response.Write("Tel = " + Request["tel"] + "<br>");
%>
My question is how to send the value above to glassfish by rewrite or redirect?
i have tried as following:
1. Install the Url Rewrite Module: http://www.iis.net/download/URLRewrite
2. seting rewrite rule as follow:
[web.config]
<rewrite><rules><rule name="test" enabled="true" stopProcessing="true"><match url="^(.*)$" /><conditions logicalGrouping="MatchAny"><add input="{HTTP_MAIL}" pattern="tom@yahoo.com" /></conditions><action type="Rewrite" url="https://glassfish.example.com:28181/SSOTest/info" /><serverVariables><set name="TEST" value="ddddd" /></serverVariables></rule></rules></rewrite>
but there are two problem :
1. The following error occurred
2. when set url=https://iis.example.com/show, it can rewrite to it , but can't show the value of param(TEST).
my default.aspx file under show folder is as following:
<%@ Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>URL Rewrite Module v2 Test - Setting Server Variables</title></head><body><h1>Setting HTTP request header and a server variable with URL Rewrite Module v2</h1><% Response.Write("Name = " + Request["TEST"] + "<br>"); %><p>The originally requested URI is <strong><%= HttpUtility.HtmlEncode( Request.ServerVariables["TEST"] ) %></strong></p></body></html>
please help me , how to send values in Server Variables to glassfish?