當前位置: 首頁>>代碼示例>>C#>>正文


C# Web.SSLCertificate類代碼示例

本文整理匯總了C#中WebsitePanel.Providers.Web.SSLCertificate的典型用法代碼示例。如果您正苦於以下問題:C# SSLCertificate類的具體用法?C# SSLCertificate怎麽用?C# SSLCertificate使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SSLCertificate類屬於WebsitePanel.Providers.Web命名空間,在下文中一共展示了SSLCertificate類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: installCertificate

 public override SSLCertificate installCertificate(SSLCertificate certificate, WebSite website)
 {
     var sslObjectService = new SSLModuleService();
     //
     return sslObjectService.InstallCertificate(certificate, website);
 }
開發者ID:jonwbstr,項目名稱:Websitepanel,代碼行數:6,代碼來源:IIs70.cs

示例2: DeleteCertificate

 public ResultObject DeleteCertificate(SSLCertificate certificate, WebSite website)
 {
     object[] results = this.Invoke("DeleteCertificate", new object[] {
                 certificate,
                 website});
     return ((ResultObject)(results[0]));
 }
開發者ID:jordan49,項目名稱:websitepanel,代碼行數:7,代碼來源:WebServerProxy.cs

示例3: DeleteCertificateAsync

 /// <remarks/>
 public void DeleteCertificateAsync(SSLCertificate certificate, WebSite website)
 {
     this.DeleteCertificateAsync(certificate, website, null);
 }
開發者ID:jordan49,項目名稱:websitepanel,代碼行數:5,代碼來源:WebServerProxy.cs

示例4: generateRenewalCSRAsync

 /// <remarks/>
 public void generateRenewalCSRAsync(SSLCertificate certificate)
 {
     this.generateRenewalCSRAsync(certificate, null);
 }
開發者ID:jordan49,項目名稱:websitepanel,代碼行數:5,代碼來源:WebServerProxy.cs

示例5: installCertificate

 public SSLCertificate installCertificate(SSLCertificate certificate, WebSite website)
 {
     object[] results = this.Invoke("installCertificate", new object[] {
                 certificate,
                 website});
     return ((SSLCertificate)(results[0]));
 }
開發者ID:jordan49,項目名稱:websitepanel,代碼行數:7,代碼來源:WebServerProxy.cs

示例6: DeleteCertificate

 public ResultObject DeleteCertificate(int siteId, SSLCertificate certificate)
 {
     object[] results = this.Invoke("DeleteCertificate", new object[] {
                 siteId,
                 certificate});
     return ((ResultObject)(results[0]));
 }
開發者ID:lwhitelock,項目名稱:Websitepanel,代碼行數:7,代碼來源:WebServersProxy.cs

示例7: generateRenewalCSR

 public SSLCertificate generateRenewalCSR(SSLCertificate certificate)
 {
     object[] results = this.Invoke("generateRenewalCSR", new object[] {
                 certificate});
     return ((SSLCertificate)(results[0]));
 }
開發者ID:jordan49,項目名稱:websitepanel,代碼行數:6,代碼來源:WebServerProxy.cs

示例8: installCertificate

		public SSLCertificate installCertificate(SSLCertificate certificate, WebSite website)
		{
			try
			{
				Log.WriteStart("'{0}' installCertificate", ProviderSettings.ProviderName);
				SSLCertificate result = WebProvider.installCertificate(certificate, website);
				Log.WriteEnd("'{0}' installCertificate", ProviderSettings.ProviderName);
				return result;

			}
			catch (Exception ex)
			{
				Log.WriteError(String.Format("'{0}' generateCSR", ProviderSettings.ProviderName), ex);
				throw;
			}
		}
開發者ID:lwhitelock,項目名稱:Websitepanel,代碼行數:16,代碼來源:WebServer.asmx.cs

示例9: DeleteCertificate

		public ResultObject DeleteCertificate(SSLCertificate certificate, WebSite website)
		{
			return WebProvider.DeleteCertificate(certificate, website);
		}
開發者ID:lwhitelock,項目名稱:Websitepanel,代碼行數:4,代碼來源:WebServer.asmx.cs

示例10: DeleteCertificate

		public static ResultObject DeleteCertificate(int siteId, SSLCertificate certificate)
		{

			ResultObject result = new ResultObject { IsSuccess = true };
			try
			{
				TaskManager.StartTask(LOG_SOURCE_WEB, "DeleteCertificate");
				WebSite item = GetWebSite(siteId) as WebSite;
				WebServer server = GetWebServer(item.ServiceId);
				result = server.DeleteCertificate(certificate, item);
				if (result.IsSuccess)
				{
					DataProvider.DeleteCertificate(SecurityContext.User.UserId, item.PackageId, certificate.id);
				}
				else
				{
					List<string> exceptions = result.ErrorCodes;
					foreach (string s in exceptions)
					{
						TaskManager.WriteError(s.ToString());
					}
				}
			}
			catch (Exception ex)
			{
				TaskManager.WriteError(ex);
				result.IsSuccess = false;
			}
			finally
			{
				TaskManager.CompleteTask();
			}
			return result;
		}
開發者ID:lwhitelock,項目名稱:Websitepanel,代碼行數:34,代碼來源:WebServerController.cs

示例11: generateRenewalCSR

		public SSLCertificate generateRenewalCSR(SSLCertificate certificate)
		{
			try
			{
				Log.WriteStart("'{0}' generateCSR", ProviderSettings.ProviderName);
				certificate = WebProvider.generateCSR(certificate);
				Log.WriteEnd("'{0}' generateCSR", ProviderSettings.ProviderName);
				return certificate;

			}
			catch (Exception ex)
			{
				Log.WriteError(String.Format("'{0}' generateCSR", ProviderSettings.ProviderName), ex);
				throw;
			}
		}
開發者ID:lwhitelock,項目名稱:Websitepanel,代碼行數:16,代碼來源:WebServer.asmx.cs

示例12: InstallCertificate

		public static ResultObject InstallCertificate(SSLCertificate certificate, int siteItemId)
		{
			ResultObject result = new ResultObject { IsSuccess = true };
			try
			{
				TaskManager.StartTask(LOG_SOURCE_WEB, "installCertificate");
				TaskManager.WriteParameter("SiteItemId", siteItemId);
				TaskManager.WriteParameter("Hostname", certificate.Hostname);


				WebSite item = GetWebSite(siteItemId) as WebSite;
				TaskManager.WriteParameter("WebSite.Name", item.Name);
				WebServer server = GetWebServer(item.ServiceId);
				TaskManager.WriteParameter("item.ServiceId", item.ServiceId);

                IPAddressInfo ip = ServerController.GetIPAddress(item.SiteIPAddressId);

                if (ip != null)
                    //item.SiteIPAddress = !String.IsNullOrEmpty(ip.InternalIP) ? ip.InternalIP : ip.ExternalIP;
                    item.SiteIPAddress = ip.ExternalIP;

				certificate = server.installCertificate(certificate, item);
				if (certificate.SerialNumber == null)
				{
					result.AddError("Error_Installing_certificate", null);
					result.IsSuccess = false;
				}


				DataProvider.CompleteSSLRequest(SecurityContext.User.UserId, item.PackageId,
												certificate.id, certificate.Certificate,
												certificate.DistinguishedName, certificate.SerialNumber,
												certificate.Hash, certificate.ValidFrom, certificate.ExpiryDate);
				if (certificate.IsRenewal)
				{
					DataProvider.DeleteCertificate(SecurityContext.User.UserId, item.PackageId, certificate.PreviousId);
				}

			}
			catch (Exception ex)
			{
				result.AddError("0", ex);
				TaskManager.WriteError(ex);
			}
			finally
			{
				TaskManager.CompleteTask();
			}
			return result;
		}
開發者ID:lwhitelock,項目名稱:Websitepanel,代碼行數:50,代碼來源:WebServerController.cs

示例13: CertificateRequest

		public static SSLCertificate CertificateRequest(SSLCertificate certificate, int siteItemId)
		{

			try
			{
				TaskManager.StartTask(LOG_SOURCE_WEB, "certificateRequest");
				TaskManager.WriteParameter("SiteItemId", siteItemId);
				TaskManager.WriteParameter("Hostname", certificate.Hostname);


				WebSite item = GetWebSite(siteItemId) as WebSite;
				PackageInfo service = PackageController.GetPackage(item.PackageId);
				TaskManager.WriteParameter("WebSite.Name", item.Name);
				WebServer server = GetWebServer(item.ServiceId);
				TaskManager.WriteParameter("item.ServiceId", item.ServiceId);
				certificate.UserID = service.UserId;
				// We want to have a unique identifier for the FriendlyName to help us to identify it easily
				long ticks = DateTime.UtcNow.Ticks - DateTime.Parse("01/01/1970 00:00:00").Ticks;
				ticks /= 10000000; // Convert windows ticks to seconds

                //clean up bindings



				certificate.FriendlyName = String.Format("{0}_{1}", certificate.Hostname, ticks.ToString());
				certificate = server.generateCSR(certificate);
				certificate.id = DataProvider.AddSSLRequest(SecurityContext.User.UserId, item.PackageId,
					certificate.SiteID, certificate.UserID, certificate.FriendlyName, certificate.Hostname,
					certificate.CSR, certificate.CSRLength, certificate.DistinguishedName, certificate.IsRenewal,
					certificate.PreviousId);

			}
			catch (Exception ex)
			{
				TaskManager.WriteError(ex);

			}
			finally
			{
				TaskManager.CompleteTask();
			}
			return certificate;

		}
開發者ID:lwhitelock,項目名稱:Websitepanel,代碼行數:44,代碼來源:WebServerController.cs

示例14: DeleteCertificate

 public override ResultObject DeleteCertificate(SSLCertificate certificate, WebSite website)
 {
     var sslObjectService = new SSLModuleService();
     //
     return sslObjectService.DeleteCertificate(certificate, website);
 }
開發者ID:jonwbstr,項目名稱:Websitepanel,代碼行數:6,代碼來源:IIs70.cs

示例15: InstallCertificateAsync

 /// <remarks/>
 public void InstallCertificateAsync(SSLCertificate certificate, int siteItemId)
 {
     this.InstallCertificateAsync(certificate, siteItemId, null);
 }
開發者ID:lwhitelock,項目名稱:Websitepanel,代碼行數:5,代碼來源:WebServersProxy.cs


注:本文中的WebsitePanel.Providers.Web.SSLCertificate類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。