The connection name 'MySqlServices' was not found in the applications configuration or the connection string is empty.

The connection name 'MySqlServices' was not found in the applications configuration or the connection string is empty.

Postby R. Santana » Mon 03 Mar 2008 08:28

Hello,

I've installed the latest version v4.50 and now I can't run any website that uses this component, I receive this error:

Code: Select all
Error de servidor en la aplicación '/'.
Error de configuración
Descripción: Error durante el procesamiento de un archivo de configuración requerido para dar servicio a esta solicitud. Revise los detalles de error específicos siguientes y modifique el archivo de configuración en consecuencia.

Mensaje de error del analizador: The connection name 'MySqlServices' was not found in the applications configuration or the connection string is empty.

Error de código fuente:

Línea 180:    Línea 181:     type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
Línea 182:    Línea 183:     description="MyDirect role provider" connectionStringName="MySqlServices" />
Línea 184:   


Archivo de origen: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config    Línea: 182

Información de versión: Versión de Microsoft .NET Framework:2.0.50727.1433; Versión ASP.NET:2.0.50727.1433


Anybody has had this problem?

Thanks
R. Santana
 
Posts: 36
Joined: Tue 18 Jan 2005 20:52
Location: SPAIN

Postby Alexey.mdr » Mon 03 Mar 2008 11:31

Could you please translate the error message and the stack trace into English
(you may just set your regional location to any english-speaking country and run the project)?
As for now please check all the links in your project to the valid libraries.
It shouldn't be very difficult.
Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby R. Santana » Mon 03 Mar 2008 17:44

Hello,

the translation doesn't matter, I've found that I don't have MySqlServices called connection in my machine.config, the installer forgot to create it? I've create it empty and now it's working... :shock:

Could anybody check it's machine.config file for .net v2.0 and check if it has a MySqlServices connection?

Thanks
R. Santana
 
Posts: 36
Joined: Tue 18 Jan 2005 20:52
Location: SPAIN

Postby Alexey.mdr » Tue 04 Mar 2008 11:44

MyDirect .NET doesn't have MySqlServices class.
Did you create it by yourself?
Probably you need the record in the local web.config file.
Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby dhmderuiter » Tue 15 Apr 2008 16:43

I have the same problem with the latest v4.50 version, the same error message:

Code: Select all
Serverfout in toepassing /TCEOnline.
--------------------------------------------------------------------------------

Configuratiefout
Beschrijving: Er is een fout opgetreden tijdens het verwerken van een configuratiebestand dat vereist is om aan deze aanvraag te voldoen. Raadpleeg de hieronder weergegeven details van deze fout en pas uw configuratiebestand overeenkomstig aan.

Parser-foutbericht: The connection name 'MySqlServices' was not found in the applications configuration or the connection string is empty.

Fout in bron:


Regel 159:     minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1"
Regel 160:     passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
Regel 161:    Regel 162:     description="MyDirect membership provider" connectionStringName="MySqlServices"
Regel 163:     enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true"


Bronbestand: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config    Regel: 161


--------------------------------------------------------------------------------
Versiegegevens: Microsoft .NET Framework Versie:2.0.50727.1433; ASP.NET Versie:2.0.50727.1433


I cannot solve it by putting a connection string in my machine.config, doesn't help. Any suggestions?
dhmderuiter
 
Posts: 6
Joined: Tue 15 Apr 2008 16:40

Postby Alexey.mdr » Wed 16 Apr 2008 07:45

Please add the following line to your web.config (connectionStrings section):
Code: Select all
Replace the connection string elements with valid values.
Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby dhmderuiter » Wed 16 Apr 2008 23:13

Okay, that helps, but why is this suddenly needed in v4.50? I don't use that connection string (I use another of my own), so why is it needed?
dhmderuiter
 
Posts: 6
Joined: Tue 15 Apr 2008 16:40

Postby Alexey.mdr » Thu 17 Apr 2008 13:13

MyDirect .NET follows standard ASP.NET and MS SQL server interaction model.
From machine.config
Code: Select all
We have hardcoded “MySqlServices” connection string in the machine.config for general usability purposes.
Right after the installation you need to specify only “MySqlServices” connection string in the web.config
and you will be able to use standard ASP.NET authorisation and authentication features.
Not only does this make Web development easier, but it also provides all the benefits for “easy start”.
Had we skip this step it would be more complicated to get started with MyDirect .NET and ASP.NET,
also it would make you add explicitly MyDirect .NET corresponding providers into the web.config.
Please see the sample that shows such implementation:
%Program Files%CoreLab\MyDirect.NET2\Samples\Web\CS\WebProviders\

For additional information please see this link:
http://msdn2.microsoft.com/en-us/library/6e9y4s5t.aspx
Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby dhmderuiter » Mon 28 Apr 2008 13:16

Okay, I understand the reason you did this build in. However, currently I don't use such a provider, but it still asks for that connectionstring. If you use MS SQL than it's also possible to not use the default provider, right?

How can I do this so I don't need to use that connection string?
dhmderuiter
 
Posts: 6
Joined: Tue 15 Apr 2008 16:40

Postby Alexey.mdr » Tue 29 Apr 2008 09:15

Try adding the following line to the web.config section:
Code: Select all
Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby dhmderuiter » Tue 29 Apr 2008 12:54

Mmm, doesn't work, if I do that, then I get the following error:

Serverfout in toepassing /TCEOnline.
--------------------------------------------------------------------------------

Configuratiefout
Beschrijving: Er is een fout opgetreden tijdens het verwerken van een configuratiebestand dat vereist is om aan deze aanvraag te voldoen. Raadpleeg de hieronder weergegeven details van deze fout en pas uw configuratiebestand overeenkomstig aan.

Parser-foutbericht: The connection name 'MySqlServices' was not found in the applications configuration or the connection string is empty.

Fout in bron:


Regel 153: minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1"
Regel 154: passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
Regel 155: Regel 156: description="MyDirect membership provider" connectionStringName="MySqlServices"
Regel 157: enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true"


Bronbestand: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config Regel: 155


--------------------------------------------------------------------------------
Versiegegevens: Microsoft .NET Framework Versie:2.0.50727.1433; ASP.NET Versie:2.0.50727.1433
dhmderuiter
 
Posts: 6
Joined: Tue 15 Apr 2008 16:40

Postby Alexey.mdr » Wed 30 Apr 2008 12:59

Please see the sample web.config file below.
If you use MyDirect .NET ASP.NET Membership, Roles etc. providers you have to specify any connection string that those providers will use.
Code: Select all


 
 
   
             connectionString="User Id=root;Password=root;Host=localhost;Database=aspnet;"/>
 

 
   
     
       
                         connectionStringName="ConnectionString"
               type="CoreLab.MySql.Web.Providers.MySqlPersonalizationProvider, CoreLab.MySql.Web, Version=4.50.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701"/>
       

     

   

                          heartbeatInterval="0">
     
                     maxBufferSize="100"
             maxFlushSize="20"
             urgentFlushThreshold="1"
             regularFlushInterval="Infinite"
             urgentFlushInterval="00:01:00"
             maxBufferThreads="1"/>
                     maxBufferSize="300"
             maxFlushSize="20"
             urgentFlushThreshold="1"
             regularFlushInterval="Infinite"
             urgentFlushInterval="00:01:00"
             maxBufferThreads="1"/>
                     maxBufferSize="1000"
             maxFlushSize="100"
             urgentFlushThreshold="100"
             regularFlushInterval="00:05:00"
             urgentFlushInterval="00:01:00"
             maxBufferThreads="1"/>
                     maxBufferSize="1000"
             maxFlushSize="200"
             urgentFlushThreshold="800"
             regularFlushInterval="00:30:00"
             urgentFlushInterval="00:05:00"
             maxBufferThreads="1"/>
     

     
       
                     type="CoreLab.MySql.Web.Providers.MySqlWebEventProvider, CoreLab.MySql.Web, Version=4.50.26.0, Culture=neutral, PublicKeyToken=09AF7300EEC23701"
             connectionStringName="ConnectionString"
             maxEventDetailsLength="1073741823"
             buffer="false"
             bufferMode="Notification" />
     

     
                     minInstances="1"
             maxLimit="Infinite"
             minInterval="00:01:00"
             custom=""/>
                     minInstances="1"
             maxLimit="Infinite"
             minInterval="00:00:00"
             custom=""/>
     

     
       
                     eventName="All Errors"
             provider="MySqlWebEventProvider"
             profile="Default"
             minInstances="1"
             maxLimit="Infinite"
             minInterval="00:01:00"
             custom=""/>
                     eventName="Failure Audits"
             provider="MySqlWebEventProvider"
             profile="Default"
             minInstances="1"
             maxLimit="Infinite"
             minInterval="00:01:00"
             custom=""/>
     

     
                     type="System.Web.Management.WebBaseEvent,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
             startEventCode="0"
             endEventCode="2147483647"/>
                     type="System.Web.Management.WebHeartbeatEvent,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
             startEventCode="0"
             endEventCode="2147483647"/>
                     type="System.Web.Management.WebApplicationLifetimeEvent,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
             startEventCode="0"
             endEventCode="2147483647"/>
                     type="System.Web.Management.WebRequestEvent,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
             startEventCode="0"
             endEventCode="2147483647"/>
                     type="System.Web.Management.WebBaseErrorEvent,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
             startEventCode="0"
             endEventCode="2147483647"/>
                     type="System.Web.Management.WebErrorEvent,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
             startEventCode="0"
             endEventCode="2147483647"/>
                     type="System.Web.Management.WebRequestErrorEvent,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
             startEventCode="0"
             endEventCode="2147483647"/>
                     type="System.Web.Management.WebAuditEvent,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
             startEventCode="0"
             endEventCode="2147483647"/>
                     type="System.Web.Management.WebFailureAuditEvent,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
             startEventCode="0"
             endEventCode="2147483647"/>
                     type="System.Web.Management.WebSuccessAuditEvent,System.Web,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"
             startEventCode="0"
             endEventCode="2147483647"/>
     

   

                      regenerateExpiredSessionId="true"
                  mode="Custom"
                  customProvider="MySqlSessionProvider">
     
       
                     type="CoreLab.MySql.Web.Providers.MySqlSessionStateStore"
             connectionStringName="ConnectionString"
             writeExceptionsToEventLog="false"/>
     

   

   
     
       
                     type="CoreLab.MySql.Web.Providers.MySqlMembershipProvider"
             description="MyDirect membership provider"
             applicationName="/WebProviders"
             connectionStringName="ConnectionString"
             passwordFormat="Hashed"
             enablePasswordRetrieval="false"
             minRequiredPasswordLength="1"
             requiresQuestionAndAnswer="false"
             minRequiredNonalphanumericCharacters="0"/>
     

   

                     defaultProvider="AspNetMySqlRoleProvider">
     
       
                     type="CoreLab.MySql.Web.Providers.MySqlRoleProvider"
             applicationName="/WebProviders"
             connectionStringName="ConnectionString"
             description="MyDirect role provider"/>
     

   

   
   
     
                     defaultValue="??"
             allowAnonymous="true"/>
                     defaultValue="??"
             allowAnonymous="true"/>
                     defaultValue="??"
             allowAnonymous="true"/>
     

     
       
                     type="CoreLab.MySql.Web.Providers.MySqlProfileProvider"
             connectionStringName="ConnectionString"
             description="MyDirect profile provider"/>
     

   

   
     
                     type="CoreLab.MySql.Web.Providers.MySqlSiteMapProvider, CoreLab.MySql.Web, Version=4.50.26.0, Culture=neutral, PublicKeyToken=09AF7300EEC23701"
             connectionStringName="ConnectionString"
             securityTrimmingEnabled="true"
             />
     

   

   
   
     
       
       
       
     

   

   
   
     
                   name=".ASPXFORMSAUTH"
             protection="All"
             path="/"
             timeout="30"/>
   

                    decryptionKey="8A9BE8FD67AF6979E7D20198CFEA50DD3D3799C77AF2B72F"
                validation="SHA1"/>
   
 

Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby dhmderuiter » Wed 30 Apr 2008 14:23

Yes, but I get this error while NOT using the MyDirect .NET ASP.NET Membership, Roles etc. providers.

I think the problem is that you put some stuff in the machine.config when installing MyDirect.NET, because I just put an application on another server which hasn't MyDirect.NET installed (so I only have the MyDirect dll in the Bin directory), and no problems there.

It seems the stuff regarding the connection MySqlServices you put in the machine.config is the problem, right?
dhmderuiter
 
Posts: 6
Joined: Tue 15 Apr 2008 16:40

Postby Alexey.mdr » Mon 05 May 2008 14:25

We have located the problem.
The issue will be solved in the nearest builds.
Thank you for your help.
Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24


Return to dotConnect for MySQL