locked
Adding CNAME via C# code RRS feed

  • Question

  • User-1870594912 posted

    Hi Team

    I have a requirement to add App Domain, IIS Site via C# code and configure the site accessible via internet.

    When I add a sub domain manually via 'Control Panel' (Plesk) of hosted environment, it works well.

    At the time of creating from c# code, everything works (like creation of App Pool, IIS site) but it is still inaccessible from internet.

    The reason I found that my code is not adding CNAME and A records to DNS.

    By the term 'still inaccessible from internet' I mean to say that when I am trying to access that say I have created a sub domain SubA under my main Domain 'Domain'.

    THe custom code has created the app pool, IIS site, linked App pool to IIS , also created the binding records.

    Now when I am trying to access the site from my pc like http://SubA.Domain.com , browser is showing page can not be displayed.

    Where as when I tried creating subdomain SubB under same domain via Plesk, i am able to access the link: http://SubB.Domain.com

    The difference I found is that creating sub domain via Plesk adds the A, CNAME and other related records to DNS.

    Hence looking for help in adding these records to DNS via c# app.

    Can anybody help me in how to create A record, CNAME, MX records via c# so that the subdomain gets accessible via internet? Waiting for the replies..

    Wednesday, April 24, 2013 3:08 AM

Answers