无法使用asp.net 4 webforms routing获取System.Web.SessionState
在WebForms中使用system.web.routing但是找不到合适的解决方案时,我在这里看到了几个问题,例如State Service。
我在iis7上使用带有webforms的asp.net路由。我在下面添加了webconfig文件,让它在第一宫工作
<system.webServer><modules>
<remove name="UrlRoutingModule-4.0" />
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
</modules>
</system.webServer>
问题是,当我使用路由页面会话状态不可用,我得到
Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration><system.web><httpModules> section in the application configuration.
我启用了sesison状态,如果我用aspx扩展而不是路由url调用页面本身一切正常。
任何人都知道如何通过路由获得会话状态?
没有找到相关结果
已邀请:
1 个回复
矾醒忻