Posts

Showing posts from February, 2015

Response.End() throws an error when exporting excel in c#

Instead of Response.End() use, Possible Solution1: Response.Flush(); HttpContext.Current.ApplicationInstance.CompleteRequest(); Note1: Response.End is a bad practice, it aborts the thread to bypass the rest of the operations in the http request lifecycle and it throws an exception Possible Solution2: Also try by giving value "true" in Response.End()     Possible Solution3: Replace Response.End() with HttpContext.Current.Response.End();

SharePoint users not getting resolved - UserInfo List and User Profile Synchronization

I have two site collections both hosted in same web application. But some disabled users are getting resolved in one site and not in other. Typically it should work as the web application can get tied to only one User Profile Synchronization. After analyzing got to know, UserInfo List which is at Site Collection level is not the same for both SiteCollection. Meaning - for one site UserInfo List was updated (Synched up with User Profile) long time back and so it still holds disabled users and so it is resolving the users. Other site - UserInfo List is synched up frequently and so old disabled users are deleted and hence it is not resolving the users. UserInfo List can be found in the url https://SiteName/_catalogs/users/simple.aspx This resolves the issue