locked
an error message about a library I don't even have RRS feed

  • Question

  • User-1112034352 posted

    I have compiled a asp.net project that does use security features like membership and roles.  But when I run it on my local PC, I get an error about libraries that I don't even have.  For instance:

    <add name="MySQLRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />

    I did a search through my entire project, including the web.config to find this line.  Its NOWHERE in my project.

    I have installed the MySql library on my PC for a totally different website.  But this website just doesn't have it anywhere.  And yet I get error messages about it.  Whats going on?

    -- Here is the entire error page.  at one point it mentions a "machine.config":

    Configuration Error
    
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
    
    Parser Error Message: Could not load file or assembly 'MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified.
    
    Source Error: 
    
    
    Line 262:        <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    Line 263:        <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    Line 264:        <add name="MySQLRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />
    Line 265:      </providers>
    Line 266:    </roleManager>
    
    Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config    Line: 264 
    
    Assembly Load Trace: The following information can be helpful to determine why the assembly 'MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' could not be loaded.
    
    
    === Pre-bind state information ===
    LOG: User = N7110\Gideon
    LOG: DisplayName = MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
     (Fully-specified)
    LOG: Appbase = file:///C:/rate-for-success-recreate/
    LOG: Initial PrivatePath = C:\rate-for-success-recreate\bin
    Calling assembly : (Unknown).
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:\rate-for-success-recreate\web.config
    LOG: Using host configuration file: C:\Users\Gideon\Documents\IISExpress\config\aspnet.config
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
    LOG: Post-policy reference: MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d
    LOG: Attempting download of new URL file:///C:/Users/Gideon/AppData/Local/Temp/Temporary ASP.NET Files/root/597fa6f4/9f7416e2/MySql.Web.DLL.
    LOG: Attempting download of new URL file:///C:/Users/Gideon/AppData/Local/Temp/Temporary ASP.NET Files/root/597fa6f4/9f7416e2/MySql.Web/MySql.Web.DLL.
    LOG: Attempting download of new URL file:///C:/rate-for-success-recreate/bin/MySql.Web.DLL.
    LOG: Attempting download of new URL file:///C:/rate-for-success-recreate/bin/MySql.Web/MySql.Web.DLL.
    LOG: Attempting download of new URL file:///C:/Users/Gideon/AppData/Local/Temp/Temporary ASP.NET Files/root/597fa6f4/9f7416e2/MySql.Web.EXE.
    LOG: Attempting download of new URL file:///C:/Users/Gideon/AppData/Local/Temp/Temporary ASP.NET Files/root/597fa6f4/9f7416e2/MySql.Web/MySql.Web.EXE.
    LOG: Attempting download of new URL file:///C:/rate-for-success-recreate/bin/MySql.Web.EXE.
    LOG: Attempting download of new URL file:///C:/rate-for-success-recreate/bin/MySql.Web/MySql.Web.EXE.
    
    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18044



    Friday, August 9, 2013 5:31 PM

Answers

  • User465171450 posted

    Notice that it is in your machine.config. Remove that line from the machine.config. The machine.config file is the basic config for all websites running on the computer. Even if it isn't in your web.config it inherits from the machine.config. Remove it there and all should be fine.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 9, 2013 5:53 PM
  • User804030440 posted

    go to machine.Config  x:\Windows\Microsoft.NET\Framework\[version]\config\machine.config for 32 Bit 

    x:\Windows\Microsoft.NET\Framework64\[version]\config\machine.config for 64 Bit

    then remove or comment 

    <add name="MySQLRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />

    Then clean the solution and then build!!!!!!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 9, 2013 6:03 PM
  • User71929859 posted

    Hello,

    I found machine.config, and it does have the offending-lines, but I can't remove them - the file is "read-only".

    You have to run the notepad as Administrator for that. Right click on the notepade and choose "Run as Administrator". Then from the File menu, go to the machine.config file and open it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 10, 2013 12:20 PM

All replies

  • User465171450 posted

    Notice that it is in your machine.config. Remove that line from the machine.config. The machine.config file is the basic config for all websites running on the computer. Even if it isn't in your web.config it inherits from the machine.config. Remove it there and all should be fine.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 9, 2013 5:53 PM
  • User804030440 posted

    go to machine.Config  x:\Windows\Microsoft.NET\Framework\[version]\config\machine.config for 32 Bit 

    x:\Windows\Microsoft.NET\Framework64\[version]\config\machine.config for 64 Bit

    then remove or comment 

    <add name="MySQLRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />

    Then clean the solution and then build!!!!!!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, August 9, 2013 6:03 PM
  • User-1112034352 posted

    I found machine.config, and it does have the offending-lines, but I can't remove them - the file is "read-only".

    Maybe a work-around is to just add assemblies that I don't need to my website, until it compiles.

    -- Gideon

    Saturday, August 10, 2013 8:45 AM
  • User71929859 posted

    Hello,

    I found machine.config, and it does have the offending-lines, but I can't remove them - the file is "read-only".

    You have to run the notepad as Administrator for that. Right click on the notepade and choose "Run as Administrator". Then from the File menu, go to the machine.config file and open it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, August 10, 2013 12:20 PM