Web Service exits on any file close operation via
StreamWriter, TextWrtier or FileStream. This is inefficient because the Web Service has to be reloaded on every function call. Also Static or Public Shared variables become useless.
Sample code below.
Dim Success As StreamWriter = File.AppendText(CurDir + User + "_Success.Log")
Success.AutoFlush = True
Success.WriteLine(Record + ", " + DateTime.Now())
Success.Flush()
Success.Close()The file your writing to needs to be located in the App_Data folder.
The file your writing to needs to be located in the App_Data folder.
The file your writing to needs to be located in the App_Data folder.
The file your writing to needs to be located in the App_Data folder.
The file your writing to needs to be located in the App_Data folder.
The file your writing to needs to be located in the App_Data folder.
The file your writing to needs to be located in the App_Data folder.
The file your writing to needs to be located in the App_Data folder.
The file your writing to needs to be located in the App_Data folder.
The file you write to has to be located in the App_Data folder.
The file you write to has to be located in the App_Data folder.
The file you write to has to be located in the App_Data folder.
The file you write to has to be located in the App_Data folder.
The file you write to has to be located in the App_Data folder.
The file you write to has to be located in the App_Data folder.
Monday, March 26, 2012
Web Service exits on file close
Labels:
asp,
exits,
file,
filestream,
inefficient,
net,
operation,
service,
textwrtier,
viastreamwriter,
web
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment