ASP.NET SessionState with allowCustomSqlDatabase = "true" does not call the specified database

Microsoft documentation here

http://msdn.microsoft.com/en-us/library/h6bb9cz9(v=vs.90).aspx

and several SO articles indicate that specifying allowCustomSqlDatabase = "true" in the sessionState declaration of the ASP.NET web.config file will allow me to override the default ASDState database and specify my own database name.

I set these properties in my web.config file.

<sessionState allowCustomSqlDatabase="true" mode="SQLServer" sqlConnectionString="Data Source=mysqlservername;Initial Catalog=DR_ASPState;Integrated Security=true;Connect Timeout=15;" />

When I try to open the default site page, I receive an error message indicating that access to the ASPState database is not possible.

I monitored SQL traffic using SQL Profiler and notice that this query is triggered by this query:

SELECT @appId = AppId
FROM [ASPState].dbo.ASPStateTempApplications
WHERE AppName = @appName

IIS, , . , ASP.NET SessionState , , DR_ASPState, SQL, SessionState. , , [ASPState] .

- -, , , ?

+4
1

. - ASP, DR_ASPState, ASPState. , .

- DR_ASPState, . , , , .NET, .

SQL Profiler, , ,

declare @p2 int
set @p2=NULL
exec dbo.TempGetAppID @appName='/LM/W3SVC/10/ROOT',@appId=@p2 output
select @p2

dbo.TempGetAppID , :

SELECT @appId = AppId
FROM [ASPState].dbo.ASPStateTempApplications
WHERE AppName = @appName

DR_ASPState .NET.

http://msdn.microsoft.com/en-us/library/ms229862(v=vs.80).aspx

-.

aspnet_regsql.exe -S *servername* -E -ssadd -sstype cd DR_ASPState
+6

All Articles