0

我的第一个数据 Web 服务代码在本地机器上运行良好。跟随Patricker 在 stackoverflow Link To Code for WebService的回答。问题是当我在服务器上部署它时出现错误。

我是否缺少任何 WebService DLL 或依赖项,因为我在使用 VS2010 创建的可部署文件中没有看到任何内容,使用构建部署包进行上传。

我注意到错误中有一点。路径是 C:\Users\Chris\Documents\Visual Studio 2010... 这是我的本地机器,服务器是在主机服务器上生成的。怎么了?

错误

An internal error occurred.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Security.Cryptography.CryptographicException: An internal error occurred.


Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

    [CryptographicException: An internal error occurred.
    ]
       System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr) +33
       System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromFile(String fileName, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx) +0
       System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags) +237
       System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password) +80
       DataFirstWebWebService.CLinkTransaction.BuildOrderService() in C:\Users\Chris\Documents\Visual Studio 2010\Projects\DataFirstWebWebService\DataFirstWebWebService\CLinkTransaction.cs:120
       DataFirstWebWebService.CLinkTransaction.ChargeCreditCard(String cardNumber, String expMonth, String expYear, String ccv, Decimal chargeTotal, Billing billingInfo, CLinkTransResponse transResponse) in C:\Users\Chris\Documents\Visual Studio 2010\Projects\DataFirstWebWebService\DataFirstWebWebService\CLinkTransaction.cs:29
       DataFirstWebWebService._default.Button1_Click(Object sender, EventArgs e) in C:\Users\Chris\Documents\Visual Studio 2010\Projects\DataFirstWebWebService\DataFirstWebWebService\default.aspx.cs:38
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +118
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +112
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5563
4

0 回答 0