So webmatrix cannot connect to a port different than default one? - mysql

I'm trying to connect to localhost:45000 (it is a tunnel to my pagodabox MySQL)
But in webmatrix I get this error:
Call to GetHostEntry failed after 00:00:00 while querying for hostname 'localhost:45000': SocketErrorCode=HostNotFound, ErrorCode=11001, NativeErrorCode=11001.
MySql.Data.MySqlClient.MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts. ---> System.Exception: Call to GetHostEntry failed after 00:00:00 while querying for hostname 'localhost:45000': SocketErrorCode=HostNotFound, ErrorCode=11001, NativeErrorCode=11001. ---> System.Net.Sockets.SocketException: No such host is known
at System.Net.Dns.GetAddrInfo(String name)
at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress)
at MySql.Data.Common.StreamCreator.GetDnsHostEntry(String hostname)
--- End of inner exception stack trace ---
at MySql.Data.Common.StreamCreator.GetDnsHostEntry(String hostname)
at MySql.Data.Common.StreamCreator.GetHostEntry(String hostname)
at MySql.Data.Common.StreamCreator.GetStreamFromHost(String pipeName, String hostName, UInt32 timeout)
at MySql.Data.Common.StreamCreator.GetStream(UInt32 timeout)
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at Microsoft.WebMatrix.DatabaseManager.MySqlDatabase.MySqlDatabaseProvider.TestConnection(String connectionString)
at Microsoft.WebMatrix.DatabaseManager.IisDbManagerModuleService.TestConnection(DatabaseConnection databaseConnection, String configPathState)
at Microsoft.WebMatrix.DatabaseManager.Client.ClientConnection.Test(ManagementConfigurationPath configPath)
at Microsoft.WebMatrix.DatabaseManager.Client.DatabaseHierarchyInfo.EnsureLoaded()
Is it that webmatrix can't handle the 45000 port? (It works otherwise (in MySQL-WorkBench).)

Related

How to compose a connection string without login credentials .net MySqlConnector/Pomelo.EntityFrameworkCore.MySql?

I am looking for solution to use connection string without user name and password specified with MariaDB server. I am running app and DB server on same machine so I decided to use unix_socket authentication.
Steps to reproduce
I have two connection strings where neither variant has a password property specified:
a)
string cnn_str = #"
Server=/run/mysqld/mysqld.sock;
Port=3306;
Database=mwsdb;
Protocol=unix;
AllowUserVariables=true;
UseAffectedRows=false;";
b) variant is the same as the first one, only extended with the uid property (inpired by exception)
// appends user name - user that runs the application
// in my case the user name is 'pi'
cnn_str += $"Uid={Environment.UserName};";
Code to connect to the database:
1) Only MySqlConnector
var connection = new MySqlConnection(cnn_str);
using (connection)
{
connection.Open();
}
2) The way how I configure db context service in Program.cs using Pomelo.EF and .UseMySql()
builder.Services.AddDbContext<MwsDbContext>(dbContextOptions => dbContextOptions
/* either 2.1) */ .UseMySql(cnn_str, ServerVersion.AutoDetect(cnn_str))
/* or 2.2) */ // .UseMySql(new MySqlConnection(cnn_str), ServerVersion.AutoDetect(cnn_str))
);
The issue
I used simple code (console app) to test conectivity to MariaDB and put results into table.
Code
Connection string
Result
1
a)
exception
1
b)
works
2.1
a)
exception
2.1
b)
works
2.2
a)
exception
2.2
b)
works
The exeption which is thrown is always the same and says:
fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
An unhandled exception has occurred while executing the request.
MySqlConnector.MySqlException (0x80004005): Access denied for user ''#'localhost'
...full exception output below...
I can see some information:
Access is denied because of missing user name.
Exception is thrown by MySqlConnector.
Questions:
Am I able to compose a connection string without login credentials?
I would be glad if someone could explain to me what pros and potential cons has MySqlConnection instance over connection string when passing as argument to .UseMySql(cnn_str vs. MySqlConnection).
I appreciate any help or explanation thanks in advance.
Further technical details
HW: RaspberryPi 4 Model B
SW:
OS: Debian GNU/Linux 11 (bullseye).
Local OS account: pi
SQL: Mariadb 10.5.12 with enabled plugin unix_socket authentication.
AppServer: nginx/1.18.0
Application: .NET 6 WEB API and ConsoleApp (both tested) with packages:
<PackageReference Include="MySqlConnector" Version="2.1.8" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.1" />
Other details about my project setup:
Create system local user account
no home dir
no-login
no pw
sudo useradd -r pi
MariaDB
Socket file path:
root#rpi:~# ls /run/mysqld
mysqld.pid mysqld.sock
Mariadb config file /etc/mysql/my.cnf contains:
[client-server]
socket = /run/mysqld/mysqld.sock
SQL select to locate file path:
MariaDB [(none)]> show variables like 'socket';
+---------------+-------------------------+
| Variable_name | Value |
+---------------+-------------------------+
| socket | /run/mysqld/mysqld.sock |
+---------------+-------------------------+
1 row in set (0.002 sec)
SQL commands to create user and grant privileges to system user in MariaDB server database:
CREATE USER 'pi'#localhost IDENTIFIED VIA unix_socket;
GRANT ALL PRIVILEGES ON mwsdb.* TO 'pi'#localhost IDENTIFIED VIA unix_socket;
Exception
MySqlConnector.MySqlException (0x80004005): Access denied for user ''#'localhost'
at MySqlConnector.Core.ServerSession.ConnectAsync(ConnectionSettings cs, MySqlConnection connection, Int32 startTickCount, ILoadBalancer loadBalancer, IOBehavior ioBehavior, CancellationToken canc>
at MySqlConnector.Core.ConnectionPool.ConnectSessionAsync(MySqlConnection connection, String logMessage, Int32 startTickCount, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src>
at MySqlConnector.Core.ConnectionPool.GetSessionAsync(MySqlConnection connection, Int32 startTickCount, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/Co>
at MySqlConnector.Core.ConnectionPool.GetSessionAsync(MySqlConnection connection, Int32 startTickCount, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/Co>
at MySqlConnector.MySqlConnection.CreateSessionAsync(ConnectionPool pool, Int32 startTickCount, Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection>
at MySqlConnector.MySqlConnection.OpenAsync(Nullable`1 ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlConnection.cs:line 406
at MySqlConnector.MySqlConnection.Open() in /_/src/MySqlConnector/MySqlConnection.cs:line 369
at Microsoft.EntityFrameworkCore.ServerVersion.AutoDetect(String connectionString)
at Program.<>c__DisplayClass0_0.<<Main>$>b__3(DbContextOptionsBuilder dbContextOptions) in /home/Prog>
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass1_0`2.<AddDbContext>b__0(IServiceProvider p, DbContextOptionsBuilder b)
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.CreateDbContextOptions[TContext](IServiceProvider applicationServiceProvider, Action`2 optionsAction)
at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.<>c__DisplayClass17_0`1.<AddCoreServices>b__0(IServiceProvider p)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEng>
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEng>
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass2_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at Program.<Main>$(String[] args) in /home/Program.cs:line 72
Program.cs:line 72
Apply migrations.
l. 72: using MwsDbContext? context = app.Services.CreateScope().ServiceProvider.GetService<MwsDbContext>();
l. 73: context?.Database.Migrate();
Am I able to compose a connection string without login credentials?
No. MySqlConnector requires the UserID to be specified, even if using a Unix socket. This is covered in this issue.
The workaround is to set the username explicitly:
var builder = new MySqlConnectionStringBuilder("...connection string...");
builder.UserID = Environment.UserName;
using var connection = new MySqlConnection(builder.ConnectionString);
(Or just hard-code ;Username = pi in your connection string.)
explain to me what pros and potential cons has MySqlConnection instance over connection string when passing as argument to .UseMySql(cnn_str vs. MySqlConnection).
The two methods seem pretty equivalent: connection string vs connection.
One uses the provided connection string; the other reads the DbConnection.ConnectionString property and uses that connection string. The former would be slightly more efficient because it's not creating an extra MySqlConnection object just to pass the connection string in; this is likely negligible in practice.

Mysql.Data and Azure Mysql error 'Table 'mysql.proc' doesn't exist'

When I try to execute the stored procedure against Azure MySQL version 8.0.15 server using following code I get the error saying 'Table 'mysql.proc' doesn't exist'. This error does not happen with older versions. some search says to use MySQL_upgrade but I don't get that to work against azure MySQL. How do I overcome this error? Everything works fine when I connect to local MySQL version which is same as azure hosted.
Sample code
static async Task Main(string[] args)
{
var builder = new MySqlConnectionStringBuilder
{
Server = "myserver.mysql.database.azure.com",
Database = "mydb",
UserID = "myserver#myserver",
Password = "password",
SslMode = MySqlSslMode.Prefered,
};
using (var conn = new MySqlConnection(builder.ConnectionString))
{
Console.WriteLine("Opening connection");
await conn.OpenAsync();
using (var command = conn.CreateCommand())
{
command.CommandType = CommandType.StoredProcedure;
command.CommandText = "prc_myprocedure";
var reader = await command.ExecuteReaderAsync(CommandBehavior.Default);
while (reader.Read())
{
Console.WriteLine(reader.GetValue(0));
}
}
Console.WriteLine("Closing connection");
}
Console.WriteLine("Press RETURN to exit");
Console.ReadLine();
}
}
Complete error:
Unhandled exception. MySql.Data.MySqlClient.MySqlException (0x80004005): Table 'mysql.proc' doesn't exist
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.SchemaProvider.GetProcedures(String[] restrictions)
at MySql.Data.MySqlClient.ISSchemaProvider.GetProcedures(String[] restrictions)
at MySql.Data.MySqlClient.ISSchemaProvider.GetSchemaInternal(String collection, String[] restrictions)
at MySql.Data.MySqlClient.SchemaProvider.GetSchema(String collection, String[] restrictions)
at MySql.Data.MySqlClient.MySqlConnection.GetSchemaCollection(String collectionName, String[] restrictionValues)
at MySql.Data.MySqlClient.ProcedureCache.GetProcData(MySqlConnection connection, String spName)
at MySql.Data.MySqlClient.ProcedureCache.AddNew(MySqlConnection connection, String spName)
at MySql.Data.MySqlClient.ProcedureCache.GetProcedure(MySqlConnection conn, String spName, String cacheKey)
at MySql.Data.MySqlClient.StoredProcedure.GetParameters(String procName)
at MySql.Data.MySqlClient.StoredProcedure.CheckParameters(String spName)
at MySql.Data.MySqlClient.StoredProcedure.Resolve(Boolean preparing)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at AzureMySqlExample.MySqlUpdate.Main(String[] args) in C:\Users\sammo\source\repos\ConsoleApp1\Program.cs:line 31
at AzureMySqlExample.MySqlUpdate.<Main>(String[] args)
ISSUE: You are getting the below error because when you start a connection to Azure MySQL, the gateway of Azure MySQL will first send back a greeting package with a default server version "5.6.42.0 MySQL Community Server (GPL)". This make the MySQL.Data driver treat the server version as 5.6. But actually it is 8.0 and in MySQL 8.0, the table mysql.proc not exists anymore.
Workaround: You can use ProxySQL to fix the version issue:
Set up ProxySQL for Azure MySQL
https://techcommunity.microsoft.com/t5/Azure-Database-for-MySQL/Load-balance-read-replicas-using-ProxySQL-in-Azure-Database-for/ba-p/880042
Update the server version in ProxySQL
Connecting to ProxySQL with admin account, run the following commands.
a. mysql –u admin –padmin -h 127.0.0.1 -P 6032
b. UPDATE global_variables SET variable_value='' WHERE variable_name='mysql-server_version';
c. load mysql variables to runtime;
d. save mysql variable to disk;
To complement Mike Ubezzi's answer (credit to this post to point me in the right direction), the solution was to simply change the port from 3306 to 3309 in the database connection string. More information here.
In my case, I was running an ASP.NET app linked to a MySQL database version 8.0. After editing the connection string in the web app's configuration settings and restarting the web app, my stored procedures executed as expected.

Mysql:An established connection was aborted by the software in your host machine

I got this error massage in MySQL, it was not blocked by firewall/anti-virus software. It happened when some task which is resource-intensive was launched.
Someone mention that it may cause by process priority issue
https://bugs.mysql.com/bug.php?id=76597
How can I do?
Error Msg:
MySql.Data.MySqlClient.MySqlException (0x80004005): Authentication to host 'localhost' for user 'xxx' using method 'mysql_native_password' failed with message: Reading from the stream has failed.
---> MySql.Data.MySqlClient.MySqlException (0x80004005): Reading from the stream has failed.
---> System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine.
---> System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at MySql.Data.Common.MyNetworkStream.HandleOrRethrowException(Exception e)
at MySql.Data.Common.MyNetworkStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at MySql.Data.MySqlClient.TimedStream.Read(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.BufferedStream.Read(Byte[] array, Int32 offset, Int32 count)
at MySql.Data.MySqlClient.MySqlStream.ReadFully(Stream stream, Byte[] buffer, Int32 offset, Int32 count)
at MySql.Data.MySqlClient.MySqlStream.LoadPacket()
at MySql.Data.MySqlClient.MySqlStream.LoadPacket()
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.AuthenticationFailed(Exception ex)
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.ReadPacket()
at MySql.Data.MySqlClient.Authentication.MySqlAuthenticationPlugin.Authenticate(Boolean reset)
at MySql.Data.MySqlClient.NativeDriver.Open()
at MySql.Data.MySqlClient.Driver.Open()
at MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings)
at MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection()
at MySql.Data.MySqlClient.MySqlPool.TryToGetDriver()
at MySql.Data.MySqlClient.MySqlPool.GetConnection()
at MySql.Data.MySqlClient.MySqlConnection.Open()
at SecureDockDataAccess.DBAccess.Execute(String sql)

Unable to connect to any of the specified MySQL hosts. 6

I hosted my website on web server.
I run my website in visual studio using the server database, it worked fine but when i hosted it on the web server, after one day it started giving me this error.
Sometimes some pages works fine and sometimes the same pages gives this error.
What would be the problem ?
Any solution will be appreciable.
This is the error -
Server Error in '/AttWeb' Application.
Unable to connect to any of the specified MySQL hosts.
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: MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the specified MySQL hosts.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.]
MySql.Data.MySqlClient.NativeDriver.Open() +1268
MySql.Data.MySqlClient.Driver.Open() +22
MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +218
MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +287
MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() +93
MySql.Data.MySqlClient.MySqlPool.GetConnection() +65
MySql.Data.MySqlClient.MySqlConnection.Open() +543
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2086
System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +278
System.Web.UI.WebControls.ListControl.PerformSelect() +37
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +114
System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +23
System.Web.UI.Control.PreRenderRecursiveInternal() +88
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Control.PreRenderRecursiveInternal() +160
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4775
and this is my code -
private MySqlConnection con = new MySqlConnection(ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString);
protected void keepData()
{
MySqlCommand cmd = new MySqlCommand("select deptName, year from subject where subId = '" + Request.Cookies["subject"].Value + "';", con);
try
{
con.Open();
MySqlDataReader result = cmd.ExecuteReader();
if (result.Read())
{
Response.Cookies["deptName"].Value = result["deptName"].ToString();
Response.Cookies["year"].Value = result["year"].ToString();
}
}
catch (MySqlException s) { Label1.Text = "Connection Failed"; }
catch (Exception ex) { Label1.Text = "Network Error"; }
con.Close();
}
and my web.config file contains connection string as
<connectionStrings>
<add name="DBCS"
connectionString="Server=MYSQL5016.SmarterASP.NET;Database=db_a0d03d_demo1;Uid=a0d03d_demo1;Pwd=***"
providerName="MySql.Data.MySqlClient" />
I am new to this please help me.
When you try to connect to other not local database you need allow remote request.

Website in Azure gives database connection error

I just moved my MVC5 web-project to Azure. The project uses a MySql database which is now hosted in Azure as well. I have updated the connection strings, and if I start the website from localhost on my own machine (still pointing to the database on Azure) all works well. But if I start the website from my Azure url, I get an sql error.
System.Data.Entity.Core.ProviderIncompatibleException: The provider
did not return a ProviderManifestToken string. --->
MySql.Data.MySqlClient.MySqlException: Unable to connect to any of the
specified MySQL hosts. ---> System.Net.Sockets.SocketException: An
attempt was made to access a socket in a way forbidden by its access
permissions 127.0.0.1:3306 at
System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at
MySql.Data.Common.MyNetworkStream.CreateSocketStream(MySqlConnectionStringBuilder
settings, IPAddress ip, Boolean unix) at
MySql.Data.Common.MyNetworkStream.CreateStream(MySqlConnectionStringBuilder
settings, Boolean unix) at
MySql.Data.Common.StreamCreator.GetStream(MySqlConnectionStringBuilder
settings) at MySql.Data.MySqlClient.NativeDriver.Open() --- End of
inner exception stack trace --- at
MySql.Data.MySqlClient.NativeDriver.Open() at
MySql.Data.MySqlClient.Driver.Open() at
MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder
settings) at MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() at
MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() at
MySql.Data.MySqlClient.MySqlPool.GetConnection() at
MySql.Data.MySqlClient.MySqlConnection.Open() at
MySql.Data.MySqlClient.MySqlProviderServices.GetDbProviderManifestToken(DbConnection
connection) at
System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection
connection) --- End of inner exception stack trace --- at
System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection
connection) at
System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices
providerServices, DbConnection connection) --- End of inner exception
stack trace --- at
System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices
providerServices, DbConnection connection) at
System.Data.Entity.Infrastructure.DefaultManifestTokenResolver.<>c__DisplayClass1.b__0(Tuple3
k) at
System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey
key, Func2 valueFactory) at
System.Data.Entity.Infrastructure.DefaultManifestTokenResolver.ResolveManifestToken(DbConnection
connection) at
System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection
connection, DbProviderManifest& providerManifest) at
System.Data.Entity.DbModelBuilder.Build(DbConnection
providerConnection) at
System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext
internalContext) at
System.Data.Entity.Internal.RetryLazy2.GetValue(TInput input) at
System.Data.Entity.Internal.LazyInternalContext.InitializeContext() at
System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type
entityType) at
System.Data.Entity.Internal.Linq.InternalSet1.Initialize() at
System.Data.Entity.Internal.Linq.InternalSet1.Include(String path) at
System.Data.Entity.Infrastructure.DbQuery1.Include(String path) at
System.Data.Entity.QueryableExtensions.Include[T](IQueryable1 source,
String path) at
System.Data.Entity.QueryableExtensions.Include[T,TProperty](IQueryable1
source, Expression1 path) at
Microsoft.AspNet.Identity.EntityFramework.UserStore6.GetUserAggregateAsync(Expression1
filter) at
Microsoft.AspNet.Identity.EntityFramework.UserStore6.FindByNameAsync(String
userName) at
Microsoft.AspNet.Identity.UserManager2.FindByNameAsync(String
userName) at
Microsoft.AspNet.Identity.Owin.SignInManager2.<PasswordSignInAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task) at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
tripplanner.Controllers.AccountController.<Login>d__2.MoveNext() ---
End of stack trace from previous location where exception was thrown
--- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task) at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at
System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<BeginInvokeAsynchronousActionMethod>b__36(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.CallEndDelegate(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase1.End()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult) at
System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult1.CallEndDelegate(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult
asyncResult) at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.b__1c()
at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.b__1e(IAsyncResult
asyncResult);
Hope someone can help.
UPDATE: I was using the wrong web.config file in Azure.