Security level -- cannot open /Accounts/Manage.aspx

Discussion in 'General troubleshooting' started by wcswanson, Sep 22, 2016.

  1. The website runs on local machine with the same web.config file as on WinHost. When I try to open the Manage.asxp page from the WinHost, the error is received:
    Exception Details: System.ComponentModel.Win32Exception: The system cannot find the file specified

    Source Error:

    Line 29: If Not IsPostBack Then
    Line 30: ' Determine the sections to render
    Line 31: Dim hasLocalPassword = OpenAuth.HasLocalPassword(User.Identity.Name)
    Line 32: setPassword.Visible = Not hasLocalPassword
    Line 33: changePassword.Visible = hasLocalPassword

    Source File: E:\web\wcswanso\DEIG1\Account\Manage.aspx.vb Line: 31

    [SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.)]
    System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling) +970

    The connection strings on my local machine is the same as the WinHost. I am using the WinHost SQL Server engine from both locations.

    I have changed the trust level to full in the web.config file and on the iis server.

    <trustLevel name="Full" policyFile="internal" />




    On WinHost iis I am getting an error while performing this operation when trying to change the .NET Trust Levels.

    What can be done for the Manage.aspx file to display from the Accounts file (Using Website Template in VS2012)?
  2. Elshadriel

    Elshadriel Winhost Staff

  3. Elshadriel,

    Thanks for letting me know that I am not missing something.

  4. Elshadriel

    Elshadriel Winhost Staff

    Yeah, this error:

    is a pretty misleading error, but fortunately, I've seen it enough to know what needs to be fixed.
  5. The ACL has been reset but I am still getting the same error. :(
  6. I have tried a few more combinations of connection strings and I am still getting an error when trying to open the Accounts\Manage.aspx page. These connection strings work from my computer but not WinHost.

    Line 31:             Dim hasLocalPassword = OpenAuth.HasLocalPassword(User.Identity.Name)
    [SqlException (0x80131904): CREATE DATABASE permission denied in database 'master'.]
    This works from my machine but not on WinHost:
        <remove name="LocalSqlServer" />
        <add name="LocalSqlServer" connectionString="Data;Integrated Security=false; Initial Catalog=DB_85207_aspnetdb;User ID=DB_85207_aspnetdb_user;     Password=****"   providerName="System.Data.SqlClient" />
        <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data;Initial Catalog=DB_85207_aspnetdb;User ID=DB_85207_deig_user;Password=*****"f"/>
        <add name="cnDEIG" connectionString="Data;Initial Catalog=DB_85207_deig;User ID=DB_85207_deig_user;Password=*****" providerName="System.Data.SqlClient"/>
  7. It now works! The default connection string had the wrong user id 'User ID=DB_85207_deig_user' should be '
    User ID=DB_85207_aspnetdb_user. The change to the connection string consist of removing the attachment of the attached data files and replacing it with the connection string to the aspnetdb.

    Many thanks for your help!
    Michael and Elshadriel like this.
  8. Thanks for posting a follow-up, it will likely help someone else in the future.

Share This Page