Manually uninstall Sharepoint.Ajax assembly

Aug 8, 2007 at 12:24 PM
I´ve not been able to run my sharepoint site because i get this error:


PolicyException: Required permissions cannot be acquired.
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Boolean checkExecutionPermission) +2737877
System.Security.SecurityManager.ResolvePolicy(Evidence evidence, PermissionSet reqdPset, PermissionSet optPset, PermissionSet denyPset, PermissionSet& denied, Int32& securitySpecialFlags, Boolean checkExecutionPermission) +57

FileLoadException: Could not load file or assembly 'SharePoint.Ajax, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ed42c8fcfe5cf7c' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)
System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +211
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +141
System.Reflection.Assembly.Load(String assemblyString) +25
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +32

ConfigurationErrorsException: Could not load file or assembly 'SharePoint.Ajax, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ed42c8fcfe5cf7c' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +596
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +3487273
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +46
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +177
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +180
System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean isDirectoryAllowed) +347
System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +125
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +378

HttpException (0x80004005): Could not load file or assembly 'SharePoint.Ajax, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ed42c8fcfe5cf7c' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)
System.Web.Compilation.BuildManager.ReportTopLevelCompilationException() +57
System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled() +612
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters) +456

HttpException (0x80004005): Could not load file or assembly 'SharePoint.Ajax, Version=1.0.0.0, Culture=neutral, PublicKeyToken=5ed42c8fcfe5cf7c' or one of its dependencies. Failed to grant minimum permission requests. (Exception from HRESULT: 0x80131417)
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3434975
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +252


---------------------------------------------------------

Could you please tell me how i remove it manually, or of you know what is causing the error... please help me :)

Thank you
arnór from iceland
Coordinator
Aug 14, 2007 at 2:25 PM
arnór,

You'll get this error if the permission set required by the assembly is not granted. This means that the trust level (CAS settings) were mucked with, as the WSP manages the security required. (I talk about this in detail in chapter 10 of Inside Windows SharEPoint Services 3.0, btw.)

To uninstall, run the uninstall scripts. They should be included in the zip.

You can also go to the Solution Management page in Central Administration and retract the solutions. You can always just remove the dll, but you should get rid of the WSP as well.

Redeploying the solution (WSP files) should correct your permission issue. You could also bump up the permission in web.config but that isn't recommended for anything but a dev box.