Problem Installation Alloy Demo

Vote:
 

Hi everyone, I have a problem when trying to install the Alloy Demo Site whe I create a new Project un Visual Studio.

I have already installed the EPiServer CMS Visual Studio Extension

These are the steps I'm following and the error I get:

VISUAL STUDIO: File -> New -> Project -> Visual C# -> EPiServer Web Site -> ... write names and location ... -> Alloy(MVC)

    Name: EPiServerSite1

    Location: C:\EPiServer\

    Solution Name: EPiServerDemo

When it opens the solution I do Ctrl+F5 to open up the start page in my computer's default browser and the error I get:

TRANSLATION AT THE END OF THE POST

Server Error in '/' Application.

Error relacionado con la red o específico de la instancia mientras se establecía una conexión con el servidor SQL Server. No se encontró el servidor o éste no estaba accesible. Compruebe que el nombre de la instancia es correcto y que SQL Server está configurado para admitir conexiones remotas. (provider: SQL Network Interfaces, error: 50 - Se produjo un error de Local Database Runtime. No se puede crear una instancia automática. Consulte el registro de eventos de la aplicación Windows para ver los detalles del error.
)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.SqlClient.SqlException: Error relacionado con la red o específico de la instancia mientras se establecía una conexión con el servidor SQL Server. No se encontró el servidor o éste no estaba accesible. Compruebe que el nombre de la instancia es correcto y que SQL Server está configurado para admitir conexiones remotas. (provider: SQL Network Interfaces, error: 50 - Se produjo un error de Local Database Runtime. No se puede crear una instancia automática. Consulte el registro de eventos de la aplicación Windows para ver los detalles del error.
)

Source Error: 

[No relevant source lines]


Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs\61295fa2\b7537560\App_global.asax.0.cs    Line: 0 

Stack Trace: 

[SqlException (0x80131904): Error relacionado con la red o específico de la instancia mientras se establecía una conexión con el servidor SQL Server. No se encontró el servidor o éste no estaba accesible. Compruebe que el nombre de la instancia es correcto y que SQL Server está configurado para admitir conexiones remotas. (provider: SQL Network Interfaces, error: 50 - Se produjo un error de Local Database Runtime. No se puede crear una instancia automática. Consulte el registro de eventos de la aplicación Windows para ver los detalles del error.
)]
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5341687
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +546
   System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover) +5353471
   System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) +145
   System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) +923
   System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) +311
   System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData) +646
   System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +278
   System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +38
   System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +732
   System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) +85
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1057
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78
   System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +196
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +146
   System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +16
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +94
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +110
   System.Data.SqlClient.SqlConnection.Open() +96
   EPiServer.Data.Providers.ConnectionContext.b__0() +90
   EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute(Func`1 method) +706
   EPiServer.Data.Providers.ConnectionContext.OpenConnection() +121
   EPiServer.Data.Providers.SqlDatabaseHandler.GetConnection(Boolean requireTransaction) +324
   EPiServer.Data.Providers.<>c__DisplayClass1`1.b__0() +40
   EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute(Func`1 method) +706
   EPiServer.Data.Providers.SqlDatabaseHandler.Execute(Func`1 action) +212
   EPiServer.Data.DatabaseVersionValidator.GetDatabaseVersion() +61
   EPiServer.Data.DatabaseVersionValidator.ValidateDatabaseVersion(Version supportedVersion) +19
   EPiServer.Data.DataInitialization.Initialize(InitializationEngine context) +92
   EPiServer.Framework.Initialization.<>c__DisplayClass5.b__4() +19
   EPiServer.Framework.Initialization.ModuleNode.Execute(Action a, String key) +43
   EPiServer.Framework.Initialization.ModuleNode.Initialize(InitializationEngine context) +80
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +173

[InitializationException: Initialize action failed for Initialize on class EPiServer.Data.DataInitialization, EPiServer.Data, Version=8.0.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +439
   EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +116
   EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +446
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +83
   EPiServer.Global..ctor() +76
   EPiServerSite1.EPiServerApplication..ctor() +29
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\vs\61295fa2\b7537560\App_global.asax.0.cs:0

[TargetInvocationException: Se produjo una excepción en el destino de la invocación.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +113
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1122
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +128
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +18
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +260
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Se produjo una excepción en el destino de la invocación.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9931916
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34249

I've tried a lot of things to solve that but I only go to other errors and I don't know what else to do.

I hope someone helps me to find my problem.

Thanks,

Oriol

PS: Error Title is in Spanish (my language) the transation is the following:

Error related to specific network or instance while a connection to SQL Server is established. Server not found or it was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Error occurred Local Database Runtime You can not create an automatic instance See the event log from the Windows application to view the error details...

#121362
May 07, 2015 14:05
Vote:
 

Hi Oriol,

Do you have LocalDb installed and running on your machine?

#121364
May 07, 2015 14:26
Vote:
 

When I create the project, I open Microsoft SQL Server Management Studio and I see a new DB has been created with a strange name (D5A881CC-675D-419B-8B06-ABBE7589470F) and it says that is "Pending to be recovered"

#121366
May 07, 2015 14:59
Vote:
 

If you open web.config file, and search for connectionStrings, you'll find something like this:

<add name="EPiServerDB" connectionString="Data Source=(LocalDb)\v11.0;AttachDbFilename=|DataDirectory|EPiServerDB_69cb2c35.mdf;Initial Catalog=EPiServerDB_69cb2c35;Connection Timeout=60;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />

Database name always starts with EPiServerDB_

In connection string, we have Data Source=(LocalDb)\v11.0

If you open Package Manager Console in Visual Studio and type in sqllocaldb i, you should get a list of all localdb instances.

http://s14.postimg.org/d0f6a8ogx/pmc.png

If you don't find v11.0 in the list, you'll have to install Sql Server LocalDB.

If you do, type sqllocaldb i "v11.0"  in Package Manager Console to get more info, and make sure it's running.

#121369
May 07, 2015 15:17
Vote:
 

It seems I don't have installed the localdb, because sqllocaldb only shows me MSSQLLocalDB not v11.0 like you.

How do I install it?

#121386
May 08, 2015 10:36
Vote:
 

Now I have installed but it's NOT running, what should I do next?

#121388
May 08, 2015 11:05
Vote:
 

In Package Manager Console, type sqllocaldb start "v11.0" to run it, and sqllocaldb i "v11.0" to check its state.

Run the project, and that's it :)

#121389
May 08, 2015 11:10
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.