views:

165

answers:

2

Hi, i have a problem in asp.net web-application.

I'm using UrlRewritingNet.UrlRewrite and it's works fine only when there is no uses of session on page.

for example: simple page Default.aspx with code:

<% Session["some_value"] = "test"; %>

If i access it via address

http://somesite.net/Default.aspx

it's ok, but if i try

http://somesite.net/test/

i have error:

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.

How can i solve that problem?

UPD: I found answer here

just add two lines in web.config

<system.webServer>
    <modules>

      <remove name="Session"/>
      <add name="Session" type="System.Web.SessionState.SessionStateModule"/>

    </modules>
</system.webServer>
A: 

I found answer here

just add two lines in web.config

<system.webServer>
    <modules>

      <remove name="Session"/>
      <add name="Session" type="System.Web.SessionState.SessionStateModule"/>

    </modules>
</system.webServer>
x2
A: 

Thank you so much!!!. Facing the same problem.

videos