none
How can I find the replay folder in my transportagent? RRS feed

All replies

  • Get-TransportService <SERVERNAME> | fl Identity,ReplayDirectoryPath,PickupDirectoryPath

    Configure the Pickup Directory and the Replay Directory
    http://technet.microsoft.com/en-us/library/bb124549(v=exchg.150).aspx



    Martina Miskovic


    Tuesday, October 15, 2013 1:06 AM
  • Hi;

    Let me re-phrase, how in my C# code when my transport agent DLL starts up, do I query the location of the replay folder?

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Tuesday, October 15, 2013 2:10 PM
  • Hi;

    Let me re-phrase, how in my C# code when my transport agent DLL starts up, do I query the location of the replay folder?

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?


    That is correct. You have to use folder location returned by the cmdlet. You may also have to consider the UAC settings and permissions on the folder before the transport agent can use it.

    Milind Naphade | MCTS:M (Exchange 2007 and 2010) | http://www.msexchangegeek.com RSS Feed

    Wednesday, October 16, 2013 3:21 PM
  • Hi Milind;

    I think I'm not understanding because I'm new to Exchange and so don't know what the cmdlet is.

    What is the cmdlet? How do I call it?

    thanks - dave


    Who will win The Windward International Collegiate Programming Championships?

    Wednesday, October 16, 2013 11:05 PM
  • Hello Dave,

    Much of Exchange Administration needs to be done using the Windows PowerShell. A cmdlet is a PowerShell function - think of it as a static method. You can run PowerShell cmdlets in C#, though I can't tell you exactly how (I'm from the other side, using PowerShell and occasionally adding C# to it). You may want to search for how to run Exchange PowerShell Commandlets in C#, I'm sure a few search queries will get you the answer to how to pull it of.

    Cheers,
    Fred


    There's no place like 127.0.0.1

    Thursday, October 17, 2013 6:40 AM
  • Hi David,

    You have to use Exchange Management Shell to run the cmdlet that Martina already mentioned. Replace servername with your server's name.

    I am not a developer but all I can tell you is. ReplayDirectoryPath can be queried by using Microsoft.Exchange.Data namespace. To be precise, Microsoft.Exchange.Data.Directory.Management.TransportServer using Microsoft.Exchange.Data.Directory.dll in \bin folder of Exchange installation.

    I hope that helps or gives you a pointer.


    Milind Naphade | MCTS:M (Exchange 2007 and 2010) | http://www.msexchangegeek.com RSS Feed


    Thursday, October 17, 2013 7:48 AM
  • Hi Dave,

    I'm not aware of the method Milind is talking about - but I will certainly check it out!

    Generally one uses PowerShell and yes the command is as per Martina's reply i.e. this commend executed from the Exchange Shell...

    Get-TransportService | Format-List ReplayDirectoryPath

    ...will give you the path on the current server (which is what I suspect you're after).

    Your options are:

    • Put this command in a script file and call it or (easy method)
    • Call PowerShell from C# directly (but this is harder - I can write a small example app if you want to go down this path)

    A few things to remember regardless...

    • Calling PowerShell either in a separate script or from C# is S L O W so you only want to do it at installation time or when your application starts (certainly don't call it constantly and never ever from a transport agent).
    • I'd suggest calling it once then and storing the path (perhaps in the registry) then perhaps each time before you go to drop a file in the ReplayDirectory just check the directory exists - and if, not then and only then call the script to get the new path.
    • The path could be different on each hub so don't store the path expecting it to be the same across multiple servers.

    Cheers,

    Scott



    Scott Quinn | C# developer & messaging specialist (for hire). Contact me at http://au.linkedin.com/in/scottquinn

    Friday, October 18, 2013 12:16 AM