将做好的IIS网站的首页嵌入sharepoint,为什么session的值丢失

iceblue2005gather 2009-02-12 03:30:25
在同一台机器上,建好站点 IIS站点 ,vs2005开发环境
同时该机器上安装有wss3.0 ,建好sharepoint站点

将站点的首页A 在sharedoucmemt中,以webpage的方式,添加webpart,添入 站点 url访问,仅添加这么一个页面,作为牵引页

A页面写入session,redirect 到站内另一个页面B,所有的session值都丢失

请问高手,有什么处理方法么?什么原因了?
有谁遇到过没有

否则,每个用到session的页面,岂不是都要重新载入session值,那session还有什么意思




...全文
242 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
jietuan 2009-03-24
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 Lee_jsmwj 的回复:]
Viewstate的确无法在页面间使用

开启Session的方式是找到站点根目录的Web.Config 修改两个地方

1.设置EnableSessionState=“True”

XML code<pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyT…
[/Quote]


正确,另如果你添加aspx页面且该页面是直接放在文件夹里面,请修改:
<trust level="Full" originUrl="" />
CaoMei_Jenny 2009-02-27
  • 打赏
  • 举报
回复
学习中,关注此题。。
muconan 2009-02-26
  • 打赏
  • 举报
回复
共同研究一下,呵呵。SharpPoint 正在学习中。。
iceblue2005gather 2009-02-13
  • 打赏
  • 举报
回复
如何更改sharepoint 的session 默认设置了?
viewstate不能在网页间使用阿
Lee_jsmwj 2009-02-13
  • 打赏
  • 举报
回复
Viewstate的确无法在页面间使用

开启Session的方式是找到站点根目录的Web.Config 修改两个地方

1.设置EnableSessionState=“True”
<pages enableSessionState="true" enableViewState="true" enableViewStateMac="true" validateRequest="false" pageParserFilterType="Microsoft.SharePoint.ApplicationRuntime.SPPageParserFilter, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" asyncTimeout="7">


2.取消 <add name="Session" type="System.Web.SessionState.SessionStateModule"/> 的注释
<httpModules>
<clear />
<add name="SPRequest" type="Microsoft.SharePoint.ApplicationRuntime.SPRequestModule, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule" />
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
<add name="UrlAuthorization" type="System.Web.Security.UrlAuthorizationModule" />
<add name="WindowsAuthentication" type="System.Web.Security.WindowsAuthenticationModule" />
<add name="RoleManager" type="System.Web.Security.RoleManagerModule" />
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
</httpModules>
Lee_jsmwj 2009-02-12
  • 打赏
  • 举报
回复
在sharepoint默认设置里,session的使用是被禁止的。
推荐使用ViewState

3,242

社区成员

发帖
与我相关
我的任务
社区描述
企业开发 SharePoint
社区管理员
  • SharePoint社区
  • 霖雨
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧