Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

Accessing Memory Mapped File from Web API

$
0
0

Hi all,

I need to access a memory mapped file from one of my routes in my Web API. Using the normal IIS worker settings I have no luck and my service always returns "File not found". I tried to add the prefix "Global/" but still no luck.

After reading many hours on the web I learned that I need to change the Identity of the IIS worker. So, just for testing purposes I changed the worker identity to the Administrator account. I uploaded a picture here:

http://imgur.com/MrA3byz

But still no luck. Does anyone here know how to configure IIS correctly?

Here is how I access the Memory Mapped File using c#:

string Message = "";

try
{
    string MMF_In_Name = "Global\\MMF_Name";
    MemoryMappedFile MMF_In = MemoryMappedFile.OpenExisting(MMF_In_Name);

    Messages.Add("Connected to MMF");
}
catch (Exception ex)
{
    Messages.Add(ex.Message);
}

I have double checked the name of the memory mapped file and it's correct. A command line tool run as Administrator works as expected.

I'm using IIS 8.5 on Windows Server 2012.

Thanks,

Christian


Viewing all articles
Browse latest Browse all 4850

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>