ExchangePerflog_*.dat files when using RDO redemption to call.LogonExchangeMailbox

H

harischristou

Hello,

I have written a simple service in VB.NET that utlizes outlook
redemption to connect to an exchange server and scan emails. This code
constantly loops so that any new mails received are also scanned. I
have included a sample of the code below.

However each time I call the following line:
Session.LogonExchangeMailbox("(e-mail address removed)",
"myexchangeserver")
a new file is written to the users temp directory called something
like: ExchangePerflog_7474fa31e83746e8bfc73df3.dat
Although these files arent that big they eventually build up and start
taking up a considerable amount of HDD space. The files also remain
behind when I log off from the exchange server and set the session to
nothing.

Any help would be really appreciated..

Thanks
Harry



Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Do
CheckExchangeEmail()
Loop
End Sub


Private Sub CheckExchangeEmail()
Const olFolderInbox As Redemption.rdoDefaultFolders = 6
Dim Session As New Redemption.RDOSession
Dim objFolder As Redemption.RDOFolder
Dim oItems As Object
Dim oItem As Redemption.RDOMail
Dim sMessageBody As String


Try


'This is the line that prompts me for login credentials
Session.LogonExchangeMailbox("(e-mail address removed)",
"myexchangeserver")


objFolder = Session.GetDefaultFolder(olFolderInbox)
oItems = objFolder.Items


For Each oItem In oItems
sMessageBody = oItem.Body
MsgBox(sMessageBody)
Next


Catch ex As Exception
Session = Nothing
Finally
If Not IsNothing(Session) Then
If Session.LoggedOn Then
Session.Logoff()
End If
End If
End Try


End Sub


End Class
 
B

Brian Tillman [MVP - Outlook]

I have written a simple service in VB.NET that utlizes outlook
redemption to connect to an exchange server and scan emails. This code
constantly loops so that any new mails received are also scanned. I
have included a sample of the code below.

microsoft.public.outlook.program_vba or .program_addins is a more
appropriate group.
 
K

Ken Slovak - [MVP - Outlook]

I believe that's normal when a dynamic profile is created/used. You would
have to use the default credentials for the logged in user in Windows to
avoid that if the logged in user has an existing profile on that machine.
Not much you can do about it other than not log in that way or do a registry
cleaning once in a while.
 
H

harischristou

Thanks Ken,

That pretty much sums up what I have found.

It appears that a new ExchangePerflog_*.dat is created in the users
temp directory each time the account is logged into. So logging into
the same account x times will create x number of .dat files - even if
we are using the same login credentials each time.

It's a pain as these files seem to hang around in the temp directory
even after we have logged off, cleaned up any objects in the code or
even stopped the service from running! After a while of having a
service login/scan/log out the PC will start to run low HDD space.

I have got around this for now by breaking up the functionality so
that I only login once and then just keep scanning. Alternatively I
could also look at ways of periodically cleaning out the temp
directory but am avoiding this for now as it doesn’t sit well as a
longer term solution. However it’s a shame that there is no way to
force the RDO session to clean up after itself.

thanks again
Harry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top