Hi,
I'm trying to run the chapter 10 version of the web site, but it crashes when it tries to load themes. The error follows:
System.Data.SqlClient.SqlException was unhandled by user code
Class=16
ErrorCode=-2146232060
LineNumber=1
Message="Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'."
Number=2812
Procedure=""
Server="
\\.\pipe\5BCD39F8-18D0-4D\tsql\query"
Source=".Net SqlClient Data Provider"
State=62
StackTrace:
at System.Data.SqlClient.SqlConnection.OnError(SqlExc eption exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteRead er(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader( CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNo nQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Web.Util.SecUtility.CheckSchemaVersion(Prov iderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck)
at System.Web.Profile.SqlProfileProvider.CheckSchemaV ersion(SqlConnection connection)
at System.Web.Profile.SqlProfileProvider.GetPropertyV aluesFromDatabase(String userName, SettingsPropertyValueCollection svc)
at System.Web.Profile.SqlProfileProvider.GetPropertyV alues(SettingsContext sc, SettingsPropertyCollection properties)
at System.Configuration.SettingsBase.GetPropertiesFro mProvider(SettingsProvider provider)
at System.Configuration.SettingsBase.GetPropertyValue ByName(String propertyName)
at System.Configuration.SettingsBase.get_Item(String propertyName)
at System.Web.Profile.ProfileBase.GetInternal(String propertyName)
at System.Web.Profile.ProfileBase.get_Item(String propertyName)
at System.Web.Profile.ProfileBase.GetPropertyValue(St ring propertyName)
at ProfileCommon.get_Theme()
at Wrox.Web.GlobalEvents.ThemeModule.app_PreRequestHa ndlerExecute(Object Sender, EventArgs E)
at System.Web.HttpApplication.SyncEventExecutionStep. System.Web.HttpApplication.IExecutionStep.Execute( )
at System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously)
Here is the code:
[code]
PublicOverridableProperty Theme() AsString
Get
ReturnCType(Me.GetPropertyValue("Theme"),String)
EndGet
Set
Me.SetPropertyValue("Theme", value)
EndSet
EndProperty
[/ code]
It is from C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temp orary ASP.NET Files\wroxunited\9ff55a9a\71ce5fa6\App_Code.t2zhwy bw.7.
vb
This is right out of the 'box'. Can someone tell be how to work around this?
Tom