Sustainsys / Saml2

Saml2 Authentication services for ASP.NET
Other
961 stars 604 forks source link

Could not install package 'Sustainsys.Saml2.HttpModule 2.7.0' #1188

Closed chrisrrowland closed 4 years ago

chrisrrowland commented 4 years ago

I'd guess this is user error but I cannot get Sustainsys.Saml2.HttpModule to install.

Information needed

  1. What nuget packages are you using Sustainsys.Saml2 Sustainsys.Saml2.HttpModule
  2. What is the expected behaviour Can install Sustainsys.Saml2.HttpModule package
  3. What happens instead. In the case of an exception, this includes the exception typ, complete exception message (personal information may be redacted) and a stack trace. Could not install package 'Sustainsys.Saml2.HttpModule 2.7.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Additional info

Please include

chrisrrowland commented 4 years ago

I think I wasn't supposed to install Sustainsys.Saml2 directly so I uninstalled that, and tried installing just Sustainsys.Saml2.HttpModule but i get the same error. Also same error for version 1.02, 2.6 and 2.7.

chrisrrowland commented 4 years ago

`Attempting to gather dependency information for package 'Sustainsys.Saml2.HttpModule.2.7.0' with respect to project 'ApplicationWeb', targeting '.NETFramework,Version=v4.6.1' Gathering dependency information took 449.09 ms Attempting to resolve dependencies for package 'Sustainsys.Saml2.HttpModule.2.7.0' with DependencyBehavior 'Lowest' Resolving dependency information took 0 ms Resolving actions to install package 'Sustainsys.Saml2.HttpModule.2.7.0' Resolved actions to install package 'Sustainsys.Saml2.HttpModule.2.7.0' Retrieving package 'Microsoft.IdentityModel.Logging 5.2.4' from 'nuget.org'. Retrieving package 'Microsoft.IdentityModel.Protocols 5.2.4' from 'nuget.org'. Retrieving package 'Microsoft.IdentityModel.Tokens 5.2.4' from 'nuget.org'. Retrieving package 'Microsoft.IdentityModel.Tokens.Saml 5.2.4' from 'nuget.org'. Retrieving package 'Microsoft.IdentityModel.Xml 5.2.4' from 'nuget.org'. Retrieving package 'Sustainsys.Saml2 2.7.0' from 'nuget.org'. Retrieving package 'Sustainsys.Saml2.HttpModule 2.7.0' from 'nuget.org'. Retrieving package 'System.ValueTuple 4.5.0' from 'nuget.org'. Adding package 'Microsoft.IdentityModel.Logging.5.2.4' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'Microsoft.IdentityModel.Logging.5.2.4' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'Microsoft.IdentityModel.Logging.5.2.4' to 'packages.config' Successfully installed 'Microsoft.IdentityModel.Logging 5.2.4' to ApplicationWeb Adding package 'Microsoft.IdentityModel.Tokens.5.2.4' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'Microsoft.IdentityModel.Tokens.5.2.4' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'Microsoft.IdentityModel.Tokens.5.2.4' to 'packages.config' Successfully installed 'Microsoft.IdentityModel.Tokens 5.2.4' to ApplicationWeb Adding package 'Microsoft.IdentityModel.Protocols.5.2.4' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'Microsoft.IdentityModel.Protocols.5.2.4' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'Microsoft.IdentityModel.Protocols.5.2.4' to 'packages.config' Successfully installed 'Microsoft.IdentityModel.Protocols 5.2.4' to ApplicationWeb Adding package 'Microsoft.IdentityModel.Xml.5.2.4' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'Microsoft.IdentityModel.Xml.5.2.4' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'Microsoft.IdentityModel.Xml.5.2.4' to 'packages.config' Successfully installed 'Microsoft.IdentityModel.Xml 5.2.4' to ApplicationWeb Adding package 'Microsoft.IdentityModel.Tokens.Saml.5.2.4' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'Microsoft.IdentityModel.Tokens.Saml.5.2.4' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'Microsoft.IdentityModel.Tokens.Saml.5.2.4' to 'packages.config' Successfully installed 'Microsoft.IdentityModel.Tokens.Saml 5.2.4' to ApplicationWeb Adding package 'System.ValueTuple.4.5.0' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'System.ValueTuple.4.5.0' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'System.ValueTuple.4.5.0' to 'packages.config' Successfully installed 'System.ValueTuple 4.5.0' to ApplicationWeb Adding package 'Sustainsys.Saml2.2.7.0' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'Sustainsys.Saml2.2.7.0' to folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Added package 'Sustainsys.Saml2.2.7.0' to 'packages.config' Successfully installed 'Sustainsys.Saml2 2.7.0' to ApplicationWeb Install failed. Rolling back... Package 'Sustainsys.Saml2.HttpModule.2.7.0 : Sustainsys.Saml2 [2.7.0, 2.7.0]' does not exist in project 'ApplicationWeb' Removed package 'Sustainsys.Saml2.2.7.0 : Microsoft.IdentityModel.Protocols [5.2.4, ), Microsoft.IdentityModel.Tokens [5.2.4, ), Microsoft.IdentityModel.Tokens.Saml [5.2.4, ), System.Configuration.ConfigurationManager [4.4.1, ), System.Security.Cryptography.Xml [4.5.0, ), System.ValueTuple [4.5.0, )' from 'packages.config' The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) Removed package 'System.ValueTuple.4.5.0' from 'packages.config'

Removed package 'Microsoft.IdentityModel.Tokens.Saml.5.2.4 : Microsoft.IdentityModel.Tokens [5.2.4, ), Microsoft.IdentityModel.Xml [5.2.4, )' from 'packages.config' The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) Removed package 'Microsoft.IdentityModel.Xml.5.2.4 : Microsoft.IdentityModel.Tokens [5.2.4, )' from 'packages.config' The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) Removed package 'Microsoft.IdentityModel.Protocols.5.2.4 : Microsoft.IdentityModel.Logging [5.2.4, ), Microsoft.IdentityModel.Tokens [5.2.4, )' from 'packages.config' The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG)) Removed package 'Microsoft.IdentityModel.Tokens.5.2.4 : Microsoft.IdentityModel.Logging [5.2.4, ), Newtonsoft.Json [10.0.1, )' from 'packages.config' Value does not fall within the expected range. Removed package 'Microsoft.IdentityModel.Logging.5.2.4' from 'packages.config'

Package 'Sustainsys.Saml2.HttpModule.2.7.0 : Sustainsys.Saml2 [2.7.0, 2.7.0]' does not exist in folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removing package 'Sustainsys.Saml2.2.7.0 : Microsoft.IdentityModel.Protocols [5.2.4, ), Microsoft.IdentityModel.Tokens [5.2.4, ), Microsoft.IdentityModel.Tokens.Saml [5.2.4, ), System.Configuration.ConfigurationManager [4.4.1, ), System.Security.Cryptography.Xml [4.5.0, ), System.ValueTuple [4.5.0, )' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removed package 'Sustainsys.Saml2.2.7.0 : Microsoft.IdentityModel.Protocols [5.2.4, ), Microsoft.IdentityModel.Tokens [5.2.4, ), Microsoft.IdentityModel.Tokens.Saml [5.2.4, ), System.Configuration.ConfigurationManager [4.4.1, ), System.Security.Cryptography.Xml [4.5.0, ), System.ValueTuple [4.5.0, )' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removing package 'System.ValueTuple.4.5.0' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removed package 'System.ValueTuple.4.5.0' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removing package 'Microsoft.IdentityModel.Tokens.Saml.5.2.4 : Microsoft.IdentityModel.Tokens [5.2.4, ), Microsoft.IdentityModel.Xml [5.2.4, )' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removed package 'Microsoft.IdentityModel.Tokens.Saml.5.2.4 : Microsoft.IdentityModel.Tokens [5.2.4, ), Microsoft.IdentityModel.Xml [5.2.4, )' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removing package 'Microsoft.IdentityModel.Xml.5.2.4 : Microsoft.IdentityModel.Tokens [5.2.4, )' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removed package 'Microsoft.IdentityModel.Xml.5.2.4 : Microsoft.IdentityModel.Tokens [5.2.4, )' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removing package 'Microsoft.IdentityModel.Protocols.5.2.4 : Microsoft.IdentityModel.Logging [5.2.4, ), Microsoft.IdentityModel.Tokens [5.2.4, )' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removed package 'Microsoft.IdentityModel.Protocols.5.2.4 : Microsoft.IdentityModel.Logging [5.2.4, ), Microsoft.IdentityModel.Tokens [5.2.4, )' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removing package 'Microsoft.IdentityModel.Tokens.5.2.4 : Microsoft.IdentityModel.Logging [5.2.4, ), Newtonsoft.Json [10.0.1, )' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removed package 'Microsoft.IdentityModel.Tokens.5.2.4 : Microsoft.IdentityModel.Logging [5.2.4, ), Newtonsoft.Json [10.0.1, )' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removing package 'Microsoft.IdentityModel.Logging.5.2.4' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Removed package 'Microsoft.IdentityModel.Logging.5.2.4' from folder 'C:\Users\user\Source\Workspaces\Application\1\MainApp\packages' Executing nuget actions took 13.77 sec Could not install package 'Sustainsys.Saml2.HttpModule 2.7.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. Time Elapsed: 00:00:14.4084251`

AndersAbel commented 4 years ago

The Sustainsys.Saml2.HttpModule package requires that your application at least targets .NET Framework 4.7.2. Unfortunately this is not shown very clear on the nuget page.

The reason is that 4.7.2 is the lowest that exposes the SameSite functionality for cookies.

chrisrrowland commented 4 years ago

Ok thank you that resolved that issue.