'Protexis。׋'的类型初始化程序引发了异常。值不能为空。参数名称:path1

时间:2014-06-20 19:53:34

标签: c# asp.net .net act

初步信息:
法案!版本:v16溢价
主机:Windows 7 SP1
IDE:VS 2013

问题:
在尝试登录我的act .pad文件时,请检查此错误 - "The type initializer for 'Protexis.׋' threw an exception. Value cannot be null. Parameter name: path1"

详情:
似乎当我点击这个方法 - ACTFM.LogOn((path), user, pass);时,代码中断了,我收到了这个错误。

尝试:

  • pathuserpass在我的 web.config 中设置,然后传递到所述变量中。经过测试,我已经确认他们正在通过。当我手动输入实际值(直接输入方法)时,问题仍然存在。
  • 我尝试了this解决方案及其变体。虽然我不能完全确定我是否正确地做到了这一点,并且不会介意进一步研究这个问题
  • 我尝试使用提供的开发ACT数据库以及我的测试数据库

以下是堆栈跟踪:

System.Reflection.TargetInvocationException was unhandled by user code
HResult=-2146232828
Message=Exception has been thrown by the target of an invocation.
Source=Act.Framework
StackTrace:
    at Act.Framework.ActFramework.FailLogOn(Exception ex, TraceCategory tCat, TraceLevel tLevel)
    at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, Boolean fireEvents, Boolean suppressTierCheck, Boolean suppressSchemaCheck, Boolean suppressLicenseCheck, Boolean allowTrialModeDeparture, LogonTrack tracklogon)
    at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, Boolean fireEvents, LogonTrack tracklogon)
    at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName, LogonTrack tracklogon)
    at Act.Framework.ActFramework.LogOn(String userName, String password, String databaseType, String databaseHost, String databaseName)
    at Act.Framework.ActFramework.LogOn(String xmlPADFile, String userName, String password)
    at ACAct.getContacts() in c:\Users\user\Documents\cloud\company\projects\project\ACAct.cs:line 128
    at project._Default.Page_Load(Object sender, EventArgs e) in c:\Users\user\Documents\cloud\company\projects\project\Default.aspx.cs:line 16
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
    System.TypeInitializationException
    HResult=-2146233036
    Message=The type initializer for 'Protexis.׋' threw an exception.
    Source=Act.Shared.LicProvider
    TypeName=Protexis.׋
    StackTrace:
        at Act.ProtexisProvider.ProtexisProvider.GetMachineCode(String serialNumber)
        at Act.ProtexisProvider.ProtexisProvider.GetSerials(UInt32& totalUsers)
        at Act.ProtexisProvider.ProtexisProvider.GetSerialNumbers()
        at Act.ProtexisProvider.ProtexisProvider.get_SerialNumbers()
        at Act.ProtexisProvider.ProtexisProvider..ctor()
    InnerException:
        System.ArgumentNullException
        HResult=-2147467261
        Message=Value cannot be null. Parameter name: path1
        Source=mscorlib
        ParamName=path1
        StackTrace:
            at System.IO.Path.Combine(String path1, String path2)
            at Protexis.׋..cctor()
        InnerException:

1 个答案:

答案 0 :(得分:-1)

检查路径,用户并通过。如果一切正常,那么您没有所需的权限来调用ACTFM.LogOn((path),user,pass);.

您的Windows用户不是管理员用户。尝试以管理员身份运行Visual Studio应用程序。 如果应用程序在调试模式下工作但编译的应用程序(在服务器上发布)收到此错误,则应用程序池不具有管理员标识。选择适当的应用程序池,打开“高级设置”,将标识属性更改为“管理员”。

祝你好运。