Solved! Go to Solution.
Solved by wayne.brill. Go to Solution.
Hi,
Here is a suggestion to try:
>> >>
By default the SDK tries to locate the native DLLs in the same folder as the Autodesk.Connectivity.Webservices.dll assembly, but this breaks down when run under IIS, since IIS will copy a web-applications assemblies (but not native DLLs) to a “Temporary ASP.NET Files” folder where they are actually invoked from. To solve this (assuming this is the problem they are seeing), they can set an “appPath” attribute to the location of the native DLLs in the licensing section of their web.config.
For example:
<Licensing edition="Professional" appPath=”c:\full\path\to\folder\with\native\DLLs” />
<< <<
Please let me know if this solves it.
Thanks,
Wayne
Thanks for your feedback Wayne. Thats sounds logical.
Although your solution works as well, I tested another solution. I added the lines below to the web.config of the web service. (Got that from the Thin Client web.config). This works as well. What is the difference between your solution and mine? Is it that Licensing edition="None" is using the 'old' behavior by getting a license through the ADMS server?
<configSections> <section name="Licensing" type="Autodesk.Connectivity.WebServices.LicensingSection, Autodesk.Connectivity.WebServices"/> </configSections> <Licensing edition="None"/>
Hi,
Thanks for letting me know the suggestion worked.
Here is the feedback about <Licensing edition="None"/>
"That will only work if the client will only be doing a read-only signin (which does not require a license)."
Thanks,
Wayne
Just thought I'd mention that I've been having this issue too, but mine was caused by the fact that I had:
<Licensing edition="none" /> (The "N" needs to be capitalized)
And I forgot to set the AuthenticationFlags to ReadOnly.
Works now, yay.
Thanks for the info Wayne.
Gavin Bath
MFG / CAM Technical Specialist
Design and Motion Blog
Facebook | Twitter | LinkedIn | YouTube
Hi Wayne.
I'm facing the same problem, and can't get the webservice to work.
Can you provide a web.config file that has the "appPath" attribute specified?
bReg Ola
Hello Wayne,
I had this very issue and this post helped. Now however I need to be able to submit a job from a webservice so I need to consume a license. What should this value be set too?
Is there a list of valid values?
Thanks
If it's Vault Professional, then you would use:
<Licensing edition="Professional"/>
Gavin Bath
MFG / CAM Technical Specialist
Design and Motion Blog
Facebook | Twitter | LinkedIn | YouTube
Thanks. That's what I thought.
However setting it to Professional results in this exception 'System.Runtime.InteropServices.SEHException' being thrown when trying to actually login. Am I missing something else needed for getting a license.
Logging in readonly and with it set to None has no problems.
Would you mind including your code for the login call? I think the authenticationflags will need to be set to "Normal"
Also, are you deploying these files to the build folder?
I don't know exactly what your error means, but those are the main things to check, as well as making sure that the build platform target (bitness) matches the versions of the dlls that you're referencing.
Gavin Bath
MFG / CAM Technical Specialist
Design and Motion Blog
Facebook | Twitter | LinkedIn | YouTube
Here's the code to login.
Snippet
protected VaultWebServiceConnection(string VaultServer, string DefaultVault, string VaultUserName, string VaultPassword) { if (string.IsNullOrEmpty(VaultServer)) VaultServer = Settings.VaultServer; if (string.IsNullOrEmpty(DefaultVault)) DefaultVault = Settings.DefaultVault; if (string.IsNullOrEmpty(VaultUserName)) VaultUserName = Settings.VaultUserName; if (string.IsNullOrEmpty(VaultPassword)) VaultPassword = Settings.VaultPassword; ServerIdentities si = new ServerIdentities() { DataServer = Settings.VaultServer, FileServer = Settings.VaultServer }; UserPasswordCredentials usrpc = new UserPasswordCredentials(si, DefaultVault, VaultUserName, VaultPassword); try { _WebServiceManagerInstance = new WebServiceManager(usrpc); } catch (Exception ex) { throw ex; } }
And in my web.config
Snippet
<configSections> <section name="Licensing" type="Autodesk.Connectivity.WebServices.LicensingSection, Autodesk.Connectivity.WebServices" /> </configSections> <Licensing edition="Professional" />
Setting the licensing edition to Non get results in this exception. 'Autodesk.Connectivity.WebServices.VaultLicenseMismatchException'.
Setting the licensing edition to None and adding the readonly flag to the credentials allows it to login but it a permission denied error when trying to submit a Job to the the JobService.
Hmmm... I don't create the WebServiceManager directly, I use the VDF:
LogInResult results = vdf.Vault.Library.ConnectionManager.LogIn("servername", "Vaultname", "username", "password",
AuthenticationFlags.Standard, null);
And then the results object contains a connection object, which manages the WebServiceManager.
So you'd get to your WSM like so:
var wsm = results.Connection.WebServiceManager
Would that work for you?
Gavin Bath
MFG / CAM Technical Specialist
Design and Motion Blog
Facebook | Twitter | LinkedIn | YouTube
Hi,
I am having an issue as well with getting a licensed connection. I am using the VDF ConnectionManager.LogIn method. It works when the app.config contains 'Licensing="None"', but I need a writeable (ServerOnly) connection!
The error I am getting is 'Error: Exception of type ‘Autodesk.Connectivity.WebServices.VaultLicenseException’ was thrown.'
I am using this code:
result = Library.ConnectionManager.LogIn(this.textBoxServer.Text.Trim(), string.Empty, this.textBoxUsername.Text.Trim(), this.textBoxPassword.Text.Trim(), AuthenticationFlags.ServerOnly, null);
I am 100% sure all the references are in place. How can I solve the issue? On some machines it's working normally, even without the licensing attributes in the app.config, but on other machines the error as mentioned pops up. Vault Client itself works normally, as well as the job processor application on this machine.
Ok, tried it using the ConnectionManager. Same result, unable to login due to an exception. Using the ConnectionManager just doesn't throw the exception. The login still fails.
I'll keep trying different things.
Hello Pim,
I am running into the same issue and I am wondering if you ever got a solution.
I am also using VDF to authenticate. If the AuthenticationFlag is Read-only it will log in but if it is set to Standard, it fails to log in. I also have the app.config set to use "Professional" instead of "None". But doesn't seem to do correct anything. Any insight would be greatly appreciated.
Thanks,
Dan
Hi Dan,
Have you checked all the other prerequisites, such as installing a Vault client and connecting to a Vault to build the license information, now that licensing is client-side?
Gavin Bath
MFG / CAM Technical Specialist
Design and Motion Blog
Facebook | Twitter | LinkedIn | YouTube
Gavin,
Thanks for the response. Yeah I have all the prerequisites and I have the Vault Pro client installed. I can log in from the Vault Pro client but when I try to start the windows service, it hangs when it tries to log in. It doesn't return a Login Result. I have to kill the service through the command prompt.
Thanks,
Dan
Hi Dan,
Which user account is being used when you run the service? If it's the Network Service or something like that, you might want to try to change the log on of the service to another user account. Make sure you launch Vault Client using that user account as well at least one time. You can do this by right-clicking the Vault Professional application and choose 'Run as different user'.
Pim,
Thanks for your response. The user account running the service is Local System. I will try a different user account and will let you know. But below is a screencast of what I am experiencing.
Thanks,
Dan