I'm having a an issue with Response.Redirect and despite reading plenty of posts, I haven't been able to resolve my particular issue.
The site I'm working on integrates with a third party via a webservice. The web service returns a result as expected, after which we do some housekeeping stuff, then redirect to a third party supplied url.
Here's what happens:
If we get a specific response back, we want to redirect to an affiliated site via a link provided in the response
- We make a request and receive a response
- We update the database SQL
- We send an email using System.Net Send
After the above, we want to redirect;
Response.Redirect(resp.RedirectUrl, false);
Context.ApplicationInstance.CompleteRequest();
Despite using what seems to be the correct approach, my third party informs me that we are getting a high percentage of failed redirects. Higher in the code tree, there's plenty of error catching, so when it gets to this point it should be a case of simply redirecting.
I know that this might not all be at our end, and have requested some pattern data to establish 'who' and 'when' it's happening with.
In the meantime, I'm trying to ensure that our side is as robust as possible, so I have a few questions.
- Is there anything fundamentally wrong with the above approach?
- Is the a better approach that could be used?
- Is there anything I could/should be testing
Thanks in advance.