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.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm
<harischristou[ at ]hotmail.com> wrote in message news:4deeeb1c-0e93-4ffc-8284-2b5557f06a13[ at ]t18g2000prt.googlegroups.com...
[Quoted Text] > 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("ha...[ at ]test.com", > "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("ha...[ at ]test.com", > "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
|