I have created & uploaded a module on my DNN installation. The module was successfully installed to
"D:\hshome\ikeeduin\ike.co.in\DesktopModules\II_KeepAlive"
Clearly, DNN had read/write permissions to this path. However, the module itself is trying to create a file:
"D:\hshome\ikeeduin\ike.co.in\DesktopModules\II_KeepAlive\Response\TCM.xml"
which is failing with the following exception:
InnerException: Access to the path 'D:\hshome\ikeeduin\ike.co.in\DesktopModules\II_KeepAlive\Response\TCM.xml' is denied.
FileName:
FileLineNumber: -1
FileColumnNumber: -1
Method:
StackTrace:
Message: System.UnauthorizedAccessException: Access to the path 'D:\hshome\ikeeduin\ike.co.in\DesktopModules\II_KeepAlive\Response\TCM.xml' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding) at System.Xml.XmlDocument.Save(String filename) at Imbibe.DNN.Modules.KeepAlive.KeepAliveHandler.requestCompleted(IAsyncResult ar)
Source:
Probably, I am doinf something wrong. I need to write out the entire contents of a XmlDocument to this file. I have tried all:
XmlDocument.Save, new FileStream, File.WriteAllText
All of them are failing with the same exception. Can somebody please tell me what does DNN use to have read/write acccess to its installation path??