Quantcast
Viewing all articles
Browse latest Browse all 26542

Redirect issues with native modules

Hi,

I am developing module (native C++ based) in place of an existing ISAPI filter which controls the resource access by displaying login page.

In OnBeginRequest() flow I am doing a redirection to a different location
something as follows.

hr = m_Context->GetResponse()->Redirect(res,true,false);, where m_Context is IHttpContext* and res is the new URL which is of the formhttp://<mywebsite>/Display/LoginPage?REASON=-5.

I am expected to show this URL in the browser (happens only in one Windows XPmachine and does not behave the same in IIS 7 machine.) and further do processing by picking the new redirected URL.

However  I am not getting the redirected URL  when I query for

m_Context->GetServerVariable("URL",buffer,&len); , even though the XP machine browser was showing the redirected URL.I am still getting the original URL, prior to redirecting the URL

The above call I did from OnAuthenticateRequest() which gets executed after the call to redirect from OnBeginRequest() ,

Does anything is wrong with my redirect  code? In ISAPI filter, I had been calling HTTP_FILTER_CONTEXT::ServerSupportFunction() with second argument as SF_REQ_SEND_RESPONSE_HEADER.

Regards,
George


Viewing all articles
Browse latest Browse all 26542

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>