Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/aws-samples/legacy-cycle-store-mvc-app/llms.txt

Use this file to discover all available pages before exploring further.

With the RDS instance running and the CYCLE_STORE database populated, you are ready to point the application at your database and run it locally. The project is a standard ASP.NET MVC 4 application that targets .NET Framework 4.5 and uses Entity Framework 5 for data access — no additional runtime setup is needed beyond what Visual Studio provides out of the box.

Open the Solution

Open Visual Studio 2013 or later and choose File → Open → Project/Solution. Navigate to the project directory and select AdventureWorksMVC_2013.sln. Visual Studio loads the solution, restores NuGet packages (Entity Framework 5, ASP.NET MVC 4, Newtonsoft.Json 13, and the Web API packages), and displays the project in Solution Explorer. Confirm there are no load errors in the Output window before continuing.

Configure the Connection String

The application reads database connection details from the CYCLE_STOREEntities named connection string in Web.config. You need to replace the placeholder endpoint and credentials with your actual RDS values before the app can connect.
1

Open Web.config

In Solution Explorer, double-click Web.config at the root of the project to open it in the editor.
2

Locate the Connection String

Find the <connectionStrings> section and identify the entry named CYCLE_STOREEntities. The default file ships with placeholder values:
<connectionStrings>
  <add name="CYCLE_STOREEntities"
    connectionString="metadata=res://*/Business.CycleModel.csdl|res://*/Business.CycleModel.ssdl|res://*/Business.CycleModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=sqlrdsdb.xxxxx.us-east-1.rds.amazonaws.com;initial catalog=CYCLE_STORE;user id=xxxx;password=xxxx;MultipleActiveResultSets=True;App=EntityFramework&quot;"
    providerName="System.Data.EntityClient" />
</connectionStrings>
3

Replace the Data Source

Replace sqlrdsdb.xxxxx.us-east-1.rds.amazonaws.com with the SQLDatabaseEndpoint hostname from the CloudFormation stack output (without the port number — the default SQL Server port 1433 is used implicitly).
4

Replace the Credentials

Replace the placeholder user id=xxxx with user id=DBUser, and replace password=xxxx with the actual password retrieved from the CycleStoreCredentials Secrets Manager secret. The updated connection string should look like this:
<connectionStrings>
  <add name="CYCLE_STOREEntities"
    connectionString="metadata=res://*/Business.CycleModel.csdl|res://*/Business.CycleModel.ssdl|res://*/Business.CycleModel.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=sqlrdsdb.a1b2c3d4e5f6.us-east-1.rds.amazonaws.com;initial catalog=CYCLE_STORE;user id=DBUser;password=YourActualPassword;MultipleActiveResultSets=True;App=EntityFramework&quot;"
    providerName="System.Data.EntityClient" />
</connectionStrings>
Save Web.config after making these changes.

Run the Application

Press F5 (or click the green Start button in the toolbar) to build the project and launch it under IIS Express. Visual Studio compiles the solution, starts the local development server, and opens your default browser pointing to http://localhost:<port>/. The port number is assigned automatically by IIS Express and shown in the Visual Studio status bar.
The application is configured to use Forms Authentication (loginUrl="~/Home/Login" in Web.config), but the default route maps to ~/Home/default. The homepage loads without requiring a login, so you should see the Cycle Store landing page immediately on first launch.

What You Should See

When the app loads successfully you will be presented with the Unicorn Bike Rentals homepage. The page renders using the ContentLayout view and includes:
  • A header with the site logo — the Cycle Store branding displayed across the top of every page.
  • Product categories from the database — the categories stored in Production.ProductCategory are queried through Entity Framework and rendered as a navigation list. Clicking a category navigates to its product subcategory listing.
  • The default route — the entry point is the Home controller’s Default action (~/Home/default), which pulls category data and passes it to the layout view.
If the page loads and category names appear, the full stack — Visual Studio, IIS Express, Entity Framework, and the RDS SQL Server instance — is working correctly.

Troubleshooting

The application cannot reach the RDS instance on port 1433. Check the following:
  • Confirm that the SQLServerSecurityGroup inbound rule allows TCP port 1433 from your current public IP address. The default template opens 0.0.0.0/0, but if you tightened the rule, your IP may be blocked.
  • Verify the data source value in Web.config exactly matches the RDS endpoint hostname — no trailing slash, no port suffix.
  • Confirm the RDS instance status is Available in the AWS Console under RDS → Databases.
SQL Server rejected the credentials. Verify that:
  • The user id in the connection string is exactly DBUser (case-sensitive on some configurations).
  • The password matches the value currently stored in the CycleStoreCredentials Secrets Manager secret. If you changed the password after deployment, update both the RDS master password and the secret value.
  • You did not accidentally include leading or trailing whitespace when copying the password.
The CYCLE_STORE database does not exist on the RDS instance. This means the schema script has not been run yet, or it failed partway through. Connect to the instance with SSMS, check whether the CYCLE_STORE database appears under Databases, and run CYCLE_STORE_Schema_data.sql if it is missing. See the Database Setup page for full instructions.
If the project fails to compile, check the following:
  • Open Tools → Get Tools and Features and confirm the ASP.NET and web development workload is installed.
  • Ensure .NET Framework 4.5 developer targeting pack is installed. In Visual Studio, right-click the project in Solution Explorer, open Properties, and verify the Target framework is set to .NET Framework 4.5.
  • Right-click the solution in Solution Explorer and choose Restore NuGet Packages to re-download Entity Framework 5, ASP.NET MVC 4, and the other dependencies listed in packages.config.

Build docs developers (and LLMs) love