typelib

330 篇文章 4 订阅 ¥19.90 ¥99.00
本文档介绍了如何在VB.NET中与ISA Server进行交互,包括添加引用msfpccom.dll,创建FPCLIB对象来操作ISA Server的策略元素,如获取目的地集并列出其内容。示例代码展示了如何根据查询字符串的参数执行不同操作,并用GridView展示结果。更多帮助可参考微软官方文档。
摘要由CSDN通过智能技术生成
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 "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 ! ! ! 

 
Case ""



' Page error
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值