locked
Mysql, Roles and Membership, VSE2010, Godaddy, 501 Internal Server Error RRS feed

  • Question

  • User874645816 posted

    Unsure which forum to list this enquiry, hopefully here.  I have created a simple beginners guide to web applications, out of the box VSE2010 web application. It works fine on local host. However, after taking the next in my education, after having used the info. I have gleaned from this forum, on using MySQL for roles and membership, the application fails. Whilst developing the application I had to delete and update the MySQL.data and web assemblies to 6.4.4 in the solution explorer, and again in the Bin file. I then amended MySQL.web to 6.4.4, in the web config file,  but did not amend the public key token. Unsure whether the public key token has to be amended, and if it has to be amended, how do I get the correct key, as the command to get the key is not available with the VSExpress

    Via the Godaddy C Panel I then created a Database, but no tables, because I am under the impression that the roles and management will create the tables?! After the web application failed checked the MySQL database, not tables were created, as one would expect.

    Thanks in advance.

    site.master.cs file

    usingSystem;

    usingSystem.Collections.Generic;

    usingSystem.Linq;

    usingSystem.Web;

    usingSystem.Web.UI;

    usingSystem.Web.UI.WebControls;

    usingMySql.Data.MySqlClient;

    usingMySql.Web.Common;

    Please find listed below my code

    <

    configuration>

      <connectionStrings>

        <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;

             AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true

    " providerName="System.Data.SqlClient"/>

        <add name="MySQLConn" connectionString="server=GodaddyServer;User Id=XXXXX;password=xxxxxx;    

             Persist Security Info=True;database=MyDBName;SQL Server Mode=true;

    " providerName="MySql.Data.MySqlClient"/>

        <remove name="LocalMySqlServer"/>

        <add name="LocalMySqlServer" connectionString="Datasource=GoDaddyDBServer;Database=XXXX;uid=xxxxxxx;pwd=YYYYYY;" providerName="MySql.Data.MySqlClient"/>

      </connectionStrings>

      <membership defaultProvider="MySQLMembershipProvider">

        <providers>

          <clear/>

          <add connectionStringName="ApplicationServices" enablePasswordRetrieval="false"

             enablePasswordReset="true" requiresQuestionAndAnswer="false"

              requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6"

    minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"

    applicationName="/" name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider"/>

           

          <add autogenerateschema="true" connectionStringName="LocalMySqlServer"

              enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false"

              requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6"

    minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"           

    applicationName="/" name="MySQLMembershipProvider"

    type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.4.4, Culture=neutral, PublicKeyToken=c5687fc88969c44d"/>

    </providers>

     </membership>

      <profile>

        <providers>

          <clear/>

    <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>

    </providers>

     </profile>

    <roleManager enabled="true">

    <providers>

    <clear/>

    <add connectionStringName="ApplicationServices" applicationName="/"

    name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider"/>

    <add applicationName="/" name="AspNetWindowsTokenRoleProvider"

    type="System.Web.Security.WindowsTokenRoleProvider"/>

        </providers>

      </roleManager>

      <system.web>

        <compilation debug="true"/>

      </system.web>

    </configuration>

    Saturday, February 13, 2016 9:32 PM

Answers

  • User-718146471 posted
    Godaddy by default has the security level at medium level. Define the trust level in your web.config to full will fix this issue.

    <system.web>
    ...
    <trust level="Full" />
    ...
    </system.web>
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 17, 2016 2:00 PM

All replies

  • User-718146471 posted
    Godaddy by default has the security level at medium level. Define the trust level in your web.config to full will fix this issue.

    <system.web>
    ...
    <trust level="Full" />
    ...
    </system.web>
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 17, 2016 2:00 PM
  • User874645816 posted

    Thanks for the reply bbccompent1. As instructed I made the amendment as below

    </roleManager>

      <system.web>

        <roleManager defaultProvider="MySQLRoleProvider" />

        <membership defaultProvider="MySQLMembershipProvider" />

     <compilation debug="true"/>

          <trust level="Full"/>

    </system.web>

    </configuration>

    Unfortunatly the 500 internal server error is still displayed

    I have a couple of issues to bring to your attention, how do I know if the publickeytoken is correct, as I copied it from a forum post, or is this not that important?

    also when I use my Godaddy server ip address I get "page not found", but when I use the .com address I get the 500 error.(I acknowledge that this may a Godaddy question)

    Thanks again

    Thursday, February 18, 2016 9:52 PM
  • User874645816 posted

    Sorry the amended code is as this

        </providers>

      </roleManager>

      <system.web>

     <trust level="Full"/>

    </system.web>

    </configuration>

    Thursday, February 18, 2016 10:09 PM
  • User-718146471 posted

    I am thinking you may need to approach GoDaddy Tech Support, it is possible they may have to enable something on their side to support ASP.NET Membership. Setting the trust level to full should have done it. I have run into this before and was not very easy to resolve. I still think you may want to contact them, they may have to do something on the server side to get your membership thing to work with MySQL. Check it out and get back to me.

    Monday, February 22, 2016 4:28 PM
  • Tuesday, February 23, 2016 6:25 PM