<br clear="all"><div>Hi,</div><div><br></div><div>I am using sendRedirect to redirect to target url.</div><div><br></div><div>Redirection works perfectly for html page but when I try to redirect to asp page it don't works.</div>
<div><br></div><div>html page: <a href="https://wasspwin-test.testorg.biz/hello_world.html" target="_blank">https://wasspwin-test.testorg.biz/hello_world.html</a></div><div>Asp page:<a href="https://wasspwin-test.testorg.biz/all.asp" target="_blank">https://wasspwin-test.testorg.biz/all.asp</a></div>
<div><br></div><div><div>long sendRedirect(const char* url) {</div><div> HTTPResponse::sendRedirect(url);</div><div> string hdr=string("Location: ") + url + "\r\n"</div><div> "Expires: Wed, 01 Jan 1997 12:00:00 GMT\r\n"</div>
<div> "Cache-Control: max-age=0\r\n";</div><div> for (multimap<string,string>::const_iterator i = m_headers.begin(); i != m_headers.end(); ++i)</div><div> hdr += i->first + ": " + i->second + "\r\n";</div>
<div> hdr += "\r\n";</div><div> m_pfc->ServerSupportFunction(m_pfc, SF_REQ_SEND_RESPONSE_HEADER, "302 Please Wait", (ULONG_PTR)hdr.c_str(), 0);</div><div> static const char* redmsg="<HTML><BODY>Redirecting...</BODY></HTML>";</div>
<div> DWORD resplen=strlen(redmsg);</div><div> m_pfc->WriteClient(m_pfc, (LPVOID)redmsg, &resplen, 0);</div><div> return SF_STATUS_REQ_FINISHED;</div><div> }</div></div><div><br></div><div>
----------------------------------------------------------------------------------------</div>
<div>also stf.setcookie do not work. so I used pfc->AddResponseHeaders(pfc, const_cast<char*>(str.c_str()), 0);</div><div><br></div><div><div> if ( !bCookieExists )</div><div> {</div><div> res = stf.getServiceProvider().doExport(stf);</div>
<div><br></div><div> //Create WSL cookie </div><div> string str = "Set-Cookie: WSL-external=";</div><div> str += cookiehandler.CreateWSLCookie(&stf);</div><div> str += "; path=/;\r\n";</div>
<div><br></div><div> pfc->AddResponseHeaders(pfc, const_cast<char*>(str.c_str()), 0);</div><div> stf.sendRedirect(stf.getRequestURL());</div><div> if (res.first) return res.second;</div>
<div> //END </div><div> </div><div> }</div></div>-- <br>Thanks & Regards,<br>Maneesh<br><br><br>