This project has moved and is read-only. For the latest updates, please go here.


Sep 15, 2014 at 3:46 PM
I'm getting an exception as stated in subject, coming up from Novacode.DocX.Save() (full stack follows); is there a known workaround for this?

Thank you in advance,
Messaggio: Impossibile determinare l'identità del dominio. (Roughly translates to "unable to determine the identity of domain.")
Stack trace: in System.IO.IsolatedStorage.IsolatedStorage._GetAccountingInfo(Evidence evidence, Type evidenceType, IsolatedStorageScope fAssmDomApp, Object& oNormalized)
in System.IO.IsolatedStorage.IsolatedStorage.GetAccountingInfo(Evidence evidence, Type evidenceType, IsolatedStorageScope fAssmDomApp, String& typeName, String& instanceName)
in System.IO.IsolatedStorage.IsolatedStorage._InitStore(IsolatedStorageScope scope, Evidence domainEv, Type domainEvidenceType, Evidence assemEv, Type assemblyEvidenceType, Evidence appEv, Type appEvidenceType)
in System.IO.IsolatedStorage.IsolatedStorage.InitStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
in System.IO.IsolatedStorage.IsolatedStorageFile.GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
in MS.Internal.IO.Packaging.PackagingUtilities.ReliableIsolatedStorageFileFolder.GetCurrentStore()
in MS.Internal.IO.Packaging.PackagingUtilities.ReliableIsolatedStorageFileFolder..ctor()
in MS.Internal.IO.Packaging.PackagingUtilities.GetDefaultIsolatedStorageFile()
in MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(Int32 retryCount, String& fileName)
in MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary()
in MS.Internal.IO.Packaging.SparseMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
in MS.Internal.IO.Packaging.CompressEmulationStream.Write(Byte[] buffer, Int32 offset, Int32 count)
in MS.Internal.IO.Packaging.CompressStream.Write(Byte[] buffer, Int32 offset, Int32 count)
in MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
in MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Write(Byte[] buffer, Int32 offset, Int32 count)
in System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
in System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
in System.Xml.XmlEncodedRawTextWriter.FlushBuffer()
in System.Xml.XmlEncodedRawTextWriter.RawText(Char* pSrcBegin, Char* pSrcEnd)
in System.Xml.XmlEncodedRawTextWriter.RawText(String s)
in System.Xml.XmlEncodedRawTextWriterIndent.WriteIndent()
in System.Xml.XmlEncodedRawTextWriterIndent.WriteStartElement(String prefix, String localName, String ns)
in System.Xml.XmlWellFormedWriter.WriteStartElement(String prefix, String localName, String ns)
in System.Xml.Linq.ElementWriter.WriteStartElement(XElement e)
in System.Xml.Linq.ElementWriter.WriteElement(XElement e)
in System.Xml.Linq.XElement.WriteTo(XmlWriter writer)
in System.Xml.Linq.XContainer.WriteContentTo(XmlWriter writer)
in System.Xml.Linq.XDocument.WriteTo(XmlWriter writer)
in System.Xml.Linq.XDocument.Save(TextWriter textWriter, SaveOptions options)
in Novacode.DocX.Save()
Sep 23, 2014 at 2:43 PM
Sorry for bumping this up, any idea?
Sep 23, 2014 at 2:55 PM
I would take a guess you're saving it somewhere where the app doesn't have permissions or similar. Try to describe your situation, app you're using it (IIS, C# etc) and any conditition it may be affected by. Try it in diffrent place, on simpler example etc.
Sep 23, 2014 at 3:28 PM
Unfortunately this is not something I'm able to reproduce locally; it happens on deployed installations on customers' machines.
Our software is a C#, Windows Forms application. This function is broadly used by many customers without issues. We have different licensing options and both customers having this issue are using a HASP hardware key, so the whole package is protected in that way. We are asking to try to export without an antivirus running and to save on desktop/documents folder. Both customers are running Windows 7.
I saw this error came up when large amount of data is involved, which is not my case, final document is below 1 MB and less than 100 pages.
Sep 29, 2014 at 7:09 PM
Do you do any obfuscation or something like that? In the past I used part of the HASP capabilities which caused some errors with names etc - maybe there is something wrong there (guessing maybe the app name don't match with what Isolated storage is trying to access?)

Again, a guess but maybe you can try moving the problematic code to a non-protected DLL (assuming it is possible)?
Oct 21, 2014 at 12:54 PM
We finally managed to solve the problem, or at least we found a workaround with the help of Sentinel. It is indeed due to the hardware protection of the HASP key; using their Envelope software version 7 instead of previously used 7.1 no problem occurs. The problem should be fixed in next versions, probably 7.4 since 7.3 is already in pre-release stage.

Thanks everybody for the precious help.