Faisal Ansari

Faisal Ansari

  • NA
  • 451
  • 833.7k

How to Create Text File in asp.net ?

Nov 20 2012 6:31 AM
hello guys how r u ??

i have strange problem, i am creating text file in asp.net with this code

Dim file As System.IO.StreamWriter
file = System.IO.File.CreateText(D:\\abc.txt)
file.WriteLine(Header1)
file.Close()

on the localhost this code running perfectly but when i am deploying on server iis then the exception occurs

"Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500"

i am unable to understand about this ...

kindly reply me soon


Thanks..

Answers (1)