c# - OpenXML, IsolatedStorage, NETWORK SERVICE and Windows Server 2008 -



c# - OpenXML, IsolatedStorage, NETWORK SERVICE and Windows Server 2008 -

i have big web application. 1 little piece of web application generates xlsx files using openxml library (written in c#).

i've run problem described in post: isolatedstorage access denied

however, instructions there windows server 2003, , user directory hierarchy in 2008 different.

i've tried creating isolatedstorage directory in these locations (and giving network service permissions it):

c:\users\default\appdata\local\isolatedstorage c:\users\default\appdata\roaming\isolatedstorage

those did not work. i've tried find appropriate location isolatedstorage directory on windows server 2008 (generally using google , here) without success.

can tell me should create directory (or alternatively, suggest other solution forcefulness openxml instruct archive library not utilize isolatedstorage create spreadsheet)?

edit - july 14, 2011 - adding exception message , stack trace help others find this.

exception: system.applicationexception message: access denied. (exception hresult: 0x80070005 (e_accessdenied)) source: mscorlib @ system.io.isolatedstorage.isolatedstoragefile.ngetrootdir(isolatedstoragescope scope) @ system.io.isolatedstorage.isolatedstoragefile.initglobalsnonroaminguser(isolatedstoragescope scope) @ system.io.isolatedstorage.isolatedstoragefile.getrootdir(isolatedstoragescope scope) @ system.io.isolatedstorage.isolatedstoragefile.getglobalfileioperm(isolatedstoragescope scope) @ system.io.isolatedstorage.isolatedstoragefile.init(isolatedstoragescope scope) @ system.io.isolatedstorage.isolatedstoragefile.getstore(isolatedstoragescope scope, type domainevidencetype, type assemblyevidencetype) @ ms.internal.io.packaging.packagingutilities.reliableisolatedstoragefilefolder..ctor() @ ms.internal.io.packaging.packagingutilities.getdefaultisolatedstoragefile() @ ms.internal.io.packaging.packagingutilities.createuserscopedisolatedstoragefilestreamwithrandomname(int32 retrycount, string& filename) @ ms.internal.io.packaging.sparsememorystream.ensureisolatedstorestream() @ ms.internal.io.packaging.sparsememorystream.switchmodeifnecessary() @ ms.internal.io.zip.zipiofileitemstream.write(byte[] buffer, int32 offset, int32 count) @ system.io.compression.deflatestream.internalwrite(byte[] array, int32 offset, int32 count, boolean isasync) @ system.io.compression.deflatestream.write(byte[] array, int32 offset, int32 count) @ ms.internal.io.packaging.compressstream.write(byte[] buffer, int32 offset, int32 count) @ ms.internal.io.zip.progressivecrccalculatingstream.write(byte[] buffer, int32 offset, int32 count) @ ms.internal.io.zip.zipiomodeenforcingstream.write(byte[] buffer, int32 offset, int32 count) @ system.xml.xmlutf8rawtextwriter.flushbuffer() @ system.xml.xmlutf8rawtextwriter.writeattributetextblock(char* psrc, char* psrcend) @ system.xml.xmlutf8rawtextwriter.writestring(string text) @ system.xml.xmlwellformedwriter.writestring(string text) @ documentformat.openxml.openxmlelement.writeattributesto(xmlwriter xmlwriter) @ documentformat.openxml.openxmlelement.writeto(xmlwriter xmlwriter) @ documentformat.openxml.openxmlcompositeelement.writecontentto(xmlwriter w) @ documentformat.openxml.openxmlelement.writeto(xmlwriter xmlwriter) @ documentformat.openxml.openxmlcompositeelement.writecontentto(xmlwriter w) @ documentformat.openxml.openxmlelement.writeto(xmlwriter xmlwriter) @ documentformat.openxml.openxmlcompositeelement.writecontentto(xmlwriter w) @ documentformat.openxml.openxmlpartrootelement.writeto(xmlwriter xmlwriter) @ documentformat.openxml.openxmlpartrootelement.savetopart(openxmlpart openxmlpart) @ documentformat.openxml.packaging.openxmlpackage.savepartcontents() @ documentformat.openxml.packaging.openxmlpackage.dispose(boolean disposing) @ documentformat.openxml.packaging.openxmlpackage.close()

during research, stumbled across blog post well: http://www.kevinrohrbaugh.com/blog/tag/openxml

i dismissed @ first since it's not possible me have application impersonate user, due way interacts web application have no command over.

however, got thinking perhaps got rid of registry entry network service in profilelist, same result.

so, renamed hkey_local_machine\software\microsoft\windows nt\currentversion\profilelist\s-1-5-20 hkey_local_machine\software\microsoft\windows nt\currentversion\profilelist\s-1-5-20-backup , re-ran excel export , working properly. far can tell don't have negative results having done this.

c# windows-server-2008 openxml isolatedstorage

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -