Hello,
How can I test if a SessionId is still valid ?
TIA
Mirko
To fix the compiler error, you have to add a reference to System.Runtime.Caching
assembly in the project.
OR simply add this code to your .csproj file:
<ItemGroup>
<Reference Include="System.Runtime.Caching" />
</ItemGroup>
Hello Julie,
Thanks for your quick answer. When I try to code something like if (System.Runtime.Caching.MemoryCache.Default.Get(mySessionId)==null) the compiler says that Caching doesn’t exist in System.Runtime. The funny thing is that if I test this in the quickWhatch at runtime it words indeed.
The application I’m working with creates some directories on the disc with the sessionId as name for working purposes. I now would like to destroy those directories if the session ID is no longer valid. How can I distiguish invaid ones from the ones still in use ?
TIA
Mirko
System.Runtime.Caching.MemoryCache.Default.Get(id)
Please login first to submit.