随笔-10  评论-10  文章-0  trackbacks-0

最新评论

这样还是不行
re: This is A PostXing Test 一箭 2007-01-31 00:09  
想说明什么问题呢?
SPS, 一般来讲是指SharePoint Portal Server
SSO, 就是Single Sign-On,单点登入
更详细的内请搜索Google
SPS和SSO是什么东东呀,楼主给我们菜鸟讲讲呀。
这样的问题都被你解决,强!!

我想现在还没多少人会将已经运行SPS的Windows Server 2003 升级到SP1,不错的实践。
re: DataGrid 自定义分页 情之弦 2005-01-26 22:55  
不错啊。挺实用的。
re: DataGrid 自定义分页 djshow 2005-01-26 18:17  
To Caca:呵呵,改了变量,漏了几个,粗心啊~

To 灵感之源:Asp.Net 2.0 还没怎么接触过,但是我想,如果GridView也是类似被输出成Table的话,应该也可以。不是太懂啊~
re: DataGrid 自定义分页 灵感之源 2005-01-26 16:19  
有意思,但ASP.NET 2.0中,DataGrid给DataView取代,能这样么?
re: DataGrid 自定义分页 caca(卡卡) 2005-01-26 16:02  
是这样吧:
if(e.Item.ItemType == ListItemType.Pager)
{
TableCell pager = (TableCell) e.Item.Controls[0];
for (int i = 0; i < pager.Controls.Count; i += 2)
{
Object o = pager.Controls[i];
if (o is LinkButton)
{
// 非当前页码
LinkButton linkButton = (LinkButton) o;
// 这里可以设置更多样式
linkButton.Text = "[ " + linkButton.Text + " ]";
}
else
{
// 当前页码
Label label = (Label) o;
// 这里也可以设置更多样式
label.Text = "第 " + label.Text + " 页";
}
}
}
今天验证了一下,我上述的方法不能完全解决问题。研究了一上午,得到以下结果。
WSS扩展一个站点后会在站点根目录添加Web.config,其中对我们应用程序可能会有影响的有:
<securityPolicy>
<trustLevel name="WSS_Medium" p..." /> <!--这里定义了trustLevel标识,后面部分省略了-->
<trustLevel name="WSS_Minimal" p..." />
</securityPolicy>
<httpHandlers><!--WSS自定义的httpHandler,处理根目录和_vti_bin目录下的aspx-->
<add verb="*" path="/_vti_bin/*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<add verb="*" path="*.aspx" type="Microsoft.SharePoint.ApplicationRuntime.SharePointHandlerFactory, Microsoft.SharePoint, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
</httpHandlers>
<identity impersonate="true" />
<httpModules>
<clear /><!-- 这里很重要,首先它将machine.config里的httpModule清除掉,然后只添加以下两个httpModule(即只保留machine.config里面两个)
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule" />
<add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" />
<!-- <add name="Session" type="System.Web.SessionState.SessionStateModule"/>-->
</httpModules>
<globalization fileEncoding="utf-8" />
<compilation batch="false" debug="false" />
<pages enableSessionState="false" enableViewState="true" enableViewStateMac="true" validateRequest="false" />
<!--WSS将Session禁掉了,所以你的应用程序如果使用了Session就会出现错误。-->
<trust level="WSS_Minimal" originUrl="" /><!-- WSS设置的信任级别为WSS_Minimal,信任最小就是安全性最高-->

了解了这些内容,就可以对自己的应用程序进行自定义了,最先还是要用上面的步骤将应用程序目录加入被排除路径中.然后修改应用程序的Web.config.
首先要修改httpModules节,既然WSS只留下两个httpModule,那么就必须将其他几个找回来.
<httpModules>
<clear /><!-- 先全部清除,然后添加machine.config里面原来的httpModule-->
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule"/>
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
<add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule"/>
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule"/>
<add name="PassportAuthentication" type="System.Web.Security.PassportAuthenticationModule"/>
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule"/>
<add name="FileAuthorization" type="System.Web.Security.FileAuthorizationModule"/>
<add name="ErrorHandlerModule" type="System.Web.Mobile.ErrorHandlerModule, System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
</httpModules>
添加
<trust level="Full" originUrl="" /><!-- WSS设置的信任级别设为Full-->
如果你的应用程序使用了Session,还要添加
<pages enableSessionState="true">