lithnet / resourcemanagement-ui-userverification

User verification module for FIM2010/MIM2016
MIT License
2 stars 0 forks source link

Unable to install the solution #5

Closed pappa75 closed 3 years ago

pappa75 commented 3 years ago

Hello Ryan,

For some reason the solution cannot be installed on MIM 2016 SP2 (version 4.6.421.0) that is running on SP 2013 (CU April 2021, version 15.0.5337.1000) as the below error appears in the event log after running the command "Install-SPSolution –Identity "user-verification.wsp" –WebApplication "https://mim.somedomain.com" -FullTrustBinDeployment –GACDeployment":

"The Execute method of job definition "SPSolutionDeploymentJobDefinition" (id "67395391-42b9-415d-8399-8d811950410b") threw an exception. Error: Cannot add the specified assembly to the global assembly cache: Microsoft.IdentityManagement.SmsServiceProviderContract.dll."

This assembly is already installed by MIM.

If also trying to run this cmdlet without -FullTrustBinDeployment parameter, the following error appears:

"Install-SPSolution : The solution "user-verification.wsp" is installing assemblies into the bin directory. The bin directory is deprecated and assemblies installed into it are no longer partially trusted, they are granted full trust. This solution should be updated to install its assemblies into the Global Assembly Cache (GAC) instead. If you fully trust this solution, and want to continue installing it into the obsolete bin directory, specify the -FullTrustBinDeployment parameter to suppress this warning. At line:1 char:1

ryannewington commented 3 years ago

@Manjunath-hk1 is this a known issue? Have we seen this in our environments?

Manjunath-hk1 commented 3 years ago

@ryannewington We did not had any installation issue. @pappa75 I am sharing the below commands and I see that -Force is missing and our webapplication address was without https for installation. I can further dig if you still have issue. Add-PSSnapin Microsoft.SharePoint.PowerShell Add-SPSolution -LiteralPath "C:\wsp\user-verification.wsp" Install-SPSolution -Identity "user-verification.wsp" -WebApplication "http://idm.fim.local" -Force -GACDeployment -FullTrustBinDeployment Enable-SPFeature -Identity user-verification -Url "http://idm.fim.local/IdentityManagement"

pappa75 commented 3 years ago

Using the -Force parameter did not help either as the deployment fails with exactly the same error. Our web app is using https only so I am not able to test with http.

ryannewington commented 3 years ago

Just doing a quick google and it seems to be a not-unknown problem with SharePoint packages.

One suggestion from here is to use gacutil to install the DLL manually and see if you get a more detailed error message that could help you figure out what is wrong.

https://sharepoint.stackexchange.com/questions/135865/install-spsolution-cannot-add-the-specified-assembly-to-the-global-assembly-cach

Rename the .wsp to .cab and you can open it in explorer and copy the SMS provider dll out.

pappa75 commented 3 years ago

Thx Ryan for the tips but since the server where I am trying to deploy the wsp package is a MIM Portal/Service server, it already has the Microsoft.IdentityManagement.SmsServiceProviderContract.dll installed in its assembly. image

In theory it could be reinstalled using the gacutil with a force parameter but this wont help solving this issue. Also this dll cannot be removed using the gacutil since there are dependencies towards MIM.

ryannewington commented 3 years ago

Gac allows multiple versions to be installed side by side. The module needs the specific version contained in the package.

Please try using gacutil to get the exact error message so we know what is going on.

pappa75 commented 3 years ago

After forcing the install of the "Microsoft.IdentityManagement.SmsServiceProviderContract.dll" using gacutil (that overwrote the existing one), the deployment to the web app actually succeeded. Tested also sending the SMS which worked great as well.