Page 1 of 1

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

Posted: Mon 03 Mar 2008 08:28
by R. Santana
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 182:    
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

Posted: Mon 03 Mar 2008 11:31
by Alexey.mdr
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.

Posted: Mon 03 Mar 2008 17:44
by R. Santana
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

Posted: Tue 04 Mar 2008 11:44
by Alexey.mdr
MyDirect .NET doesn't have MySqlServices class.
Did you create it by yourself?
Probably you need the record in the local web.config file.

Posted: Tue 15 Apr 2008 16:43
by dhmderuiter
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:    <add name="AspNetMySqlMembershipProvider" type="CoreLab.MySql.Web.Providers.MySqlMembershipProvider, CoreLab.MySql.Web, Version=4.50.26.0, Culture=neutral, PublicKeyToken=09af7300eec23701"
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?

Posted: Wed 16 Apr 2008 07:45
by Alexey.mdr
Please add the following line to your web.config (connectionStrings section): Replace the connection string elements with valid values.

Posted: Wed 16 Apr 2008 23:13
by dhmderuiter
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?

Posted: Thu 17 Apr 2008 13:13
by Alexey.mdr
MyDirect .NET follows standard ASP.NET and MS SQL server interaction model.
From machine.config

Code: Select all

<add name="AspNetSqlProfileProvider" connectionStringName="LocalSqlServer" ... 
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

Posted: Mon 28 Apr 2008 13:16
by dhmderuiter
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?

Posted: Tue 29 Apr 2008 09:15
by Alexey.mdr
Try adding the following line to the web.config section:

Posted: Tue 29 Apr 2008 12:54
by dhmderuiter
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: <add name="AspNetMySqlMembershipProvider" type="CoreLab.MySql.Web.Providers.MySqlMembershipProvider, CoreLab.MySql.Web, Version=4.50.27.0, Culture=neutral, PublicKeyToken=09af7300eec23701"
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

Posted: Wed 30 Apr 2008 12:59
by Alexey.mdr
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


  
  
    
    
  
  
    
      
        
          
        
      
    
    
      
        
        
        
        
      
      
        
        
      
      
        
        
      
      
        
        
        
      
      
        
        
        
        
        
        
        
        
        
        
      
    
    
      
        
        
      
    
    
      
        
        
      
    
    
      
        
        
      
    
    
    
      
        
        
        
      
      
        
        
      
    
    
      
        
      
    
    
    
      
        
        
        
      
    
     section enables configuration 
            of the security authentication mode used by 
            ASP.NET to identify an incoming user. 
        -->
    
      
      
    
    
     section enables configuration 
            of what to do if/when an unhandled error occurs 
            during the execution of a request. Specifically, 
            it enables developers to configure html error pages 
            to be displayed in place of a error stack trace.

        
            
            
        
        -->
  

Posted: Wed 30 Apr 2008 14:23
by dhmderuiter
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?

Posted: Mon 05 May 2008 14:25
by Alexey.mdr
We have located the problem.
The issue will be solved in the nearest builds.
Thank you for your help.