私は大きな問題で立ち往生しています。
Googleスプレッドシートへの書き込みにGoogle API(サービスアカウント)を使用するASP.NETでMVC WebAPIを構築しました。アプリケーションをうまく実行でき、スプレッドシートに書き込むこともできます。しかし、問題は、godaddy の共有 Windows サーバーでホストすると、エラーが発生することです。
[CryptographicException:
内部エラーが発生しました。
]
System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 時間) +33 System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromFile(文字列ファイル名、IntPtr パスワード、UInt32 dwFlags、Boolean persistKeySet、SafeCertContextHandle& pCertCtx)
+0
System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags) +218
System.Security.Cryptography.X509Certificates.X509Certificate.Import(String fileName, String password, X509KeyStorageFlags keyStorageFlags) +33
System. Security.Cryptography.X509Certificates.X509Certificate2.Import(文字列ファイル名、文字列パスワード、X509KeyStorageFlags keyStorageFlags) +33
d:\Aakash\Thermax\webapi\GAExampleMVC\GAExampleMVC\GoogleAnalytics\GoogleAnalytics.cs:50 の GAExampleMVC.GoogleAnalytics.GoogleAnalyticsService.GetStats() d:\Aakash\Thermax\webapi\GAExampleMVC の GAExampleMVC.Controllers.HomeController.Index() \GAExampleMVC\Controllers\HomeController.cs:16 lambda_method(Closure , ControllerBase , Object[] ) +62
System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] パラメータ) +14
System.Web.Mvc.ReflectedActionDescriptor. Execute(ControllerContext controllerContext、IDictionary 2 パラメーター) +27 System.Web.Mvc.<>c__DisplayClass15.b__12() +55 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter フィルター、ActionExecutingContext preContext、Func2 parameters) +211
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary1 continuation) +2531 フィルター、ActionDescriptor actionDescriptor、IDictionary`2 パラメーター) +189
System.Web.Mvc.<>c__DisplayClass17.<InvokeActionMethodWithFilters>b__14() +21 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext、String actionName) +324
System.Web.Mvc.Controller.ExecuteCore() +105
同じコードがlocalhostでうまく機能しているのに、なぜGodaddyで機能しないのか理解できません。
私のコードからアクセスできない証明書ストアに関連していると思います。
正確な問題とその解決方法を教えてください。