I try to write to Isolated Storage but get this exception. I wonder what I can be missing ?

An unhandled exception of type 'System.IO.IsolatedStorage.IsolatedStorageException' occurred in mscorlib.dll

Additional information: Unable to determine application identity of the caller.

using namespace System::IO::IsolatedStorage;


		IsolatedStorageFile^ abc = IsolatedStorageFile::GetUserStoreForApplication();


            String^ Testfile= "Test57.txt";



                 IsolatedStorageFileStream^ a1 = gcnew IsolatedStorageFileStream(Testfile, FileMode::Create, FileAccess::ReadWrite, abc );
                 StreamWriter^ WriteFile3 = gcnew StreamWriter(a1 );

			WriteFile3->WriteLine("Hello");
			WriteFile3->Close();

Missing evidence. Isolated storage requires evidence (information about the assembly and its origin) in order to determine the identity of the code and connect it to the correct associated file space. Without this information, isolated storage cannot be used.

Take a look at this article - http://msdn.microsoft.com/en-us/library/system.io.isolatedstorage.isolatedstoragefilestream(VS.71).aspx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.