SolutionPackage.Generate Method (X509Certificate2, String, Boolean)
Generates the package and signs it with the given certificate.
Namespace: Microsoft.Office.SharePoint.ClientExtensions.Publishing
Assembly: Microsoft.Office.SharePoint.ClientExtensions (in Microsoft.Office.SharePoint.ClientExtensions.dll)
Syntax
'Declaration
Public Function Generate ( _
cert As X509Certificate2, _
targetDocLibRelativePath As String, _
selfSigned As Boolean _
) As String
'Usage
Dim instance As SolutionPackage
Dim cert As X509Certificate2
Dim targetDocLibRelativePath As String
Dim selfSigned As Boolean
Dim returnValue As String
returnValue = instance.Generate(cert, _
targetDocLibRelativePath, selfSigned)
public string Generate(
X509Certificate2 cert,
string targetDocLibRelativePath,
bool selfSigned
)
Parameters
cert
Type: System.Security.Cryptography.X509Certificates.X509Certificate2The X509 certificate used to sign the package.
targetDocLibRelativePath
Type: System.StringThe path of the document library where the package should be published. This path is relative to the site URL.
selfSigned
Type: System.Booleantrue to indicate that the specified certificate is self-signed and to bypass checking whether the root certificate is trusted; false to indicate that the specified certificate is not self-signed and to check whether the root certificate is trusted.
Return Value
Type: System.String
The solution package URL string.
Exceptions
Exception | Condition |
---|---|
PublishException | This exception is thrown if any of the following conditions applies:
|
See Also
Reference
Microsoft.Office.SharePoint.ClientExtensions.Publishing Namespace