1
Reply

How to Create Text File in asp.net ?

Faisal Ansari

Faisal Ansari

Nov 20 2012 6:31 AM
1.9k
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)