Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

I can't use Evaluation Monitor on ASP . Net application

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
Andrea
Guest





PostPosted: Tue Mar 28, 2006 5:38 pm    Post subject: I can't use Evaluation Monitor on ASP . Net application Reply with quote

On Page load I try to use EvaluationMonitor to verify if the application has expired. But the application attempted to perform an operation not allowed by the security policy.

This is the complete error description:

Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Requested registry access is not allowed.

Source Error:


Line 41:
Line 42: Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Line 43: Dim monitor As New EvaluationMonitor("abms")
Line 44:
Line 45: If monitor.DaysInUse > 1 Or monitor.Invalid Then


Source File: C:\abms\choice.aspx.vb Line: 43

Stack Trace:


[SecurityException: Requested registry access is not allowed.]
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473
Infralution.Licensing.EvaluationMonitor..ctor(String productID) +289
abms.choice.Page_Load(Object sender, EventArgs e) in C:\abms\choice.aspx.vb:43
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()
System.Web.UI.Page.ProcessRequest()
System.Web.UI.Page.ProcessRequest(HttpContext context)
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87


Please, can you help me

Thanks
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Tue Mar 28, 2006 10:53 pm    Post subject: Reply with quote

Are you catching this exception in the debugger - or does it occur when you run the application outside of the debugger. The EvaluationMonitor uses registry to store/read the evaluation data. By default it will try to open a key in the (main) system part of the registry. If your process doesn't have permission to access this then this will fail causing an exception. The Evaluation monitor traps this possible exception with a try catch block - however if you are running in the debugger then the debugger may catch and break on the exception.

If the EvaluationMonitor cannot does not have permission to use the main system part of the registry then it will try to create a key in the HKEY_CURRENT_USER area of the registry. If this fails also then the exception WILL be propagated to your application. The EvaluationMonitor requires as a minimum security access to read/write keys in the HKEY_CURRENT_USER area of the registry. If you can't provide this then you won't be able to use the EvaluationMonitor in your application.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Andrea
Guest





PostPosted: Thu Mar 30, 2006 2:21 pm    Post subject: I can't use Evaluation Monitor on ASP . Net application Reply with quote

I could solve the problem with the Evaluation Monitor. It was a configuration on web.config file. But I have a question about Evaluation Monitor. The Evaluation Monitor DaysInUse property works for evaluation mode licence ?
Because, I was testing this property and it returned 1 then, i waited one day and it continues returning 1.

Thanks
Back to top
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Thu Mar 30, 2006 9:44 pm    Post subject: Reply with quote

Are you using the same productID each time you create an instance of EvaluationMonitor? The EvaluationMonitor class is completely independent of the other licensing classes. To check out the working of DaysInUse set your clock back several days, run your program the first time with a given productID. Then set you clock forward to the current day and run again with the same productID. The DaysInUse should return the number of days since. Try this with the sample License Application project.
_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group