Sunday 15 June 2014

asp.net - Can't share isolated storage file between applications in different app pools -


I have under the default website has multiple web apps in IIS (WCF) services as long as they all have the same application pool they Running in a shared separate storage file can not use any problems.

However, once I tried to reach individual is incapable of separate applications to carry the I "System.IO.IsolatedStorage.IsolatedStorageException: Mutks pool" when someone went by another file they are running under the NetworkService user I GetUserStoreForAssembly and GetMachineStoreForAssembly could all do not use any idea why they file sharing tried with the same results?

I made sure that the closing of the currents and settling it is also holding someone in one case, but I am running a simple test where one service writes

apart from this , I'm reaching a separate store from a signed assembly.

Do anyone have any ideas?

Anyone have any ideas? p>

Here is the code: the

  try Private Sub LoadData () Dim filename = FullFilePath (_fileName) dim isoStorage as IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForAssembly () ' GetMachineStoreForAssembly, the same failure isoStorage. CreateDirectory (ROOT_DIRECTORY) if (isoStorage.GetFileNames (filename) .Length = 0) then return end if not drift as stream = new IsolatedStorageFileStream (filename, FileMode.OpenOrCreate, isoStorage) Section isnot something then dim formatter IFormatter = try as new BinaryFormatter then () dim app data like Hastebl = Dayrektkast (Formetr. Dayrerialaijh (stream), Hastebl) Daym Anyumretr as I DictionaryEnumerator = appData.GetEnumerator () while EnumeratorkMoveNext () End my (enumerator.key) = enumerator.value Try person while finally StreamkClose () StreamkDispose () Section = some other end not end even open stream End Sub Public Sub Save () Dim filename = Puarnfailpath (_fileName) 'IsolatedStorage. Separate storage file as dim ISO file: separate storage file.NETUserStorForAsdampon () tried 'GetMachineStoreForAssembly', in the form of a similar failure stream, dim stream = new separate storagefilestream (file name, FileMode.Create, ISO file) if there is no stream then some defraterfirmer Try IFormatter = New BinaryFormatter () formatter.Serialize (Stream, Direct Sext (m, hashtable)) Finally stream. Close () Stream. Forbidden () stream = try nothing end if end sub    

It seems that There was a trust issue.

GAC sets it as everything in Magical Gac to complete access to the separate storage file after adding assembly is fully trusted.

This works for me, but it can not always be an option to do so for other solutions. If so, then see the .NET Framework caspol utility.

Hope this helps anyone! It was a very large accessory.

No comments:

Post a Comment