Click here to Skip to main content
16,011,855 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello sir
I have develop small project in asp.net 3.5 framework with Database MYSQL Server .
it work Perfectly in Local machine. When Ever i Upload into Go-Daddy Server . it will not connect mysql Server database on hosting server. Even i Change my web.config file.
Even i asked about Go-Daddy Customer Care then are told "Compile Project into Medium Truct". I write this into my web config file. but it gives error at "<securitypolicy> " in line.

<location allowoverride="true">
<system.web>
<securitypolicy>
<trustlevel name="Medium" policyfile="web_mediumtrust.config">
<trustlevel>

Even i Remove this Location than it Show DNS-Permision error into web.config file and some version error . how i solve this error.
and how to connect with mysql server database on Go-Daddy hosting server.And where i Upload mysql DLL into Go-Daddy hosting server.

Please Help.
Posted
Comments
adriancs 21-Oct-12 9:10am    
Is there any exceptions? what is the details of the exception error message?
John d. Bartels 21-Oct-12 10:59am    
Have you tried to select the reference to the MySQL DLL in your project, and set the "Copy Local" Property to true?

1 solution

I know exactly what is your problem because I had this one before, actually the problem isn't in your code its about the connection you use for connecting your Mysql database, simply you need to use ODBC connection to connect to your database and here is an example of how to do so

XML
<connectionstrings>
		<add name="YourConnectionStringName" connectionstring="DRIVER={MySQL ODBC 3.51 Driver};SERVER=.;PORT=3306;DATABASE=YourDatabaseName;USER=YourDatabaseUsername;PASSWORD=YourPassword;OPTION=0;" providername="System.Data.Odbc" />
 </connectionstrings>


add the previous code while changing it to work with your database in the System.web section in your website configuration file.

NOTE: You may need to change your commands to work with the ODBC connection
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900