Hi,
You are correct in noticing that the trace files are held by ASP.NET.
This is because WSE does not load the entire trace file, write one entry and
close the trace file. This would be horribly slow for large trace files.
A simple way that I have found to reset the app-domain, is by just
touching the web.config file of the service. This causes the app domain to
reset, and voila, you don't have anything holding the trace file anymore.
As always, please do think over this more carefully. If you web service
had some state information that persisted between requests for some reason,
then resetting the app domain to read the trace file is not the best way to
go.
Thanks,
Sidd [MSFT]
> When I use WSE2 to secure soap messages, I add "<trace enabled="true"
> input="inputTrace.config"
[quoted text clipped - 22 lines]
> read by XmlTextReader?
> Please help me! Thank you!
znmaster - 26 Jan 2005 08:28 GMT
Can I use code(not manually) to realize that? That's, to stop the ASPNET_wp
process, or to change the <config>section .I have to make a program to
demonstrate the content of the soap message captured in "inputTrace.config"
for my thesis. The program will run independent of VS2003IDE.
Thank you!
"Sidd" <ElCid@hotmail.com> ????????????
:ehpoTYwAFHA.3376@TK2MSFTNGP12.phx.gbl...
> Hi,
[quoted text clipped - 46 lines]
> > read by XmlTextReader?
> > Please help me! Thank you!
Sidd - 28 Jan 2005 07:09 GMT
The easiest way in code to do that would be to touch the web.config file.
You can just open the web.config file, do nothing and close it back to cause
the AppDomain to recycle.
Thanks,
Sidd [MSFT]
> Can I use code(not manually) to realize that? That's, to stop the ASPNET_wp
> process, or to change the <config>section .I have to make a program to
[quoted text clipped - 62 lines]
> > > read by XmlTextReader?
> > > Please help me! Thank you!
znmaster - 19 Feb 2005 01:36 GMT
I've tried but failed.
string closefile = @"C:\Program Files\Microsoft
WSE\v2.0\Samples\CS\QuickStart\AsymmetricEncryption\Code\AsymEncryptCodeServ
ice\web.config";
FileStream fs = File.Open(closefile,FileMode.Open);
fs.Close();
Although the file web.config is closed, the files of inputTrace.config and
outputTrace.config are still controlled by ASPNET. I cant read them.
"Sidd" <ElCid@hotmail.com> ????????????
:eb#JXhQBFHA.3492@TK2MSFTNGP12.phx.gbl...
> The easiest way in code to do that would be to touch the web.config file.
[quoted text clipped - 81 lines]
> > > > read by XmlTextReader?
> > > > Please help me! Thank you!
znmaster - 19 Feb 2005 01:38 GMT
I've tried but failed.
string closefile = @"C:\Program Files\Microsoft
WSE\v2.0\Samples\CS\QuickStart\AsymmetricEncryption\Code\AsymEncryptCodeServ
ice\web.config";
FileStream fs = File.Open(closefile,FileMode.Open);
fs.Close();
Although the file web.config is closed, the files of inputTrace.config and
outputTrace.config are still controlled by ASPNET. I cant read them.
"Sidd" <ElCid@hotmail.com> ????????????
:eb#JXhQBFHA.3492@TK2MSFTNGP12.phx.gbl...
> The easiest way in code to do that would be to touch the web.config file.
[quoted text clipped - 81 lines]
> > > > read by XmlTextReader?
> > > > Please help me! Thank you!