• RSS
  • Twitter
  • FaceBook

Welcome to ISAserver.org

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

.NET programming with ISA 2000 made easy

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [ISA Server 2000 Misc.] >> ISA Server Programming >> .NET programming with ISA 2000 made easy Page: [1]
Login
Message << Older Topic   Newer Topic >>
.NET programming with ISA 2000 made easy - 17.Jan.2007 5:31:33 AM   
danjwalker

 

Posts: 6
Joined: 26.Jun.2005
From: Milton Keynes, England
Status: offline
I searched for time to get an idea of what to do. Therefore as help, I am posting my findings here....

You web page must run with the rights to alter or read information from the ISA server.

You can do development on your machine but you need to install ISA server remote admin. Put the ISA CD in and go for an install. Choose custom install when asked and only install remote admin tools.

When you start to develop in Visual Studio, add a reference to "msfpccom.dll" this is in "C:\Program Files\Microsoft ISA Server\" on my machine so use your brain to find yours. This will give you an FPCLIB object that you use to do stuff with ISA server.

Below is an example of how to find a destination set and list its contents. This will therefore show you how to create an instance of the object to handle this stuff and so on....



Dim action As String = Request.QueryString("action")
Select Case action


Case ""



' Page error



Case "games"





Dim root As FPCLib.FPC = New FPCLib.FPC()
Dim fpcDS As FPCLib.FPCDestinationSet =  _
root.Arrays.Item"server").PolicyElements.DestinationSets.Item("Recreational Sites")
Dim dsC As FPCLib.FPCDestination
Dim dt As DataTable = New DataTable("stuff")
Dim dr As DataRow
Dim dc As New DataColumn("item")
dt.Columns.Add(dc)
For Each dsC In fpcDS
dr = dt.NewRow()
dr.Item(
"item") = dsC.DomainName
dt.Rows.Add(dr)
Next

GridView1.DataSource = dt
GridView1.DataBind()

Case "Unsuitable"



' This is the universally bannnnnned list

Dim root As FPCLib.FPC = New FPCLib.FPC()
Dim fpcDS As FPCLib.FPCDestinationSet = root.Arrays.Item("server").PolicyElements.DestinationSets.Item("Recreational Sites")
Dim dsC As FPCLib.FPCDestination
Dim dt As DataTable = New DataTable("stuff")
Dim dr As DataRow
Dim dc As New DataColumn("item")
dt.Columns.Add(dc)
For Each dsC In fpcDS
dr = dt.NewRow()
dr.Item(
"item") = dsC.DomainName
dt.Rows.Add(dr)
Next

GridView1.DataSource = dt
GridView1.DataBind()


End Select
 
More help can be got from the microsoft website. Here is a link in to one of the properies. The rest can be found from there.

http://msdn2.microsoft.com/en-us/library/ms818627.aspx
 
This is the first thing like this I have done in VB.NET so please do not comment on my crappy coding. I hope this helps someone. Thanks
 
D A N ! ! !



< Message edited by danjwalker -- 17.Jan.2007 5:34:04 AM >
Post #: 1

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [ISA Server 2000 Misc.] >> ISA Server Programming >> .NET programming with ISA 2000 made easy Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts