MySQL .NET connector causing many exceptions when using load balancing - c#

We have an ASP.NET project, made in .NET Framework 4.6, that uses the MySQL.Data nuget package, version 8.0.29. We have multiple MySQL databases in a cluster. The MySQL connector has functionality for adding multiple hostnames (comma separated) so that the traffic will be split between multiple databases. We tried using this and it seems to work fine on our test environment, but on production we are seeing many exceptions in the Event Viewer of the Windows Server. Production has, of course, much more traffic than the test environment, so that might be part of the cause.
These exceptions do not occur when we only use one of the database. We have tried all of them seperately and they all work without problem on production by themselves, just not together.
This is an example of our connection string:
server=example1.com,example2.com,example3.com;port=25060;uid=username;pwd=password;database=database;pooling=false;Allow User Variables=True;CharSet=utf8
(Pooling is set to false, because pooling is causing other problems for us which is a separate issue.)
Here are the errors we are getting:
Exception type: MySqlException
    Exception message: Unable to connect to any of the specified MySQL hosts.
   at MySql.Data.MySqlClient.NativeDriver.<>c.<Open>b__40_0(Exception ex)
   at System.AggregateException.Handle(Func`2 predicate)
   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()
Exception type: InvalidOperationException
Exception message: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.KeyCollection.Enumerator.MoveNext()
at System.Data.Common.DbConnectionStringBuilder.get_ConnectionString()
at System.Data.Common.DbConnectionStringBuilder.set_ConnectionString(String value)
at MySql.Data.MySqlClient.MySqlConnection.Open()
Exception type: SocketException
Exception message: No such host is known
at System.Net.Dns.HostResolutionEndHelper(IAsyncResult asyncResult)
at System.Net.Dns.EndGetHostAddresses(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
Exception type: NullReferenceException
Exception message: Object reference not set to an instance of an object.
at MySql.Data.Failover.FailoverManager.AttemptConnection(MySqlConnection connection, String originalConnectionString, String& connectionString, Boolean mySqlPoolManager)
at MySql.Data.MySqlClient.MySqlConnection.Open()
Does anyone have an idea what is going on here? Is it something we're doing wrong?

Related

How to debug SQL Server LINQ expressions? [duplicate]

This question already has answers here:
MSSQL Error 'The underlying provider failed on Open'
(31 answers)
Closed last year.
I have the following piece of code, which works at a customer, but not on my computer:
var result = await db.Configurations.FirstOrDefaultAsync().ConfigureAwait(false);
db is derived from a System.Data.Entity.DbContext, defined in EntityFramework.6.4.0\lib\net45\EntityFramework.dll.
In the corresponding SQL Server database, there is a table "Configurations" and it contains an entry.
When I launch the line of source code, an Exception gets generated (I hereby show the slightly formatted content of the immediate window while asking ? ex):
? ex
{"An exception occurred while initializing the database. See the InnerException for details."}
Data: {System.Collections.ListDictionaryInternal}
HResult: -2146233087
HelpLink: null
InnerException: {"The underlying provider failed on Open."}
Message: "An exception occurred while initializing the database. See the InnerException for details."
Source: "EntityFramework"
StackTrace: " bij System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)\r\n bij System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
bij System.Data.Entity.Internal.LazyInternalContext.<>c.<InitializeDatabase>b__58_0(InternalContext c)
bij System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input)
bij System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)
bij System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()
bij System.Data.Entity.Internal.InternalContext.Initialize()
bij System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
bij System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
bij System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
bij System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
bij System.Data.Entity.QueryableExtensions.FirstOrDefaultAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)
bij System.Data.Entity.QueryableExtensions.FirstOrDefaultAsync[TSource](IQueryable`1 source)
bij Project.<GetConfigAsync>d__56.MoveNext() in C:\\Source_Code_Directory\\Source_Code_File.cs:regel 2149"
TargetSite: {Void PerformInitializationAction(System.Action)}
I know this line of code works at customer's system, and I'm working on a restored backup of customer's DB.
What is going wrong and what can I do to fix it (what is the underlying provider)?
Thanks in advance
In the meantime the problem is analysed:
I had taken the backup of the customer's DB and restored it on my PC, but the username, as indicated in the connectionstring in source code, was wrong, hence my application could simply not open the database connection, so now the problem comes down on a database user management issue.
Thanks for all the support.

Oracle ManagedDataAccess via Nuget - The provider did not return a ProviderManifestToken string

I got a fresh machine, with just Visual Studio 2015 and the latest .Net Framework, cloned a repository that accesses a remote Oracle 11g Database using Entity and Oracle.ManagedDataAccess from Nuget, this project does work in other machines,
I tested the remote connection using SqlDeveloper, and verified the port access with telnet and even created a simple and local Oracle Database to exclude any network related error
To confirm the error i created a simple Console Project following a Oracle Article and still got the same error
Exception : The provider did not return a ProviderManifestToken string.
InnerException : ORA-01017: invalid username/password; logon denied
I do not have any Oracle Client installed, and as far as i can tell i do not need any because i am using Nuget
And yes, i am extremelly sure of the user and password, as said above, the connection works when using SqlDeveloper
Oracle ManagedDataAccess Nuget
Oracle Article
Full StackTrace
"data source=OracleDS;user id=PUBLICO;password=PUBLICO;min pool size=1;max pool size=1;Incr Pool Size=1 ----- System.Data.Entity.Core.ProviderIncompatibleException: An error occurred accessing the database. This usually means that the connection to the database failed. Check that the connection string is correct and that the appropriate DbContext constructor is being used to specify it or find it in the application's config file. See http://go.microsoft.com/fwlink/?LinkId=386386 for information on DbContext and connections. See the inner exception for details of the failure. ---> System.Data.Entity.Core.ProviderIncompatibleException: The provider did not return a ProviderManifestToken string. ---> Oracle.ManagedDataAccess.Client.OracleException: ORA-01017: invalid username/password; logon denied
em OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, CriteriaCtx criteriaCtx, String affinityInstanceName, Boolean bForceMatch)
em OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, CriteriaCtx criteriaCtx, String affinityInstanceName, Boolean bForceMatch)
em OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword, CriteriaCtx criteriaCtx)
em Oracle.ManagedDataAccess.Client.OracleConnection.Open()
em Oracle.ManagedDataAccess.EntityFramework.EFOracleProviderServices.GetDbProviderManifestToken(DbConnection connection)
em System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
--- Fim do rastreamento de pilha de exceções internas ---
em System.Data.Entity.Core.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection)
em System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection)
--- Fim do rastreamento de pilha de exceções internas ---
em System.Data.Entity.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection)
em System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
em System.Data.Entity.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest)
em System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection)
em System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext)
em System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input)
em System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
em System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
em System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
em System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
em System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
em System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
em BemaHybrid.Library.EntityFramework.DbContextExtended.AdquireUsuarioSenhaBaseadoUsuarioPublico() na D:\\Projetos\\hybrid.cliente\\BemaHybrid.Library.EntityFramework\\DbContextExtended.cs:linha 42"
UPDATE
Found this question that nailed the answer, a windows Registry settings that encrypted the password, in this question you can find the way to disabled on the registry or in the application config if you need
Solution

"No credentials are available in the security package" when connection to Oracle is performed

The tests that performs connection to Oracle database started fail with AuthenticationException after last Windows update.
The message and stack trace are provided below:
<ErrorInfo>
<Message>Test method threw exception:
System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> Oracle.ManagedDataAccess.Client.OracleException: Oracle Communication: Failed to connect to server or failed to parse connect string ---> OracleInternal.Network.NetworkException: Oracle Communication: Failed to connect to server or failed to parse connect string ---> System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: No credentials are available in the security package</Message>
<StackTrace>
--- End of inner exception stack trace ---
at System.Net.Security.NegoState.StartSendAuthResetSignal(LazyAsyncResult lazyResult, Byte[] message, Exception exception)
at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
at System.Net.Security.NegoState.CheckCompletionBeforeNextSend(Byte[] message, LazyAsyncResult lazyResult)
at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
at System.Net.Security.NegoState.StartReceiveBlob(LazyAsyncResult lazyResult)
at System.Net.Security.NegoState.CheckCompletionBeforeNextReceive(LazyAsyncResult lazyResult)
at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, ChannelBinding binding, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
at OracleInternal.Network.Ano.StartNegotiation()
at OracleInternal.Network.OracleCommunication.SendConnectPacketAndProcessResponse(AddressResolution addrRes)
at OracleInternal.Network.OracleCommunication.ConnectViaCO(ConnectionOption connOption, AddressResolution addrRes)
at OracleInternal.Network.OracleCommunication.DoConnect(String tnsDescriptor)
--- End of inner exception stack trace ---
at OracleInternal.Network.OracleCommunication.DoConnect(String tnsDescriptor)
at OracleInternal.Network.OracleCommunication.Connect(String tnsDescriptor, Boolean doNAHandshake, String IName)
at OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString cs, Boolean bOpenEndUserSession, String instanceName)
--- End of inner exception stack trace ---
at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)
at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)
at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword)
at Oracle.ManagedDataAccess.Client.OracleConnection.Open()
at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<Open>b__36(DbConnection t, DbConnectionInterceptionContext c)
at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
at System.Data.Entity.Core.EntityClient.EntityConnection.<Open>b__2()
at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute(Action operation)
at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
--- End of inner exception stack trace ---
at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()
at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__3[TResult](IEnumerable`1 sequence)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
at System.Data.Entity.Core.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
at System.Linq.Queryable.Single[TSource](IQueryable`1 source, Expression`1 predicate)
</StackTrace>
</ErrorInfo>
The exception is thrown when tests are run from VS Test Runner or from command line with mstest.
The Oracle Database tools in Visual Studio throws the same exception.
In application the Oracle ManagedDataAccess provider is used. Package version is 12.1.2400.
OS: Windows 10 Pro x64
An application locally published to IIS works just fine. There are no any problems with database connection.
Does anybody know how to fix this?
Thanks in advance!
Same problem here. Today I reopened a console application started in august and Oracle gave me the same exception.
Solved switching back to version 12.1.22 of Oracle.ManagedDataAccess from NuGet.
UPDATE 2016-12-27
Found final solution here: https://community.oracle.com/thread/3972810
The problem is caused by SQLNET.AUTHENTICATION_SERVICES set to NLS.
To solve the problem you have to edit app.config / web.config:
<oracle.manageddataaccess.client>
<version number="*">
<dataSources>
<dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) "/>
</dataSources>
<settings>
<setting name="SQLNET.AUTHENTICATION_SERVICES" value=""/>
</settings>
</version>
</oracle.manageddataaccess.client>
I added the <settings> section.

IIS SQL Server Compact 4.0 SP1

I've been using SQL Server Compact Edition 4.0 SP1 with Entity Framework for data access in one of our web applications for the past couple of years without problems, but in the last couple of days I've been getting errors when attempting to run the application locally from within IIS.
The error I'm getting is, unfortunately, not very helpful:
System.Data.SqlServerCe.SqlCeException: Unspecified error [ sqlcese40.dll ]
[EntityException: The underlying provider failed on Open.]
As I had just checked out a branch into a new directory, at first I thought the issue was caused by permissions, but granting the application pool read/write access did not fix it.
I tried a number of other things, uninstalling and reinstalling SQL Server CE etc... but this didn't fix the issue either.
Finally, I changed the "Enable 32-bit Applications" setting for the app pool to true and this "fixed" the issue and I was able to get the application running again.
I'm not satisfied with this solution however, as I've been running without this enabled for months without any problem and I want to figure out what has caused the issue but I'm a bit stumped as where to look next.
Just wondered if anyone had any suggestions?
Here is the full error from the Event Log:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 03/10/2016 12:39:00
Event time (UTC): 03/10/2016 11:39:00
Event ID: a0a208f33d6a4435a26d41aebf98e9a1
Event sequence: 2
Event occurrence: 1
Event detail code: 0
Application information:
Application domain:
Trust level: Full
Application Virtual Path:
Process information:
Process ID: 752
Process name: w3wp.exe
Account name: IIS APPPOOL\XXX
Exception information:
Exception type: EntityException
Exception message: The underlying provider failed on Open.
at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
at System.Data.EntityClient.EntityConnection.Open()
at System.Data.Objects.ObjectContext.EnsureConnection()
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at System.Data.Entity.Internal.EdmMetadataRepository.QueryForModelHash(Func`2 createContext)
at System.Data.Entity.Internal.ModelCompatibilityChecker.CompatibleWithModel(InternalContext internalContext, ModelHashCalculator modelHashCalculator, Boolean throwIfNoMetadata)
at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context)
at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
Unspecified error [ sqlcese40.dll ]
at System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent)
at System.Data.SqlServerCe.SqlCeConnection.Open()
at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
Request information:
Request URL: -
Request path: -
User host address: ::1
User:
Is authenticated: False
Authentication Type:
Thread account name: -
Thread information:
Thread ID: 7
Thread account name: -
Is impersonating: False
Stack trace: at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean openCondition, DbConnection storeConnectionToOpen, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean& closeStoreConnectionOnFailure)
at System.Data.EntityClient.EntityConnection.Open()
at System.Data.Objects.ObjectContext.EnsureConnection()
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at System.Data.Entity.Internal.EdmMetadataRepository.QueryForModelHash(Func`2 createContext)
at System.Data.Entity.Internal.ModelCompatibilityChecker.CompatibleWithModel(InternalContext internalContext, ModelHashCalculator modelHashCalculator, Boolean throwIfNoMetadata)
at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context)
at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)

2 Connection Strings, The Security String Works, The Entity Framework One Doesn't

I'm new to ASP.NET and finding connection strings very difficult to get to grips with.
I've been half successful with my connection of the 2 connection strings below, the connection string for the database security works fine, but I’m unable to get the main string dealing with the rest of the data to work. I think it must be because of the Entity Framework element of the connection string.
For the metadata part, I've used the res://*/ part as I assume this is less efficient but will catch all, if I've correctly understood the documents that I've been reading.
<remove name="ApplicationServices" />
<add name="ApplicationServices"
connectionString= "Server=184.168.194.64,1433;
Database= myASPNETDB;
User=****;
Password=****;"
providerName="System.Data.SqlClient" />
<remove name="PropManEntities" />
<add name="PropManEntities"
connectionString="Metadata=res://*/;
provider=System.Data.SqlClient;
provider connection string='Data Source=184.168.194.64,1433;
Initial Catalog=myTest_C;
User=****;
Password=****;
multipleactiveresultsets=true'"
providerName="System.Data.EntityClient" />
I get the following error when I open a page with data:
The query syntax is not valid. Near line 6, column 17.
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.EntitySqlException: The query syntax is not valid. Near line 6, column 17.
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:
[EntitySqlException: The query syntax is not valid. Near line 6, column 17.]
System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +964
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +138
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
System.Web.UI.WebControls.DetailsView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +105
System.Web.UI.WebControls.DetailsView.EnsureDataBound() +223
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()+75
System.Web.UI.Control.EnsureChildControls() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +974
GoDaddy are unwilling to provide any assistance with this matter.
Edit:
After attempting Matteo's suggestion I got the following error:
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
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.ArgumentException: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
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:
[ArgumentException: The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.]
System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +8425830
System.Data.EntityClient.EntityConnection..ctor(String connectionString) +43
System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString) +85
System.Data.Objects.ObjectContext..ctor(String connectionString) +12
System.Web.UI.WebControls.EntityDataSourceView.ConstructContext() +461
System.Web.UI.WebControls.EntityDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +102
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +21
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +138
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
System.Web.UI.WebControls.DetailsView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +105
System.Web.UI.WebControls.DetailsView.EnsureDataBound() +223
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls()+75
System.Web.UI.Control.EnsureChildControls() +83
System.Web.UI.Control.PreRenderRecursiveInternal() +42
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Control.PreRenderRecursiveInternal() +155
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)+974
Try this
<add name="PropManEntities" connectionString="data source=184.168.194.64,1433;initial catalog=myTest_C;User Id=****;Password=****;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
Sorry, I didn't realize you're using edmx file..
try this version (instead of the ????? use your filenames) :
<add name="PropManEntities" connectionString="metadata=res://*/??????????.csdl|res://*/????????????.ssdl|res://*/???????????????.msl;provider=System.Data.SqlClient;provider connection string="data source=184.168.194.64,1433;initial catalog=MPInvoicingSystem;user id=*****;password=*****;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
If this is not working, I'd suggest you to add a new edmx model and copy the connection string automatically added.
Matteo

Categories

Resources