I have a working Web Part used in a SharePoint site. I want to write to a virtual directory from the part, but cannot figure out how to reference the path using WriteAllText:
IO.File.WriteAllText(TreeUserDataPathPrefix & Environment.UserName & ".xml", m_TreeFolderHierarchy.GetXml())
If I set TreeUserDataPathPrefix = "~/ComponentSupport" , the write fails with "Could not find a part of the path 'c:\windows\system32\inetsrv\~\TreeSupport\Userdata\TreeData_myusername.xml'. "
Why is it trying to write to c:\windows\system32\inetsrv\~ ?
Go to the complete details ...