简体   繁体   中英

The type initializer for 'Protexis.׋' threw an exception. Value cannot be null. Parameter name: path1

Preliminary Info:
ACT! version: v16 Premium
Host Computer: Windows 7 SP1
IDE: VS 2013

Issue:
Review this error - "The type initializer for 'Protexis.׋' threw an exception. Value cannot be null. Parameter name: path1" , upon trying to log in to my act .pad file.

Details:
It seems that when I hit this method - ACTFM.LogOn((path), user, pass); , the code breaks and I receive this error.

Attempts:

  • path , user and pass are set in my web.config and then passed into said variables. Upon testing I have verified that they are being passed. When I manually input the actual values (directly into the method), the problem persists.
  • I have attempted this solution and variations of it. Although I'm not entirely sure if I've done this correctly and wouldn't mind looking into this further
  • I have attempted this with a provided development ACT DB as well as my on test DB

Here is the stack trace:

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:

check path, user and pass. If all is ok so you do not have the needed privilege to call ACTFM.LogOn((path), user, pass);.

Your Windows user is not an Administrator User. Try to run as administrator the Visual Studio application. if the application works in debug mode but the compiled application (published on server) receive this error, so the application pool does not have administrator identity. Choose appropriate application pool, open Advanced Settings, change the identity property to Administrator.

Good Luck.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM