最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to configure custom dns server in Azure VNet - Stack Overflow

programmeradmin1浏览0评论

I have an app service in azure that hosts rest api app and vnet integration enabled and have a web subnet and do not have any private end points. The rest api has following code that will send email string smtpHostUrl = "smtp.abcde";

var client = new SmtpClient(smtpHostUrl)
{
    Port = 25,
    Credentials = new NetworkCredential(smtpAuthUsername, smtpAuthPassword),
    EnableSsl = false
};

When I try to hit api end point to send email from postman getting System.Net.Mail.SmtpException exception in application insights. It looks like the DNS server cannot resolve hostname "smtp.abc".Do I need to configure custom dns server in vnet ?Will it resolve my issue ?

planning to configure custom dns server setting in Azure vnet, not sure what ip address I have to specify here.It has two IP addresses

发布评论

评论列表(0)

  1. 暂无评论