The remote name could not be resolved: 'sandbox.api.mastercard.com'

I am trying to Make a request on MasterCard's sandbox for payment through MoneySend api. here is theie sample code which can also be found here for c#

public class PaymentTest
    {
        public static void Main()
        {
            string consumerKey = "your consumer key";   // You should copy this from "My Keys" on your project page e.g. UTfbhDCSeNYvJpLL5l028sWL9it739PYh6LU5lZja15xcRpY!fd209e6c579dc9d7be52da93d35ae6b6c167c174690b72fa
            string keyAlias = "keyalias";   // For production: change this to the key alias you chose when you created your production key
            string keyPassword = "keystorepassword";   // For production: change this to the key alias you chose when you created your production key
            var path = MasterCard.Core.Util.GetCurrenyAssemblyPath(); // This returns the path to your assembly so it be used to locate your cert
            string certPath = "mypath"; // e.g. /Users/yourname/project/sandbox.p12 | C:\Users\yourname\project\sandbox.p12

            ApiConfig.SetAuthentication(new OAuthAuthentication(consumerKey, certPath, keyAlias, keyPassword));   // You only need to set this once
            ApiConfig.SetDebug(true);   // Enable http wire logging
            ApiConfig.SetSandbox(true);

            try {
                RequestMap map = new RequestMap();
                map.Set ("PaymentRequestV3.LocalDate", "0817");
                map.Set ("PaymentRequestV3.LocalTime", "150149");
                map.Set ("PaymentRequestV3.TransactionReference", "1091774875227082093");
                map.Set ("PaymentRequestV3.SenderName.First", "Test");
                map.Set ("PaymentRequestV3.SenderName.Middle", "T");
                map.Set ("PaymentRequestV3.SenderName.Last", "Test");
                map.Set ("PaymentRequestV3.SenderPhone", "7031234567");
                map.Set ("PaymentRequestV3.SenderDateOfBirth", "08061977");
                map.Set ("PaymentRequestV3.SenderAddress.Line1", "123 Main Street");
                map.Set ("PaymentRequestV3.SenderAddress.Line2", "5A");
                map.Set ("PaymentRequestV3.SenderAddress.City", "Arlington");
                map.Set ("PaymentRequestV3.SenderAddress.CountrySubdivision", "VA");
                map.Set ("PaymentRequestV3.SenderAddress.PostalCode", "22207");
                map.Set ("PaymentRequestV3.SenderAddress.Country", "USA");
                map.Set ("PaymentRequestV3.FundingCard.AccountNumber", "5184680470000023");
                map.Set ("PaymentRequestV3.FundingSource", "03");
                map.Set ("PaymentRequestV3.AdditionalMessage", "Test");
                map.Set ("PaymentRequestV3.ParticipationID", "Test");
                map.Set ("PaymentRequestV3.LanguageIdentification", "Tes");
                map.Set ("PaymentRequestV3.LanguageData", "Test");
                map.Set ("PaymentRequestV3.ReceivingCard.AccountNumber", "5184680430000006");
                map.Set ("PaymentRequestV3.ReceiverName.Middle", "B");
                map.Set ("PaymentRequestV3.ReceiverName.Last", "Lopez");
                map.Set ("PaymentRequestV3.ReceiverAddress.Line1", "Pueblo Street");
                map.Set ("PaymentRequestV3.ReceiverAddress.Line2", "PO BOX 12");
                map.Set ("PaymentRequestV3.ReceiverAddress.City", "El PASO");
                map.Set ("PaymentRequestV3.ReceiverAddress.CountrySubdivision", "TX");
                map.Set ("PaymentRequestV3.ReceiverAddress.PostalCode", "79906");
                map.Set ("PaymentRequestV3.ReceiverAddress.Country", "USA");
                map.Set ("PaymentRequestV3.ReceiverPhone", "1800639426");
                map.Set ("PaymentRequestV3.ReceiverDateOfBirth", "06211977");
                map.Set ("PaymentRequestV3.ReceivingAmount.Value", "842");
                map.Set ("PaymentRequestV3.ReceivingAmount.Currency", "840");
                map.Set ("PaymentRequestV3.ICA", "009674");
                map.Set ("PaymentRequestV3.ProcessorId", "9000000442");
                map.Set ("PaymentRequestV3.RoutingAndTransitNumber", "990442082");
                map.Set ("PaymentRequestV3.CardAcceptor.Name", "THE BEST BANK");
                map.Set ("PaymentRequestV3.CardAcceptor.City", "ANYTOWN");
                map.Set ("PaymentRequestV3.CardAcceptor.State", "MO");
                map.Set ("PaymentRequestV3.CardAcceptor.PostalCode", "99999-1234");
                map.Set ("PaymentRequestV3.CardAcceptor.Country", "USA");
                map.Set ("PaymentRequestV3.TransactionDesc", "P2P");
                map.Set ("PaymentRequestV3.MerchantId", "123456");
                map.Set ("PaymentRequestV3.ReceiverIdentification.Type", "01");
                map.Set ("PaymentRequestV3.ReceiverIdentification.Number", "2147483647");
                map.Set ("PaymentRequestV3.ReceiverIdentification.CountryCode", "USA");
                map.Set ("PaymentRequestV3.ReceiverIdentification.ExpirationDate", "10102017");
                map.Set ("PaymentRequestV3.ReceiverNationality", "USA");
                map.Set ("PaymentRequestV3.ReceiverCountryOfBirth", "USA");
                map.Set ("PaymentRequestV3.SenderIdentification.Type", "01");
                map.Set ("PaymentRequestV3.SenderIdentification.Number", "2147483647");
                map.Set ("PaymentRequestV3.SenderIdentification.CountryCode", "USA");
                map.Set ("PaymentRequestV3.SenderIdentification.ExpirationDate", "10102017");
                map.Set ("PaymentRequestV3.SenderNationality", "USA");
                map.Set ("PaymentRequestV3.SenderCountryOfBirth", "USA");
                map.Set ("PaymentRequestV3.TransactionPurpose", "01");
                Payment response = Payment.Create(map);

                Console.WriteLine("Transfer.RequestId--> {0}", response["Transfer.RequestId"]); //Transfer.RequestId-->1413236
                Console.WriteLine("Transfer.TransactionReference--> {0}", response["Transfer.TransactionReference"]); //Transfer.TransactionReference-->1091774875227082093
                Console.WriteLine("Transfer.TransactionHistory.Transaction[0].Type--> {0}", response["Transfer.TransactionHistory.Transaction[0].Type"]); //Transfer.TransactionHistory.Transaction[0].Type-->PAYMENT
                Console.WriteLine("Transfer.TransactionHistory.Transaction[0].SystemTraceAuditNumber--> {0}", response["Transfer.TransactionHistory.Transaction[0].SystemTraceAuditNumber"]); //Transfer.TransactionHistory.Transaction[0].SystemTraceAuditNumber-->212849
                Console.WriteLine("Transfer.TransactionHistory.Transaction[0].NetworkReferenceNumber--> {0}", response["Transfer.TransactionHistory.Transaction[0].NetworkReferenceNumber"]); //Transfer.TransactionHistory.Transaction[0].NetworkReferenceNumber-->313371112
                Console.WriteLine("Transfer.TransactionHistory.Transaction[0].SettlementDate--> {0}", response["Transfer.TransactionHistory.Transaction[0].SettlementDate"]); //Transfer.TransactionHistory.Transaction[0].SettlementDate-->0818
                Console.WriteLine("Transfer.TransactionHistory.Transaction[0].Response.Code--> {0}", response["Transfer.TransactionHistory.Transaction[0].Response.Code"]); //Transfer.TransactionHistory.Transaction[0].Response.Code-->00
                Console.WriteLine("Transfer.TransactionHistory.Transaction[0].Response.Description--> {0}", response["Transfer.TransactionHistory.Transaction[0].Response.Description"]); //Transfer.TransactionHistory.Transaction[0].Response.Description-->Approved or completed successfully
                Console.WriteLine("Transfer.TransactionHistory.Transaction[0].SubmitDateTime--> {0}", response["Transfer.TransactionHistory.Transaction[0].SubmitDateTime"]); //Transfer.TransactionHistory.Transaction[0].SubmitDateTime-->2016-08-17T09:31:54Z

            } catch (ApiException e) {
                Console.Error.WriteLine("HttpStatus: {0}", e.HttpStatus);
                Console.Error.WriteLine("Message: {0}", e.Message);
                Console.Error.WriteLine("ReasonCode: {0}", e.ReasonCode);
                Console.Error.WriteLine("Source: {0}", e.Source);
            }

        }
    }

When I am trying to make request through directly visual studio it works perfectly, but when I deployed this service at IIS this show an error

The remote name could not be resolved: 'sandbox.api.mastercard.com'