Vault 2017 - clmloader.dll configuration for web-based customizations

Vault 2017 - clmloader.dll configuration for web-based customizations

Anonymous
Not applicable
879 Views
1 Reply
Message 1 of 2

Vault 2017 - clmloader.dll configuration for web-based customizations

Anonymous
Not applicable

In Vault 2017, licensing moved to the Clic framework.

 

The SDK does a good job of describing how to configure your Windows forms - based application to support this new framework.  I've been able to make this work in thick client applications without issue.

 

The SDK, however, doesn't mention how to address the problem in a web-based application.  I've tried the following, but haven't had any success:

 

-added the configuration noted in the SDK to the web.config of my web application

-Compiled the web project in VS 2015 as x64; copied the x64 clmloader.dll to the bin folder

-Compiled the web project in VS 2015 as x32; copied the x632clmloader.dll to the bin folder

-Compiled the web project in VS 2015 as Any CPU; both scenarios (32 and 64 bit clmloader in the bin folder)

 

The code I'm using to create the Web Service Manager Object:

 

Autodesk.Connectivity.WebServices.ServerIdentities idty = new Autodesk.Connectivity.WebServices.ServerIdentities();
idty.DataServer = "localhost";
idty.FileServer = "localhost";

 

Autodesk.Connectivity.WebServicesTools.UserPasswordCredentials cred = new Autodesk.Connectivity.WebServicesTools.UserPasswordCredentials(idty, txtVaultName.Text, txtUserName.Text, txtUserPassword.Text);

 

//it fails here:

Autodesk.Connectivity.WebServicesTools.WebServiceManager webSvcMgr = new Autodesk.Connectivity.WebServicesTools.WebServiceManager(cred);

 

==========

 

The error that I get when trying to create a Web Service Manager object:

 

System.Runtime.InteropServices.SEHException was unhandled by user code

  ErrorCode=-2147467259

  HResult=-2147467259

  Message=External component has thrown an exception.

  Source=mscorlib

  StackTrace:

    Server stack trace:

       at Autodesk.Connectivity.WebServices.ServiceBase`1.ServiceProxy`1.Invoke(MethodInfo methodInfo, Object[] args, TServiceInterface obj)

       at Autodesk.Connectivity.WebServices.RealProxy`1.Invoke(IMethodCallMessage methodCallMsg, MethodInfo methodInfo, InvokeDelegate invokeFunc)

    Exception rethrown at [0]:

       at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

       at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

       at Autodesk.Connectivity.WebServices.IInformationService.GetSupportedProducts()

       at Autodesk.Connectivity.WebServices.InformationServiceBase.GetSupportedProducts()

       at Autodesk.Connectivity.WebServicesTools.WebServiceManager.WebServiceCredentials_SignIn()

       at Autodesk.Connectivity.WebServicesTools.WebServiceManager.SignIn()

       at Autodesk.Connectivity.WebServicesTools.WebServiceManager..ctor(IWebServiceCredentials credentials)

       at Web_Test_Two.FirstPage.btnSearch_Click(Object sender, EventArgs e) in D:\Working Folder\Forge\Web Test Two\Web Test Two\FirstPage.aspx.cs:line 93

       at System.Web.UI.WebControls.Button.OnClick(EventArgs e)

       at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)

       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

  InnerException:

 

 

Any ideas on how to configure a Visual Studio 2015 web project to consume the Web Service Manager?


Thanks in advance

0 Likes
880 Views
1 Reply
Reply (1)
Message 2 of 2

psaarloos
Collaborator
Collaborator

Hi Steve,

 

Here is something that might help. The reaons causing the problem are:

 

  1. Local IIS is using a separate user, which is never used to activate Vault Explorer before.
  2. The web page is started in another thread. (CLIC has a rule that it must be called in the main thread, otherwise it will hang)

 

Solution

  1. Specify an Identity for the application pool which hosts the web application (following https://technet.microsoft.com/en-us/library/cc771170%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396)
  2. Shift+Right click on Vault Explorer, select ‘Run as different user’, and start it as the same user above.
  3. Activate Vault Explorer.
  4. In your solution, make the following changes

 

            // Active License

            WebServiceManager.AllowUI = false;

            LicenseManager.Instance.SetActive();

 

  • Rebuild the solution, restart IIS, and it should work.

 

Hope it helps!

Regards,
Pim Saarloos
Product Manager
If my post answers your question, please click the "Accept as Solution" button. Kudos are much appreciated!
0 Likes