SF OpenAccess Error
Hello-
I just got this error on a SF install. The SF site has a valid license, and there are some custom modules written using OpenAccess and the SF SDK. What would cause this issue:
Trial license for OpenAccess found. To obtain a valid license visit http://www.telerik.com . Enhanced assemblies expire after 1 day.
Timestamp: 9/13/2011 5:42:15 PMMessage: HandlingInstanceID: e6fc4408-30a5-4610-b280-196e447f441fAn exception of type 'System.Reflection.TargetInvocationException' occurred and was caught.-------------------------------------------------------------------------------------------09/13/2011 10:42:15Type : System.Reflection.TargetInvocationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089Message : Exception has been thrown by the target of an invocation.Source : mscorlibHelp link : Data : System.Collections.ListDictionaryInternalTargetSite : System.Object _InvokeConstructor(System.IRuntimeMethodInfo, System.Object[], System.SignatureStruct ByRef, System.RuntimeType)Stack Trace : at System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Telerik.Sitefinity.Data.ManagerBase`1.InstantiateManager[T](String providerName, String transactionName) at Telerik.Sitefinity.Data.ManagerBase`1.GetManager[T](String providerName, String transactionName) at Telerik.Sitefinity.Security.SecurityManager.AuthenticateUser(String membershipProviderName, String userName, String password, Boolean persistent, User& user) at Telerik.Sitefinity.Security.Web.UI.LoginForm.LoginForm_Authenticate(Object sender, AuthenticateEventArgs e) at System.Web.UI.WebControls.Login.AttemptLogin() at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)Additional Info:MachineName : ISP-BESPIN2TimeStamp : 9/13/2011 5:42:15 PMFullName : Telerik.Sitefinity.Utilities, Version=4.2.1650.0, Culture=neutral, PublicKeyToken=b28c218413bdf563AppDomainName : /LM/W3SVC/4/ROOT-1-129603977797108000ThreadIdentity : AnonymousWindowsIdentity : IIS APPPOOL\sfcontentRequested URL : /Sitefinity/Login?ReturnUrl=/Sitefinity/ Inner Exception --------------- Type : Telerik.OpenAccess.Exceptions.LicensingException, Telerik.OpenAccess, Version=2011.2.713.3, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342 Message : Trial license for OpenAccess found. To obtain a valid license visit http://www.telerik.com . Enhanced assemblies expire after 1 day, please recompile your project. Source : Unity_ILEmit_DynamicClasses Help link : InnerExceptions : FailedObject : BackendError : Reason : LicensingNotValid CanRetry : True Data : System.Collections.ListDictionaryInternal TargetSite : Void Initialize(System.String, System.Collections.Specialized.NameValueCollection, System.Type) Stack Trace : at DynamicModule.ns.Wrapped_OpenAccessMembershipProvider_84e6f1fc676b45ff9232730a344ea966.Initialize(String providerName, NameValueCollection config, Type managerType) at Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, Type providerType, ExceptionPolicyName policy, ManagerBase`1 manager) at Telerik.Sitefinity.Data.ManagerBase`1.InstantiateProvider(IDataProviderSettings providerSettings, ExceptionPolicyName policy, ManagerBase`1 manager) at Telerik.Sitefinity.Data.ManagerBase`1.SetProvider(String providerName, String transactionName)Category: ErrorLogPriority: 0EventId: 90000Severity: ErrorTitle:Enterprise Library Exception HandlingMachine: ISP-BESPIN2App Domain: /LM/W3SVC/4/ROOT-1-129603977797108000ProcessId: 4064Process Name: c:\windows\system32\inetsrv\w3wp.exeThread Name: Win32 ThreadId:3972Extended Properties: ----------------------------------------Hello Thomas Weidman,
Looks like you were using a Trial version of Open Access when you were compiling your custom modules. If the assemblies of your custom modules are enhanced with a trial version of OA they are enahnced with a time bomb. Are you using the latest Sitefinity SDK enahncer.exe to enhance your custom modules?
All the best,
Nikolay Datchev
the Telerik team
Hello-
I installed the 4.2 SDK and have all of my projects setup like this:
<?xml version="1.0" encoding="utf-8"?><Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> .... <OpenAccessPath>$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Telerik\SitefinitySDK\@LibrariesDir)</OpenAccessPath> <SitefinityLibraryPath>$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Telerik\SitefinitySDK\@LibrariesDir)</SitefinityLibraryPath> </PropertyGroup><Reference Include="Telerik.Sitefinity"> <HintPath>$(SitefinityLibraryPath)\Telerik.Sitefinity.dll</HintPath></Reference><Import Condition="Exists('$(OpenAccessPath)\OpenAccess.targets')" Project="$(OpenAccessPath)\OpenAccess.targets" />Hello Thomas,
When you install the SDK and you are ready to enhnace the custom module you don`t need to use SitefinityLibrarypath(I am not sure if it is needed). Open the module .csproj file and it should look like this.
<UserProperties OpenAccess_ConfigFile="App.config" OpenAccess_ConnectionId="DatabaseConnection1" OpenAccess_Enhancing="True" OpenAccess_UpdateDatabase="False" OpenAccess_EnhancementOutputLevel="1" /> </VisualStudio> </ProjectExtensions> <PropertyGroup> <PostBuildEvent> </PostBuildEvent> <PreBuildEvent> </PreBuildEvent> </PropertyGroup> <PropertyGroup> <OpenAccessPath>$(SolutionDir)..\..\..\..\..\Common\Dependencies\</OpenAccessPath> </PropertyGroup> <Import Condition="Exists('$(OpenAccessPath)\OpenAccess.targets')" Project="$(OpenAccessPath)\OpenAccess.targets" /></Project>OpenAccess_Enhancing="True" enhances the module with the enhancer in SDK under Common\Dependencies folder the file is enhancer.exe<OpenAccessPath>$(SolutionDir)..\..\..\..\..\Common\Dependencies is the path that will make the module search for the enhancer and associated OpenAccess assemblies. By default the module will search in the default install directory ProgramFiles\Telerik.