How to Call a Transaction Integrator Proxy Object in a Secured Virtual Directory

One of the interactions Transaction Integrator (TI) has with the windows operating system is the Virtual Directory. In order to use TI and virtual directories together, you need to ensure that you have to correct credentials set on your application. By explicitly using the default credentials for your application, you can ensure that the user's credentials are property replicated across TI and virtual directory.

To call a TI proxy object in a secured virtual directory

  1. Create an instance of the new object.

  2. Set the credentials of the object to CredentialCache.DefaultCredentials.

    The default credentials of CredentialCache.DefaultCredentials are the credentials of the current user.

  3. Continue with your application.

Example

The following code shows how to call a TI proxy object that is inside a secured virtual directory.

using System;  
using System.Collections.Generic;  
using System.Text;  
using System.Net;  
  
namespace ELMBankingClient2  
{  
    class Program  
  
    {  
        static void Main(string[] args)  
        {  
            GetBal.Service MyBal = new ELMBankingClient2.GetBal.Service();  
            decimal Balance;  
            MyBal.Credentials = CredentialCache.DefaultCredentials;  
            Balance = MyBal.GetBalance("Kim Akers", "12345");  
            Console.WriteLine(Balance);  
        }  
    }  
}  

See Also

Programming Windows-Initiated Processing