Last post Feb 13, 2014 12:21 AM by er_abhi
Feb 12, 2014 01:29 AM|guidodebouver|LINK
I have a problem that drives me crazy. I googled around but could not find any solution.
From a regular .NET application, I am creating a memory mapped file. I can access this memorymapped file from other .MET applications, even running with different account.
However, when I call it from an aspx page, running on IIS, it gives me a FilenotFoundException.
The code is dead simple :
The application that is creating it :
Dim m As MemoryMappedFile
Dim sec As New MemoryMappedFileSecurity
Dim id As New SecurityIdentifier(WellKnownSidType.WorldSid, Nothing)
Dim rule As New AccessRule(Of MemoryMappedFileRights)(id, MemoryMappedFileRights.FullControl, System.AccessControlType.Allow)
m = MemoryMappedFile.CreateOrOpen( "ikke", 100, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.DelayAllocatePages, sec, HandleInheritability.Inheritable)
The code ( running on IIS ) that is accessing it
Using a As MemoryMappedViewAccessor = MemoryMappedFile.OpenExisting("ikke").CreateViewAccessor
a.Read(Of Single)(1, r)
I cant get this working despite trying for days.
Any one an idea ???
Feb 12, 2014 04:25 AM|er_abhi|LINK
Try if the following helps:
- try by putting the apppool in classic pipeline mode
- also add IIS_IUSRs on folders.
IUSRs on folders.
Feb 12, 2014 12:14 PM|guidodebouver|LINK
no. putting apppool in classic pipeline mode did not help.
I did not fully understand your second suggestion
Feb 13, 2014 12:21 AM|er_abhi|LINK
navigate to your code base folder , generally in wwwroot, right click on the application folder,go to security and add user named IIS_IUSR and give it write and other permissions.