Hi Demis
and I again change my code as follows and tried
public void ExceptionResponseFilter(Container container, IHttpRequest req, IHttpResponse res, object dto)
{
var error = dto as IHttpError;
if (error == null) return;
res.Close();
}
But i still getting same error,
so in order to make it easier you to recreate i downloaded fresh copy of SocialBootsrapApi project and did following changes..
1. In the UserAuth.mdf I set Email field of UserOAuthProvider table to not null so it will throw an exception when we try to insert null
2. In web.config I removed email field from following config
<add key="oauth.facebook.Permissions" value="read_stream,offline_access" />
So that we will not get the email (actual scenario is user can manually remove scope from URL when he was asked for permission)
3. I added following ResponseFilter to AppHost.Configure to redirect,
ResponseFilters.Add((req, res, dto) =>
{
var error = dto as ServiceStack.ServiceHost.IHttpError;
if (error == null) return;
When you run this app and when you allow app from facebook and return back it will throw and sqlexception and then move to response filter, finally it shows the error I mentioned above
Thanks