Usuário com melhor resposta
CS0246: The type or namespace name 'MySql' could not be found

Pergunta
-
Hi,
I´m configuring a Windows Server 2008 R2 with .net Framework 4.5.2 and lastest version of MySQL. I tried all the connectors avaliable for .net and in all versions I got the message "CS0246: The type or namespace name 'MySql' could not be found" when I tried to refer the library in coed behind.
Someone could help me ?
Respostas
-
Some questions
1) You are running on which version of IIS?
2) Have you tried to change the trust level to Full Trust?
3) Have you tried to add the following code in the Web.Config?<compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/> </assemblies> </compilation>
- Marcado como Resposta Giba Moraes terça-feira, 26 de julho de 2016 18:30
Todas as Respostas
-
-
Hi Andre, thanks for response.
I think that is something on the server configuration.
If I run on localhost or on a host like Azure works fine (http://webfocus.azurewebsites.net)
But when I publish on my cloud server, the message apears... (http://200.98.167.211)
-
-
-
-
-
Some questions
1) You are running on which version of IIS?
2) Have you tried to change the trust level to Full Trust?
3) Have you tried to add the following code in the Web.Config?<compilation debug="true" targetFramework="4.0"> <assemblies> <add assembly="MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/> </assemblies> </compilation>
- Marcado como Resposta Giba Moraes terça-feira, 26 de julho de 2016 18:30
-
I tried the code in step 3 and get an error.
Then I remove the MySQL and install again.
When I run again the application I got another error, then I change the version from 6.6.5.0 to 6.9.9.0 and install the Connector .net on the server.
Now the error is gone, but the server is gone togheter...
Service Unavailable
HTTP Error 503. The service is unavailable.
-
IT WORKS!!!!!!
For a any reason that I don´t know why, the app enters in a loop and crash down the server, making the application pool on the IIS to prevent stop.
For any reason that I also don´t know why, the behavior of the app is diferent in my cloud server than the Azure server.
But the important thing is that works...
THANK YOU SO MUCH FOR SPENDING TIME WITH ME !
[]s
-
hello, maybe this post can help solve your problem.
Integrating MySql to AspNet MVC with C #Se a resposta contribuiu com seu aprendizado por favor marque como Útil
Se solucionou seu problema por favor marque como Resposta
Atenção, se seu problema foi resolvido não deixe o post aberto
Visite : www.codigoexpresso.com.br