Scott Hanselman

ASP.NET Beta 2 - Enabling Session State on SQL Server 2005 Express

April 28, 2005 Comment on this post [1] Posted in ASP.NET | Bugs
Sponsored By

When trying to enable ASP.NET Session State on SQL Server 2005 Express this evening via:

c:\>aspnet_regsql -ssadd -sstype p -U sa -P password

I got:

An error occurred during the execution of the SQL file 'InstallSqlState.sql'. The SQL error number is 15501 and the SqlException message is: This module has been marked OFF.  Turn on 'Agent XPs' in order to be able to access the module. If the job does not exist, an error from msdb.dbo.sp_delete_job is expected.

So, that's scary. After some looking for "Agent XPs" and finding ZERO results on Google, Richard Campbell suggested:

EXECUTE sp_configure 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
GO

EXECUTE sp_configure 'Agent XPs', 1
RECONFIGURE WITH OVERRIDE
GO

EXECUTE sp_configure 'show advanced options', 0
RECONFIGURE WITH OVERRIDE
GO

I then ran aspnet_regsql again and all was good.

The real question is this: Is this new tightened security new to Beta 2 of SQL or just of SQL Express? Seems like it is to me. Is this something that aspnet_regsql should handle for me? Perhaps. Not sure if this is a bug or a feature.

Now playing: Matisyahu - Fire and Heights

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
April 28, 2005 9:13
I think its tightened security... although there's no reason the script couldn't have enabled Agent XPs for its set up and then disabled them again.

So call it a combination of tightened security and not telling anyone.

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.