Question: I am developing a rails api to work with angularjs FE app and with several other mobile application. Since I have developed separately, do I need to host separately ? If so then how to manage domains?

Answer: 
Some files are system files (such as the ones in User folder as in your case like AppData etc). you can either request permission or ignore them

```
        FileIOPermission f = new FileIOPermission(PermissionState.Unrestricted);
        f.AllLocalFiles = FileIOPermissionAccess.Read;
        try
        {
            f.Demand();
            //your code for processing files
        }
        catch (SecurityException s)
        {
            //cannot get permissions for files.got exception
            Console.WriteLine(s.Message);
        }

```

i suggest you to take a look at Code Access Security 
<https://msdn.microsoft.com/en-us/library/930b76w0(v=vs.85).aspx>

<https://msdn.microsoft.com/en-us/library/0d005ted(v=vs.90).aspx>
Use [Directory.EnumerateDirectories](https://msdn.microsoft.com/en-us/library/dd383304(v=vs.110).aspx) in order to access each folder one at a time and either ignore or log the ones that throw exceptions. This way you'll get as much as you can.

If you want to know how to get permission to a directory, that's a matter of your user account's permissions.