Exchange 2010 SP1 TransportAgent will not install. RRS feed

  • Question

  • I'm trying to create a transport agent using VB.Net using the .Net Framework 3.5 (4.0 gives a different error when trying to install).

    Here is the error that I get through Power Shell:

    [PS] C:\Windows\system32>Install-TransportAgent -Name "Agent_Bounceback" -TransportAgentFactory "FormerEmployeeBounce.Fo
    rmerEmployeeBounceFactory" -AssemblyPath "C:\MyAgents\FormerEmployeeBounce.dll"
    The TransportAgentFactory type "FormerEmployeeBounce.FormerEmployeeBounceFactory" doesn't exist. The TransportAgentFact
    ory type must be the Microsoft .NET class type of the transport agent factory.
    Parameter name: TransportAgentFactory
      + CategoryInfo     : InvalidArgument: (:) [Install-TransportAgent], ArgumentException
      + FullyQualifiedErrorId : 79FE297B,Microsoft.Exchange.Management.AgentTasks.InstallTransportAgent

    A snippet of my VB.Net code is below, showing the Namespace and the Class. I'm confused as to why it says it can't find the class.


    Namespace FormerEmployeeBounce
      Public Class FormerEmployeeBounceFactory
        Inherits SmtpReceiveAgentFactory
        Private FormerEmployeeBounceConfig As New FormerEmployeeBounceConfig()
        Public Overrides Function CreateAgent(ByVal server As SmtpServer) As SmtpReceiveAgent
          Return New FormerEmployeeBounceAgent(FormerEmployeeBounceConfig, server.AddressBook)
        End Function
      End Class
      Public Class FormerEmployeeBounceAgent
        Inherits SmtpReceiveAgent
      End Class
    End Namespace
    Wednesday, March 9, 2011 8:32 PM

All replies

  • I've ran through as many other help topics as possible in this trying to get it to work and no-go.
    I've seen some suggestions to try updating the CLR to 4.0 using some registry settings.
    Problem here though, is that once I make those registry settings I can no longer open up the EMS, it times out saying it cannot connect.  The moment I remove the registry settings, I can suddenly connect again.

    I've also tried creating completely new projects using code directly from MSFT examples and compiling both as 4.0 and 3.5, and receive the same errors.

    I'm at a loss here, and really need to get this resolved ASAP.

    Thursday, March 10, 2011 7:13 PM
  • I have been able to consistently duplicate this issue with code in VB.Net.

    If I create the exact same solution in C# and use an online tool to translate my code, it works fine...

    I really would prefer to use VB.Net though!

    Friday, March 11, 2011 12:45 AM