IT Community - Software Programming, Web Development and Technical Support

Check domain name availability in ASP.NET

This is a discussion on Check domain name availability in ASP.NET within the ASP and ASP.NET Programming forums, part of the Web Development category; Check domain name availability in ASP.NET Domain verification Goals: This project is used to verify the domain that it ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > ASP and ASP.NET Programming

Register FAQ Members List Calendar Mark Forums Read
  5 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-18-2007, 12:49 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Check domain name availability in ASP.NET

Check domain name availability in ASP.NET

Domain verification

Goals:

This project is used to verify the domain that it is present on the webserver


Steps:


1) create a C# web application.

2) In the aspx page create textbox, literal and button.

3) type the following code in the aspx.cs file


System.Net.HttpWebRequest req;
System.Net.HttpWebResponse res;
System.IO.StreamReader r;
string pge;
string url = "http://" + domain.Text;
if (IsPostBack)
{
try
{
req = (System.Net.HttpWebRequest)HttpWebRequest.Create(u rl);
req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)";
res = (System.Net.HttpWebResponse)req.GetResponse();
r = new System.IO.StreamReader(res.GetResponseStream());
pge = r.ReadToEnd();
r.Close();
res.Close();
ErrMSG.Text = "";
}
catch (Exception ex)
{
ErrMSG.Text = "Domain is not available";
}
finally
{
if (ErrMSG.Text == "")
{
ErrMSG.Text = "Domain is available";
}
}
}
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/asp-asp-net-programming/2086-check-domain-name-availability-asp-net.html
Posted By For Type Date
domain hosting name web - Check domain name availability in ASP.NET This thread Refback 07-18-2007 09:33 AM
domain hosting web - Check domain name availability in ASP.NET This thread Refback 07-18-2007 09:33 AM
domain name hosting - Check domain name availability in ASP.NET This thread Refback 07-18-2007 09:32 AM
domain name web hosting - Check domain name availability in ASP.NET This thread Refback 07-18-2007 09:32 AM
domain web hosting - Check domain name availability in ASP.NET This thread Refback 07-18-2007 09:30 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect domain.com/abc -> abc.domain.com Kamalakannan PHP Programming 0 07-17-2007 08:17 AM
Web content check tripnautic HTML, CSS and Javascript Coding Techniques 2 05-01-2007 06:56 AM
How to check the URL testing? vadivelanvaidyanathan Software Testing 2 04-13-2007 04:58 AM
Checkout Availability nhoj Google 0 04-09-2007 01:46 PM
Which domain you think looks better? webmaster General Web hosting Discussions 8 03-15-2007 12:48 AM


All times are GMT -7. The time now is 02:24 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0