SharePoint 2010 Cannot add the specified assembly to the GAC

Error:

“Cannot add the specified assembly to the GAC in SharePoint 2010”

We had a solution deployed numerous times as it houses a line of business process in SharePoint 2010. On performing Upgrade Solution via stsadm or Update-Solution via Power Shell , encountered the error: cannot add the specified assembly to the GAC.

We started by created a test solution package and deployed it on the environment which worked fine to identify whether the issue was with the Package or environment.

On updating the LOB Solution , it couldn’t add the assembly to the GAC for LOB WSP, on one of the WFE servers.

Performed an IISRESET and restarted the timer service on the failing WFE, deployed the WSP package again, it did work but when we tried updating it again at the later stage, got the same error.

Solution :

I had to rely on Process Explorer to figure out what process was using the DLL and from where. The beauty of this tool is, it displays the list of processes running on the server and what DLL’s its using.

You can do a Find for the DLL file from the top menu bar to identify the process which it’s using.

I figured out using the Process Explorer, the Timer Service Process was referring to DLL from c:windowsassemblytemp

I cleared the Temp folders which had the DLL, performed an IISRESET and restarted the Timer Service

This resolved the issue for me. You will have to identify what process is conflicting and troubleshoot the same accordingly.

Advertisements

Deployment error web.config is invalid IIS Web Site

Error :

Deployment error “The web.config is invalid on this IIS Web Site”

I’ve developed a web part that deploys and works properly in my DEV environment. When I attempt to deploy to PROD I get the following error:

SOMESERVER : https://sharepointtechnicalsupport.com/ : SharePoint – 41981 :
Error: The web.config is invalid on this IIS Web Site:

C:\Inetpub\wwwroot\wss\VirtualDirectories\41981\web.config.

SOMESERVER : https://sharepointtechnicalsupport.com/ : SharePoint – 41981 : Error: The web.config is invalid on this IIS Web Site:

C:\Inetpub\wwwroot\wss\VirtualDirectories\41981\web.config.

SOMESERVER1 : https://sharepointtechnicalsupport.com/ : SharePoint – 23994 : Error: The web.config is invalid on this IIS Web Site:

C:\Inetpub\wwwroot\wss\VirtualDirectories\23994\web.config.

None of these virtual directories exist.

Solution :

In Central Administration-> Operation-> Services on Server, please stop the Windows SharePoint Services Web Application service, SharePoint will remove the sites in IIS. And then start the Windows SharePoint Services Web Application service again, SharePoint will recreate the sites in IIS based on information stored in configuration database.

A SharePoint web application can have several zones, each zone will have a separate site in IIS. You will not see all the zones in Central Administration->Application Management->Web Application List. You can find the information in Central Administration->Operation->Alternate Access Mapping.