Server Error in '/' Application.

No such host is known

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.Net.Sockets.SocketException: No such host is known

Source Error:


Line 34:                     using (var context = new SoftlifecellMembershipDbContext())
Line 35:                     {
Line 36:                         if (!context.Database.Exists())
Line 37:                         {
Line 38:                             // Create the SimpleMembership database without Entity Framework migration schema

Source File: D:\langlass\Softlifecell.ClassifiedsForFree\Softlifecell.ClassifiedsForFree\Filters\InitializeSimpleMembershipAttribute.cs    Line: 36

Stack Trace:


[SocketException (0x2af9): No such host is known]
   System.Net.Dns.GetAddrInfo(String name) +7970722
   System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) +113
   System.Net.Dns.GetHostEntry(String hostNameOrAddress) +131
   MySql.Data.Common.MyNetworkStream.CreateStream(MySqlConnectionStringBuilder settings, Boolean unix) +66
   MySql.Data.Common.StreamCreator.GetStream(MySqlConnectionStringBuilder settings) +60
   MySql.Data.MySqlClient.NativeDriver.Open() +87

[MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.]
   MySql.Data.MySqlClient.NativeDriver.Open() +1460
   MySql.Data.MySqlClient.Driver.Open() +39
   MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +331
   MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +316
   MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() +152
   MySql.Data.MySqlClient.MySqlPool.GetConnection() +60
   MySql.Data.MySqlClient.MySqlConnection.Open() +1218
   MySql.Data.MySqlClient.MySqlProviderServices.GetDbProviderManifestToken(DbConnection connection) +174
   System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +25

[ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.]
   System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +187
   System.Data.Entity.ModelConfiguration.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection) +32

[ProviderIncompatibleException: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.]
   System.Data.Entity.ModelConfiguration.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection) +210
   System.Data.Entity.ModelConfiguration.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) +48
   System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) +61
   System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +90
   System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input) +224
   System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +644
   System.Data.Entity.Internal.InternalContext.CreateObjectContextForDdlOps() +23
   System.Data.Entity.Database.Exists() +37
   Softlifecell.Membership.Filters.SimpleMembershipInitializer..ctor() in D:\langlass\Softlifecell.ClassifiedsForFree\Softlifecell.ClassifiedsForFree\Filters\InitializeSimpleMembershipAttribute.cs:36

[InvalidOperationException: The ASP.NET Simple Membership database could not be initialized. For more information, please see http://go.microsoft.com/fwlink/?LinkId=256588]
   Softlifecell.Membership.Filters.SimpleMembershipInitializer..ctor() in D:\langlass\Softlifecell.ClassifiedsForFree\Softlifecell.ClassifiedsForFree\Filters\InitializeSimpleMembershipAttribute.cs:61

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   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) +142
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +107
   System.Activator.CreateInstance(Type type) +13
   System.Threading.LazyHelpers`1.ActivatorFactorySelector() +53
   System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +139
   System.Threading.LazyInitializer.EnsureInitialized(T& target, Boolean& initialized, Object& syncLock) +139
   System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously(IActionFilter filter, ActionExecutingContext preContext, Func`1 nextInChain) +100
   System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously(IActionFilter filter, ActionExecutingContext preContext, Func`1 nextInChain) +797
   System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__31(AsyncCallback asyncCallback, Object asyncState) +273
   System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +170
   System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters, AsyncCallback callback, Object state) +292
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__1e(AsyncCallback asyncCallback, Object asyncState) +753
   System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +170
   System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +418
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__17(AsyncCallback asyncCallback, Object asyncState) +49
   System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +170
   System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +540
   System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +170
   System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +464
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState) +129
   System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +170
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +342
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +970
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +158


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