Error Loading The Claim Provider Assembly
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up GAC deployed Claims membership provider assembly not found up vote 0 down vote favorite I am creating a custom membership provider for a SharePoint Foundation deployment. I have built and deployed to the Global Assembly Cache, but get an error when the logon page tries to load. I am not certain why a signed GAC-deployed assembly can not be found. Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Any help or direction is appreciated. IIS Error with Fusion trace: Parser Error Message: Could not load file or assembly 'myprovider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4120f2d354ae484d' or one of its dependencies. The system cannot find the file specified. Source Error: Line 322: UncategorizedDevelopment These silly .NET Framework errors are the ones that really bug me, you spend SOOOOO much time trying to track down these things but the error messages are so vague that it's just an exercise in frustration most times. Here's another one of my favorites - getting the error "Could not load file or assembly". Now I'm used to seeing this when your app is configured to use one version of .NET and you are trying to reference an assembly built for a previous version. I'm not saying that's the only case http://stackoverflow.com/questions/10130662/gac-deployed-claims-membership-provider-assembly-not-found where that happens, but for those of you who remember when we rolled out SharePoint 2010 and Visual Studio 2010, the way the defaults were set up in Visual Studio this happened to folks all over the place and was VERY difficult to track down; I know a lot of people that spent a lot of time fiddling with this. So…when I saw this error https://samlman.wordpress.com/2015/03/02/another-could-not-load-file-or-assembly-error-resolved/ recently that was the first thing I went looking for. My application was a custom claims provider for SharePoint 2013, and I had used NUGET to install the package for Windows Azure storage. I had done this originally with a simple .NET winforms application when I was testing out some code, and it was all working great there. So when I got this error with my custom claims provider, it was perplexing to say the least: the exact error message was Could not load file or assembly ‘Microsoft.WindowsAzure.Storage, Version=2.1.0.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. After a couple of hours trying completely random ideas (isn't that what we all end up doing with these kinds of error messages??), I finally had a brief and fleeting thought that proved to be the winner. I realized the difference between my custom claims provider and my winforms app is that I have to register my custom claims provider in the GAC. So, what I ended up doing was going through all of the assemblies that NUGET added to my project and doing a gacutil -i to install ea • ( Leave a comment ) Currently I’m working on a project where we are developing a custom claims provider, by inheriting from the SPClaimProvider class and http://wp.sjkp.dk/removing-spclaimprovider-when-file-not-found/ installing it with a farm feature that inherits from SPClaimProviderFeatureReceiver. This worked great until we did some refactoring of the code when moving it from a prototype to production ready code. https://forums.asp.net/t/956018.aspx?Error+message+Could+not+load+file+or+assembly+System+EnterpriseServices+ During this process the public key of the assembly was changed, and for some reason that left a reference to the old assembly in my development SharePoint farm. When I did error loading Get-SPClaimProvider from powershell, sharepoint would still have a reference to the old assembly. Trying to reinstall the updated claim provider from the feature would also fail, with a strange “File Not Found” exception. Apperantly the feature receiver will on install, try to uninstall existing claimproviders with the same name, and since the assembly from the original version of the claim provider error loading the couldn’t be found this process failed. Luckily the powershell cmdlet Remove-SPClaimProvider is less restrictive it simply removes the claim provider regardless of whether the assembly is missing. The command used was: Remove-SPClaimProvider –Identity “NameOfClaimProvider” Categories: SharePoint Tagged as: claimprovider powershell Simon J.K. Pedersen Sideloading of apps is not enabled on this site Could not load Microsoft.Data.OData 5.2.0 because of updated version 5.6.0 Leave a Reply Cancel reply Your email address will not be published. Required fields are marked *Comment Name * Email * Website Blogroll BitLocker Full disk encryption Developer Dashboard SharePoint 2013 Office 365 Blog Roll Office Dev on Channel9 SharePoint Links Nik Patel's SharePoint World Working with item queues from a SharePoint timer job Tags.net api app apps arm arm template Azure azure resource manager azure web app azure web sites C# certification chrome Error Exchange Feature files folder fsharp Javascript lightswitch LinQ mail app mobile service odata office office 365 office 365 api tools office app outlook powershell provision REST Service Bus sharepoint sharepoint 2007 SharePoint 2013 sharepoint online slow SQL ssl virtualbox visual studio Webpart Windows Azure Pr ASP.NET Community Standup Forums Help Home/ASP.NET Forums/Advanced ASP.NET/Enterprise Services Integration/Error message: Could not load file or assembly 'System.EnterpriseServ... Error message: Could not load file or assembly 'System.EnterpriseServices....... RSS 7 replies Last post Dec 02, 2009 09:23 AM by jaykay4 ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Support Options Advanced Search Reply kalfarlien None 0 Points 4 Posts Error message: Could not load file or assembly 'System.EnterpriseServices....... Jan 23, 2006 06:07 AM|kalfarlien|LINK I get the following error message when I am debugging a site: Could not load file or assembly 'System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Systemet could not find the file. I have tried to reinstall VS 2005 express twice, but with the same result. Do anyone have a tip what to do? Reply spaniard None 0 Points 18 Posts Re: Error message: Could not load file or assembly 'System.EnterpriseServices....... Feb 08, 2006 06:53 AM|spaniard|LINK Most probably you have a different version of the System.EnterpriseServices assembly in the global cache. Or you don't have it at all. You need to add the 2.0.0.0 version to the GAC. In order to do that just drag the file at "