把应用profile的页面copy到服务器的项目中,运行,报错。
查了半天,原来问题在web.config里:
<httpModules>
<!-- <clear/> --> // 在httpModules里面移除所有元素会造成Profile无法使用。
<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"/>
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
</httpModules>
本文解决了一个因在web.config文件的httpModules部分误删除必要模块而导致的应用Profile无法使用的问题。通过重新添加必需的HTTP模块,成功解决了运行时报错的情况。
2877

被折叠的 条评论
为什么被折叠?



