title: An error Access to the path 'xxx' is denied
body: <p>Hi i am create a file txt that show error and give link so file can be open.</p>
  
  <p>it woks on firefox  but doesnt work on ie </p>
  
  <p>here the screen shoot</p>
  
  <p>firefox</p>
  
  <p><img src="https://i.stack.imgur.com/Ecfv7.png" alt="enter image description here"></p>
  
  <p>Ie </p>
  
  <p><img src="https://i.stack.imgur.com/JTmji.png" alt="enter image description here"></p>
  
  <pre><code>If (Not System.IO.Directory.Exists("~\Errortext")) Then
                  System.IO.Directory.CreateDirectory("~\ErrorText")
              End If
  
              Dim lodt As New DataTable
              da.Fill(lodt)
              If lodt.Rows.Count &gt; 0 Then
                  Dim filex As StreamWriter = File.CreateText("~\ErrorText\Error" &amp; Session("UID") &amp; ".txt")
                  Dim i As Integer
                  For i = 0 To lodt.Rows.Count - 1
                      filex.WriteLine(Left(lodt.Rows(i).Item("colErr"), Len(lodt.Rows(i).Item("colErr")) - 1))
                  Next
  
                  filex.Close()
                  lblMessage.Text = "Click on &lt;a href=""../~/ErrorText/Error" &amp; Session("UID") &amp; ".txt""&gt;THIS ONE&lt;/a&gt; to proceed"
              Else
                  lblMessage.Text = "berhasil"
              End If
  </code></pre>