[IronPython] Using isolated storage from IronPython in the browser

Dave Curylo curylod at asme.org
Tue Aug 10 15:58:58 CEST 2010


I'm attempting to use IsolatedStorage from IronPython running the browser,
and I keep running into the following error.  Any idea what I'm doing wrong
or is this functionality currently unsupported?

Best regards,
Dave

MethodAccessException: Security transparent method
System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForSite()
cannot access Microsoft.Scripting.Actions.Calls.MethodCandidate+Caller.Call(System.Object[],
Boolean ByRef) using reflection.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
    window.DLR = { path: 'ipy' }
</script>
<script src="ipy/dlr-20100305.js" type="text/javascript">
</script>
</head>
<body>
<script type="text/python">
from System.IO import (FileMode, StreamWriter)
from System.IO.IsolatedStorage import IsolatedStorageFile
with IsolatedStorageFile.GetUserStoreForSite() as store:
    with IsolatedStorageFileStream("test.txt", FileMode.Create, store) as
stream:
        with StreamWriter(stream) as writer:
            writer.WriteLine("Testing from IPy in Browser.")
</script>
</body>
</html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20100810/97fd5277/attachment.html>


More information about the Ironpython-users mailing list