SharePoint 2010 central administration site error - sharepoint

I have just come to revisit an old virtual sharepoint 2010 install. When I crank up central administration I get the following error:
The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)
Line 379: <compilation batch="false" debug="false">
Line 380: <assemblies>
Line 381: <add assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
I have looked in the GAC and the assemblies are there.
I have ran the central administration configuration wizard through to see if this repaired the issue.
Can anyone suggest and an approach to resolving this?
all the best

Right, I think it was an application pool setting that was the issue. The central admin app pool was set to framework version 2.0 - I have changed it to 4.0 and am now past this error.
I think this is the cause of the issue but would appreciate anyone's views on this.

Related

Could not load file or assembly 'Microsoft.Office.Excel.WebUI, Version=15.0.0.0,

i am getting below error in SharePoint 2019 site.
Could not load file or assembly 'Microsoft.Office.Excel.WebUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
i have added the assembly in GAC and did changes in web.config as well. Still same issue even after IISRESET and server reboot. Please help.
i have followed steps mentioned in below URL as well
https://techcommunity.microsoft.com/t5/sharepoint/sharepoint-2019-could-not-load-file-microsoft-office-excel-webui/m-p/508744/highlight/false#M29692
Troubleshoot the issue, check things below:
Remove the web parts and re-insert the web parts.
Add the following entry to the assemblyBinding section of the web.config file:
More reference:
Web part controls don't work after sites are migrated to SharePoint 2016.
https://support.microsoft.com/en-sg/help/4013911/some-web-parts-do-not-work-after-the-sites-is-migrated-to-sharepoint

VS2015/ASP.NET MVC 5: Can't set model type on ASPX views

I'm currently attempting to convert an older project from VS2013/MVC3 to use VS2015/MVC5, and I've ran into a problem where any old ASPX view (.aspx/.ascx) that sets a strongly-typed model causes a build error.
I've tried with a clean project made from scratch, and the same error occurs, so it makes it fairly simple to reproduce:
File > New > Project.
Create a new ASP.NET Web Application Project.
Select ASP.NET 4.6 Templates > MVC, then click OK.
Create an .ascx file in Views\Home. (Note that VS2015 doesn't have tooling to create such a file, so you'll have to create a text file and rename it or something.) It should contain:
<%# Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TestClass>" %>
Either create a new model class (like I did with TestClass), or use one of the pre-built Identity models contained in the project.
Add a call to #Html.Partial("<your_user_control>") to Home/Index.cshtml.
Run the project.
This is what I get when I do the above:
This is the version of VS2015 I'm using:
I've tried searching for every possible permutation of search that could uncover this issue, but all I could find is posts confirming that ASPX/ASCX views are indeed supported in VS2015/MVC5, or posts about old versions of MVC.
Any solutions?
A generic type declaration written in C# like ViewUserControl<TestClass> has to go into a C# code-behind file. Otherwise, you have to specify a CLR type name:
<%# Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl`1[[MyWebApplication.Models.TestClass, MyWebApplication]]" %>
Turns out you need to ensure a web.config (either your project's base one, or the ones in your base Views folder and the ones for all of your areas) has the following in there somewhere:
<system.web>
...
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
...
</system.web>
The web.config that come with the default project created in VS2015 does not include this, presumably because they assume (and probably rightly so) greenfield projects won't use the Web Forms view engine.
I found the above by double-checking the ASP.NET MVC 4->5 upgrade docs again.

web.config causing problems with iis

Up until now I have only worked with this web.config within Visual Studio. However I am now trying to publish my website to IIS and there are errors associated with my web.config. It seems that it crashes on configuration data for a module.
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />
</system.web>
<phpNet>
<classLibrary>
<add assembly="php_mcrypt.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="mcrypt" />
<add assembly="php_curl.mng, Version=3.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="curl" />
</classLibrary>
<scriptLibrary/>
</phpNet>
</configuration>
error:
This screenshot is when trying to double click on any "Feature" within the "Feature View" of IIS. However if i just hit the website via a browser the error is the same:
The configuration section 'phpNet' cannot be read because it is
missing a section declaration
phpNet is for Phalanger, and the extension should be installed but I do not know how to check that. Like I said though, this web.config and phalanger worked fine within visual studio so Im not sure whats wrong. Especially since the installer did install the samples in iis.
You are missing configuration section definition
<configSections>
<section name="phpNet" type="PHP.Core.ConfigurationSectionHandler, PhpNetCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=0a8e8c4c76728c71" />
Without this, .NET does not know the 'phpNet' configuration section.
Also this means, you don't have Phalanger installed using setup.exe. Here are some information about using Phalanger without proper installation (important is the part about configuration) http://www.php-compiler.net/blog/2011/installation-free-phalanger-web
I found this posting http://crdevelopment.net/2012/06/12/fixing-iis-error-the-configuration-section-system-web-extensions-cannot-be-read-because-it-is-missing-a-section-declaration/
which led me to check the application pools.
At which point I noticed there where multiples. I selected the phalangerAppPool and that got rid of my error, but brought about a new one.
Handler “PageHandlerFactory-Integrated” has a bad module
“ManagedPipelineHandler” in its module list
However that error was alot easier to resolve (fix)

Sharepoint Foundation: "Could not load file or assembly 'Microsoft.SharePoint.Publishing'"

I deployed some solutions to Sharepoint Central Administration.
After this, the Central Administration can't open. this error appear when I try access the site:
Error
Could not load file or assembly
'Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The
system cannot find the file specified.
I saw at some blog this error occur because the solution isn't compatible with sharepoint foundation.
So I uninstalled all solutions from site using PowerShell's Command. But the error persist.
What I need to do to fix it?
I assume you only have SharePoint Foundation installed since you get this error, (and not SharePoint Server).
I would check the web.config of the central admin website for references to 'Microsoft.SharePoint.Publishing'. Probably the custom solutions you installed left some traces there and that's causing your problem. It's not pretty but you'll probably need to remove these references manually.

WSPBuilder, Config Store and partially trusted callers

Has anyone used WSP Builder to package a solution that uses the Config Store (http://www.codeplex.com/SPConfigStore) and deploys to the bin directory of the web application?
When I try to referecne the config store in my code behind file I get this exception...
System.Security.SecurityException: That assembly does not allow partially trusted callers
I've added the partially trusted callers attribute to my project
[assembly: AllowPartiallyTrustedCallers()]
and the sharepoint permissions attributes on my methods
[SharePointPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, Impersonate = true)]
[SharePointPermissionAttribute(System.Security.Permissions.SecurityAction.Demand, ObjectModel = true)]
But this hasn't seem to have done anything, I've also specified a custom CAS policy with the correct IPermission
<IPermission class="Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" version="1" ObjectModel="True" UnsafeSaveOnGet="True" Unrestricted="True" />
And still no success, surely other people have done this, I must be missing something
I'm using WSP Builder version 1.0.5.
You have added the [assembly: AllowPartiallyTrustedCallers()] to YOUR assembly, so your assembly WILL allow for partially trusted callers to call IT.
But the ConfigStore itself does not have that attribute.
Is it possible to add your DLL to the GAC? (easy way out).
Or add the [assembly: AllowPartiallyTrustedCallers()] to the ConfigStore project as well..
Did you add the assembly to the web.config SafeControls section?
<SafeControl Assembly="Microsoft.Office.Server.Search, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.Server.Search.WebControls" TypeName="*" Safe="True" />
Also you may need to lower the trust level in the web.config:
<trust level="WSS_Minimal" originUrl="" />
See the MSDN docs for ASP.Net and SharePoint trust levels.

Resources