locked
Webmatrix SQL Express Database Connection String RRS feed

  • Question

  • User-1580299748 posted

    I mistakenly changed the database password of my SQLExpress database in WebMatrix.

    I know what the new password is, but I do not understand how to update the connection string in my web.config file.

    Here is my web.config file:

    <?xml version="1.0" encoding="utf-8"?>
     
    <configuration>
      <system.webServer>
      </system.webServer>
      <system.web>
        <compilation debug="true" targetFramework="4.0" />
        <customErrors mode="Off" />
      </system.web>
      <system.data>
        <DbProviderFactories>
          <remove invariant="System.Data.SqlServerCe.4.0" />
                <add invariant="System.Data.SqlServerCe.4.0" name="Microsoft® SQL Server® Compact 4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
        </DbProviderFactories>
      </system.data>
        <connectionStrings>
            <add connectionString="server=.\SQLEXPRESS;uid=RPU;pwd=&quot;Z!)=bF;61)ty&quot;;Database=RP" name="RP" providerName="System.Data.SqlClient" />
        </connectionStrings>
        <appSettings>
            <add key="enableSimpleMembership" value="true" />
        </appSettings>
    </configuration>

    I assume that the password is encrypted here:
    pwd=&quot;Z!)=bF;61)ty&quot;;

    I do not understand how to update this section of the web.config file to the new password, encrypted or not.

    Any help appreciated.

    THANKS!
    Sunday, February 7, 2016 7:30 PM

Answers

  • User-821857111 posted
    <add name="RP" connectionString="server=.\SQLEXPRESS;Database=RP;user id=RPU;password=yourpassword" providerName="System.Data.SqlClient" />
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, February 7, 2016 9:28 PM

All replies

  • User-821857111 posted
    <add name="RP" connectionString="server=.\SQLEXPRESS;Database=RP;user id=RPU;password=yourpassword" providerName="System.Data.SqlClient" />
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, February 7, 2016 9:28 PM
  • User-1580299748 posted

    Thanks!!!!!!!!!!!!

    Sunday, February 7, 2016 10:07 PM