TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
MOHAMED JACKARIAH
1.6k
181
33.4k
How Programmatically Validate IIS Website IP and Port number
Mar 16 2015 5:13 AM
Hi,
I have written following code for validate the exiting website binding information. But, I could not get the result. Its validate the IIS express sites only. what can I do for validate the IIS Website programmatically.
my code is
bool bind=true;
using (ServerManager manager = new ServerManager())
{
SiteCollection sites = manager.Sites;
foreach (var IISsite in sites)
{
BindingCollection bindings = IISsite.Bindings;
foreach (Microsoft.Web.Administration.Binding binding in bindings)
{
var oo = IISsite.Bindings
.Where(b => b.EndPoint != null
&& b.EndPoint.Address.ToString() == Bindings
&& b.EndPoint.Port == portNumber)
.FirstOrDefault();
if (oo != null)
return false;
}
}
}
return bind;
Reply
Answers (
0
)
how to extract QR code from pdf file in C# and save as image
How to Create window Application in c# with Compact Database