Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
132 views
in Technique[技术] by (71.8m points)

c# - .NET application to get iis headers and redirect

We have a front end application developed in React and have backend services developed in ASP.NET Web API. We are using webseal (EIAM) for authentication and the way we have is we send a request to webseal using React. Webseal authenticates and send a request with user details in iis server and it will not send the request to browser for security reasons. So we could see in iis logs the user details on the request headers but I am not sure how to get those iis headers. Both React and Web Api application are hosted in iis. So do I need to write a separate .NET application to get the headers and if so how can I read the request headers coming to application pool where React is running. So what I want is to read the request sent from webseal to IIS and get the headers.

What I have tried is to use a Default.aspx page React project and I could get the header there but the Default page is called every time. I tried writing URL rewrite and see if I can set to servervariables but I might be doing it wrong it is not working. I tried to have another web api project and have a DelegatingHandler but it only works if there is a request coming to API controller, I cannot have something like check the incoming requests to iis and if the referer is xxxx and if the header iv-user is present then get those headers.

question from:https://stackoverflow.com/questions/66055142/net-application-to-get-iis-headers-and-redirect

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...