Problem using the CreateVersion on ASP.net

2322
2
02-06-2013 05:12 AM
MarvinOconitrillo
New Contributor III
I'm migrating some code which works fine on Windows Forms, but now in ASP.net I'm getting an error, I'm creating a version from one that already exist, the error says "The application is not licensed to perform this operation"; before execute the CreateVersion method I do the initialization of license and didn't get any error. Does someone know why the CreateVersion works on Windows Forms and not in ASP.net?

Thanks in advance
0 Kudos
2 Replies
RichardWatson
Frequent Contributor
Post your licensing logic.
0 Kudos
MarvinOconitrillo
New Contributor III
Hi, thanks by replying but I resolved the problem, I was using this code to license:

ESRI.ArcGIS.RuntimeManager.BindLicense(codigoProducto, nivelLicencia);


but replaced by this one and worked fine:

ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop);
m_License = new AoInitializeClass();
m_License.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcEditor);



Thank you again by reply
0 Kudos