M
Matthew
Hi all,
I have the following:
Dim oCM As CacheManager = CacheManager.GetCacheManager
Dim sConfigKey As String =
"Kensington.Middleware.RulesEngine.EngineOverrides." &
presentationType
Dim strEngineOverrides As String
If oCM("EngineOverrides" & presentationType) Is Nothing Then
Dim oXML As New XmlDocument
Dim oConfigUtil As New ConfigUtility
Dim sConfigLocation As String =
oConfigUtil.GetResourceFromConfig(System.AppDomain.CurrentDomain.BaseDirectory,
sConfigKey, True)
oXML.Load(sConfigLocation)
strEngineOverrides = oXML.OuterXml
Dim iCacheExpiry() As ICacheItemExpiration = {New
FileDependency(sConfigLocation)}
oCM.Add(sConfigKey, strEngineOverrides) ', iCacheExpiry,
CacheItemPriority.Low, New CacheItemRemovedCallback(AddressOf
Me.OnCacheExpiry))
Else
strEngineOverrides = oCM("EngineOverrides" &
presentationType)
End If
Return strEngineOverrides
My project references the following projects in my solution:
Microsoft.ApplicationBlocks.Data
Microsoft.ApplicationBlocks.Cache
Microsoft.ApplicationBlocks.ExceptionManagement
Microsoft.ApplicationBlocks.ExceptionManagement.Interfaces
Microsoft.ApplicationBlocks.MemoryMappedFile
On the add method, I get the following:
System.Exception: Encryption failed.Unable to find an entry point
named FormatMessage in DLL kernel32.dll
Which emanates from here in the WIN32DPAPI.vb in the cache assembly:
Dim isValue As Integer = FormatMessage(dwFlag,
ptrlpSource, _
errorCode, 0, lpMsgBuf, messageSize, prtArguments)
Any help would be much appreciated...
TIA
Matthew
I have the following:
Dim oCM As CacheManager = CacheManager.GetCacheManager
Dim sConfigKey As String =
"Kensington.Middleware.RulesEngine.EngineOverrides." &
presentationType
Dim strEngineOverrides As String
If oCM("EngineOverrides" & presentationType) Is Nothing Then
Dim oXML As New XmlDocument
Dim oConfigUtil As New ConfigUtility
Dim sConfigLocation As String =
oConfigUtil.GetResourceFromConfig(System.AppDomain.CurrentDomain.BaseDirectory,
sConfigKey, True)
oXML.Load(sConfigLocation)
strEngineOverrides = oXML.OuterXml
Dim iCacheExpiry() As ICacheItemExpiration = {New
FileDependency(sConfigLocation)}
oCM.Add(sConfigKey, strEngineOverrides) ', iCacheExpiry,
CacheItemPriority.Low, New CacheItemRemovedCallback(AddressOf
Me.OnCacheExpiry))
Else
strEngineOverrides = oCM("EngineOverrides" &
presentationType)
End If
Return strEngineOverrides
My project references the following projects in my solution:
Microsoft.ApplicationBlocks.Data
Microsoft.ApplicationBlocks.Cache
Microsoft.ApplicationBlocks.ExceptionManagement
Microsoft.ApplicationBlocks.ExceptionManagement.Interfaces
Microsoft.ApplicationBlocks.MemoryMappedFile
On the add method, I get the following:
System.Exception: Encryption failed.Unable to find an entry point
named FormatMessage in DLL kernel32.dll
Which emanates from here in the WIN32DPAPI.vb in the cache assembly:
Dim isValue As Integer = FormatMessage(dwFlag,
ptrlpSource, _
errorCode, 0, lpMsgBuf, messageSize, prtArguments)
Any help would be much appreciated...
TIA
Matthew