Hi:
I just downloaded the framework (.NET 4.0) and started the 'Patterns In Action' project. Regardless of which presentation layer I use it throws an exception when I try to do the Login required by the program. It crashes in file "ActionService.cs" in method "Login", line 81:
if (!Membership.ValidateUser(request.UserName, request.Password))
The exception is:
System.Data.SqlClient.SqlException was unhandled by user code
Message=The database 'C:\MARKSSTUFF\MARS\DOFACTORY\PATTERNS IN ACTION\HOST.WCF.ACTIONSERVER\APP_DATA\ASPNETDB.MDF' cannot be opened because it is version 655. This server supports version 611 and earlier. A downgrade path is not supported.
Could not open new database 'C:\MARKSSTUFF\MARS\DOFACTORY\PATTERNS IN ACTION\HOST.WCF.ACTIONSERVER\APP_DATA\ASPNETDB.MDF'. CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file C:\MarksStuff\Mars\DoFactory\Patterns In Action\Host.WCF.ActionServer\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
Source=.Net SqlClient Data Provider
ErrorCode=-2146232060
Class=20
LineNumber=65536
Number=948
Procedure=""
Server=\\.\pipe\4C1D8742-0D2B-48\tsql\query
State=1
StackTrace:
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, SqlConnection owningObject)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate)
at System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation)
at System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate)
at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat)
at System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password)
at System.Web.Security.Membership.ValidateUser(String username, String password)
at ActionService.ServiceImplementations.ActionService.Login(LoginRequest request) in C:\MarksStuff\Mars\DoFactory\Patterns In Action\ActionService\ServiceImplementations\ActionService.cs:line 81
at SyncInvokeLogin(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
InnerException:
As described, I installed SQL Server Express.
Does anyone know what the problem might be?
Do I need to change my windows firewall?
Thanx,
Mark
PS - I also get an exception "System.Data.EntityException was unhandled by user code" when doing a search on the website. Again, I haven't yet "logged in".