This is my web.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ConnectionString" value="server=localhost;Trusted_Connection=true;da tabase=IB" />
</appSettings>
<system.web>
<trust level="Full" originUrl="" />
<authentication mode="Forms">
<forms name="IBAuth" loginUrl="login.aspx" protection="All" path="/" />
</authentication>
<customErrors mode="RemoteOnly" defaultRedirect="ErrorPage.aspx" />
<compilation debug="true"/>
<sessionState mode="InProc" cookieless="false" timeout="20" />
</system.web>
<location path="Checkout.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<location path="OrderList.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<location path="OrderDetails.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
</configuration>
and this is the
vb-codebehind:
Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
SetFocus(Me.MemberName)
End Sub
Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click
System.Web.HttpContext.Current.Session("MemberId") = "20"
'I tried this too: System.Web.HttpContext.Current.Session("MemberId") = "20"
'I tried this too: Session("MemberId") = "20"
End Sub
Sub SetFocus(ByVal ctrlControl As Control)
If Not Page.IsStartupScriptRegistered("SetFocus") Then
Page.RegisterStartupScript("SetFocus", _
"<" & "script language=""JavaScript"">" & _
"document.forms[0]." & _
ctrlControl.ClientID & ".focus();" & _
"</" & "script>")
End If
End Sub
I only found one programmer until now who has the same problem. He didn't get any reply to his question. Maybe he's already jumped out of the 26th floor ;)
Reinhard