I know it's probably simple, but it's driving me round the bend.
I have created and populated a db using phpmyadmin, and created a local copy for testing.
I have created a web.config file in the root of public_html:
<?xml version="1.0" ?>
<configuration>
<appSettings />
<connectionStrings />
<system.web>
<customErrors mode="Off" />
</system.web>
</configuration>
and a two page website: Default.aspx / Default.aspx.cs and Page2.apsx / Page2.aspx.cs - the former navigating to the later.
If Page2.aspx.cs contains the lines:
using MySql.Data.MySqlClient;
privateMySqlCommand sqlCmd;
privateMySqlConnection hookUp;
privateMySqlDataReader reader;
Then when I navigate to Page2, i just get an error:
Server Error in '/' Application
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
...
I haven't even tried to connect to the data base yet! It all works localy, complete with code added to connect to mySQL database, filter content and display, so what stupid mistake have I made?
Any help will be much appreciated.
Edit:
[SOLVED]
I sorted it - it's amazing how asking for help clears the brain!
Solution: Create a "bin" directory, and upload the "mySQL.Data.dll" to it. This effectively provides the reference as well as the assembly.
I knew I was an idiot...
I have created and populated a db using phpmyadmin, and created a local copy for testing.
I have created a web.config file in the root of public_html:
<?xml version="1.0" ?>
<configuration>
<appSettings />
<connectionStrings />
<system.web>
<customErrors mode="Off" />
</system.web>
</configuration>
and a two page website: Default.aspx / Default.aspx.cs and Page2.apsx / Page2.aspx.cs - the former navigating to the later.
If Page2.aspx.cs contains the lines:
using MySql.Data.MySqlClient;
privateMySqlCommand sqlCmd;
privateMySqlConnection hookUp;
privateMySqlDataReader reader;
Then when I navigate to Page2, i just get an error:
Server Error in '/' Application
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
...
I haven't even tried to connect to the data base yet! It all works localy, complete with code added to connect to mySQL database, filter content and display, so what stupid mistake have I made?
Any help will be much appreciated.
Edit:
[SOLVED]
I sorted it - it's amazing how asking for help clears the brain!
Solution: Create a "bin" directory, and upload the "mySQL.Data.dll" to it. This effectively provides the reference as well as the assembly.
I knew I was an idiot...
Last edited: