Page 1 of 1

Issue Publishing to Azure

Posted: Sat Dec 31, 2016 2:03 am
by masciutto
Thank you for such a great library! It's working well on local host, however when I publish to my Azure web app, the following line:
"DocuViewareLicensing.RegisterKEY(MYKEYHERE)"
Throws this error in app_start:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

If I comment out the registerkey the app loads fine but I obviously can't use DocuVieware. I'm targeting framework 4.6 and believe I included all the correct assemblies.

Any help would be greatly appreciated!

Thank you.

Re: Issue Publishing to Azure

Posted: Sat Dec 31, 2016 10:28 am
by Loïc
Hi,

Are you sure you are using a DocuVieware deployment key?
Could you confirm you are on the latest build?
In all cases, are you able to share a stack trace of the exception?

With best regards,

Loïc

Re: Issue Publishing to Azure

Posted: Sat Dec 31, 2016 11:22 am
by masciutto
Thank you for the reply Loïc! The stack trace is below. I am using the DocuVieware Lite key I was emailed, my understanding from the documentation was that for Lite the key is the same for development and deployment but I could have misunderstood. Your help is greatly appreciated, I've tried so many different small changes for hours before I posted.

[UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))]
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0
System.Management.ManagementScope.InitializeGuts(Object o) +387
System.Management.ManagementScope.Initialize() +196
System.Management.ManagementObject.Initialize(Boolean getObject) +532
System.Management.ManagementClass.GetInstances(EnumerationOptions options) +121
System.Management.ManagementClass.GetInstances() +11
ᢁ.ᜀ() +64
ᜓ.ᜀ() +14
ᜓ.ᜀ(String& A_0, String& A_1, String& A_2) +252
GdPicture12.WEB.DocuViewareLicensing.RegisterKEY(String key) +129
DBLInsurance.MvcApplication.Application_Start() +175

[HttpException (0x80004005): Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9982013
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +118
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9963380
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

Re: Issue Publishing to Azure

Posted: Sat Dec 31, 2016 12:44 pm
by Loïc
Hi again,
my understanding from the documentation was that for Lite the key is the same for development and deployment but I could have misunderstood
You're right this is the way to go.

Could you tell me if you are using our latest release? I will try to guess what the issue is based on the stack trace so I need to be sure I am analyzing the good code part.

Cheers,

Loïc

Re: Issue Publishing to Azure

Posted: Sat Dec 31, 2016 9:35 pm
by masciutto
Yes, I'm using the latest release.

Re: Issue Publishing to Azure

Posted: Sun Jan 01, 2017 6:37 pm
by Loïc
Hi,

I think we've fixed the issue. Could you try a pre-release that you can find here: https://www.gdpicture.com/download/beta/ ?

Please let me know the result.

With best regards,

Loïc

Re: Issue Publishing to Azure

Posted: Tue Jan 03, 2017 3:14 am
by masciutto
It works, thank you so much for your help and Happy New Year!

Re: Issue Publishing to Azure

Posted: Tue Jan 03, 2017 6:42 pm
by Loïc
ok perfect!
Thank you for the return and happy new year too!

Cheers,

Loïc