Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Modify HTTP Status and Location header using ISAPI

21 views
Skip to first unread message

princu...@gmail.com

unread,
Jan 17, 2013, 3:41:17 AM1/17/13
to
Hi

I had a requirement to develop an ISAPI to redirect users based on "404", "403" and few other errors. Basically we are migrating from sharepoint 2003 to espace. I am fine with redirecting users in case of 404 erorrs, but the challenge here is, in certain cases i need to catch the errors text from the HTML body part. For Eg. In some scenarios If users try to access an Old URL for a site which is already migrated then they will get an error message "Site reference is not in the content database". Here i need to catch this message and process it accordingly. I use visual c++ to create the dll

I went with the idea of buffering the output on "SF_NOTIFY_SEND_RAW_DATA" event and modify the header on SF_NOTIFY_END_OF_REQUEST incase the response contains the error message. The challenge what i am having here is, its throwing "out of memory error". The reason why i choose to do buffering is, the response comes in different chunks. The header comes in the first chunk and rest of the response comes in subsequent chunks. So in my case the first chunk with header will get passed when the ISAPI catch the error text and i will not be able to alter the header later. Is there any better approach i can use here to achieve this?

Thomas
0 new messages