Answered by:
Adding CNAME via C# code

Question
-
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.
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..
Regards
Varun
Varun Sharma
- Moved by Mike Feng Tuesday, April 23, 2013 3:12 PM
Saturday, April 13, 2013 1:58 PM
Answers
-
Was this moved from the C# forum?
If so, try http://forums.IIS.net
Thanks!
Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)
Answer an interesting question? Create a wiki article about it!- Proposed as answer by Ed Price - MSFTMicrosoft employee Wednesday, April 24, 2013 6:55 AM
- Marked as answer by Zoltán HorváthMVP Wednesday, May 1, 2013 4:44 AM
Wednesday, April 24, 2013 6:49 AM
All replies
-
Hi Varun,
Welcome to the MSDN Forum.
Would you like to explain: "but it is still inaccessible from internet."?
What kind of operation failed?
Best regards,
Mike Feng
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.Monday, April 15, 2013 4:15 PM -
Hi Mike ,
Thanks for the reply.
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.
Regards
Varun
Varun Sharma
Tuesday, April 16, 2013 4:24 AM -
Hi Varun,
Sorry for late response.
I have moved this thread to "where is the forum for" to look for an appropriate forum.
Thanks.
Best regards,
Mike Feng
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.Tuesday, April 23, 2013 3:12 PM -
Was this moved from the C# forum?
If so, try http://forums.IIS.net
Thanks!
Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)
Answer an interesting question? Create a wiki article about it!- Proposed as answer by Ed Price - MSFTMicrosoft employee Wednesday, April 24, 2013 6:55 AM
- Marked as answer by Zoltán HorváthMVP Wednesday, May 1, 2013 4:44 AM
Wednesday, April 24, 2013 6:49 AM -
Was this moved from the C# forum?
If so, try http://forums.IIS.net
Thanks!
Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)
Answer an interesting question? Create a wiki article about it!Mike Feng
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.Wednesday, April 24, 2013 7:26 AM -
check out http://social.msdn.microsoft.com/forums/en-US/csharpgeneral/thread/d7af771b-7c6b-4ee8-acfb-28a12bc1c5e7/ , might serve as a starting point for youWednesday, April 24, 2013 9:22 AMAnswerer