Skip to main content

Overview

This guide will walk you through installing and configuring Sistema de Seguimiento de Solicitudes on your local machine or server. The installation process involves setting up the database, configuring the API, and running the frontend application.
Estimated Time: 20-30 minutesDifficulty: Intermediate - Requires familiarity with .NET development and SQL Server

Prerequisites

Before you begin, ensure your system meets the following requirements:

Required Software

1

.NET 9.0 SDK

Download and install the .NET 9.0 SDK from Microsoft’s official website.Verify installation:
dotnet --version
# Should output: 9.0.x or higher
2

SQL Server

Install one of the following:
  • SQL Server 2019 or later (Express, Developer, or Enterprise)
  • SQL Server LocalDB
  • Azure SQL Database
Download from: Microsoft SQL Server
3

SQL Server Management Studio (SSMS)

Recommended for database management and import operations.Download from: SQL Server Management Studio
4

Visual Studio 2022 (Recommended)

Visual Studio 2022 or later with the following workloads:
  • ASP.NET and web development
  • .NET desktop development
Alternative: Visual Studio Code with C# extension
Keep Visual Studio updated to avoid framework compatibility issues.
5

Node.js (Optional)

Required only for accessibility auditing features.Version: 18.x or laterDownload from: Node.js

System Requirements

ComponentMinimumRecommended
OSWindows 10, Windows Server 2016, Linux (Ubuntu 20.04+)Windows 11, Windows Server 2022
RAM4 GB8 GB+
Disk Space2 GB5 GB+
CPU2 cores4+ cores

Step 1: Clone the Repository

First, clone or download the source code:
git clone <repository-url>
cd "Sistema de Seguimiento de Solicitudes"

Step 2: Database Setup

The application uses SQL Server as its database. Follow these steps to set it up:
1

Import the Database

The project includes a .bacpac file for easy database import.Using SQL Server Management Studio:
  1. Open SQL Server Management Studio (SSMS)
  2. Connect to your SQL Server instance
  3. Right-click on Databases in Object Explorer
  4. Select Import Data-tier Application…
  5. Click Next, then Browse
  6. Navigate to the project folder and select SistemaSolicitudes.bacpac
  7. Click Next and ensure the database name is exactly: SistemaSolicitudes
  8. Click Next and then Finish to complete the import
The database name must be exactly SistemaSolicitudes to match the connection string, or you’ll need to update the connection string accordingly.
2

Verify Database Schema

After import, verify the following tables exist:
-- Run in SSMS to verify tables
SELECT TABLE_NAME 
FROM INFORMATION_SCHEMA.TABLES 
WHERE TABLE_TYPE = 'BASE TABLE'
ORDER BY TABLE_NAME;
Expected tables:
  • Calendario
  • DiaInhabilManual
  • Expedientes
  • MT_EXPEDIENTE_ARCHIVOS
  • MT_RECURSO_REVISION
  • Usuarios
3

Configure Database Server

Note your SQL Server instance name. Common formats:
  • (local) - Local default instance
  • (localdb)\MSSQLLocalDB - LocalDB instance
  • .\SQLEXPRESS - SQL Server Express
  • SERVER_NAME\INSTANCE_NAME - Named instance
  • server.domain.com - Remote server
Test connectivity:
-- In SSMS, run:
SELECT @@SERVERNAME AS ServerName, 
       @@VERSION AS VersionInfo;

Step 3: Configure the API

Now configure the backend API to connect to your database:
1

Navigate to API Project

cd SolicitudesAPI
2

Update Connection String

Open appsettings.json and update the connection string:
appsettings.json
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=(local); DataBase=SistemaSolicitudes; Trusted_Connection=True; TrustServerCertificate=True;"
  }
}
Replace (local) with your SQL Server instance name.
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=(local); DataBase=SistemaSolicitudes; Trusted_Connection=True; TrustServerCertificate=True;"
  }
}
For production environments:
  • Never commit credentials to source control
  • Use environment variables or Azure Key Vault
  • Set TrustServerCertificate=False and configure proper SSL certificates
3

Configure JWT Settings

Update the JWT configuration in appsettings.json:
appsettings.json
{
  "Jwt": {
    "SecretKey": "B+UjX3CzV1xL5mPjYsQ0N6W7fZ9hRg2T",
    "Issuer": "Issuer",
    "Audience": "Audience"
  }
}
CRITICAL FOR PRODUCTION:
  • Generate a new, cryptographically secure secret key (minimum 32 characters)
  • Update Issuer to your domain name
  • Update Audience to your application identifier
  • Store the secret key in a secure location (Azure Key Vault, environment variables)
Generate a secure key:
# PowerShell
-join ((65..90) + (97..122) + (48..57) + (33..47) | Get-Random -Count 32 | ForEach-Object {[char]$_})

# Linux/Mac
openssl rand -base64 32
4

Review Launch Settings

Check Properties/launchSettings.json for API URLs:
Properties/launchSettings.json
{
  "profiles": {
    "https": {
      "commandName": "Project",
      "launchBrowser": false,
      "launchUrl": "scalar/v1",
      "applicationUrl": "https://localhost:7123;http://localhost:5273",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}
The API will run on:
  • HTTPS: https://localhost:7123
  • HTTP: http://localhost:5273
You can change launchBrowser to true to automatically open the Scalar API documentation when starting the API.
5

Restore NuGet Packages

dotnet restore
This installs all required dependencies:
  • Entity Framework Core 9.0.4
  • JWT Bearer Authentication
  • QuestPDF for PDF generation
  • Scalar for API documentation
6

Test API Connection

Verify the API can connect to the database:
dotnet build
If successful, you should see:
Build succeeded.
    0 Warning(s)
    0 Error(s)

Step 4: Configure the Frontend

Configure the Blazor WebAssembly frontend application:
1

Navigate to Frontend Project

cd "../Sistema de Seguimiento de Solicitudes"
2

Update API Base URL

Open Program.cs and verify the HttpClient configuration:
Program.cs
// Line 18
builder.Services.AddScoped(sp => new HttpClient 
{ 
    BaseAddress = new Uri("https://localhost:7123/") 
});
This URL must match your API’s HTTPS URL from the previous step.
If you changed the API port in launchSettings.json, update this URL accordingly.
3

Review Launch Settings

Check Properties/launchSettings.json for frontend URLs:
Properties/launchSettings.json
{
  "profiles": {
    "https": {
      "commandName": "Project",
      "launchBrowser": false,
      "applicationUrl": "https://localhost:7125;http://localhost:5216",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}
The frontend will run on:
  • HTTPS: https://localhost:7125
  • HTTP: http://localhost:5216
4

Restore NuGet Packages

dotnet restore
This installs all frontend dependencies:
  • Blazor WebAssembly 9.0.4
  • MudBlazor UI components
  • Radzen Blazor components
  • SweetAlert2 for notifications
5

Build Frontend

dotnet build
Verify successful build before proceeding.

Step 5: Run the Application

Now you’re ready to run both components:
1

Start the API (Backend)

In the SolicitudesAPI folder:
cd SolicitudesAPI
dotnet run --launch-profile https
You should see output similar to:
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: https://localhost:7123
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://localhost:5273
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
Leave this terminal window open. The API must be running for the frontend to work.
2

Start the Frontend (New Terminal)

Open a new terminal window and navigate to the frontend folder:
cd "Sistema de Seguimiento de Solicitudes"
dotnet run --launch-profile https
You should see:
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: https://localhost:7125
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
3

Access the Application

Open your browser and navigate to:
https://localhost:7125
You should see the login page.
If you see a certificate warning, this is normal for local development. Click “Advanced” and “Proceed” to continue.
4

Access API Documentation (Optional)

The API includes Scalar documentation. Access it at:
https://localhost:7123/scalar/v1
This provides interactive API documentation for all endpoints.

Step 6: Initial Configuration

1

Create Initial User

Since the database is fresh, create an admin user using the API:
curl -X POST https://localhost:7123/api/Auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "nombreUsuario": "admin",
    "password": "YourSecurePassword123!",
    "rol": "Administrador"
  }'
2

Configure Calendar (Optional)

Set up working days and holidays for accurate deadline calculations.
-- Add manual non-working days
INSERT INTO DiaInhabilManual (Fecha, Descripcion)
VALUES 
  ('2026-01-01', 'Año Nuevo'),
  ('2026-12-25', 'Navidad');
3

Test the Installation

  1. Login with your admin credentials
  2. Navigate through the main modules
  3. Create a test request
  4. Verify calendar is working
  5. Check API documentation at /scalar/v1

Running with Visual Studio

If you prefer using Visual Studio:
1

Open Solution

Double-click Sistema de Seguimiento de Solicitudes.sln to open in Visual Studio.
2

Set Multiple Startup Projects

  1. Right-click on the solution in Solution Explorer
  2. Select Properties
  3. Go to Startup Project
  4. Select Multiple startup projects
  5. Set both SolicitudesAPI and Sistema de Seguimiento de Solicitudes to Start
  6. Click OK
3

Run the Solution

Press F5 or click the Start button. Visual Studio will launch both the API and frontend simultaneously.

Production Deployment

For production environments, additional steps are required:
Before deploying to production:
  1. Update JWT Secret Key: Generate a strong, unique secret key
  2. Configure CORS: Restrict allowed origins to your domain
  3. Enable HTTPS: Configure proper SSL certificates
  4. Secure Connection Strings: Use Azure Key Vault or environment variables
  5. Update Database: Use a production SQL Server instance
  6. Configure Logging: Set up application insights or logging service
  7. Review Security: Audit authentication and authorization settings

Environment-Specific Configuration

{
  "Logging": {
    "LogLevel": {
      "Default": "Warning",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "ConnectionStrings": {
    "DefaultConnection": "Server=prod-server; DataBase=SistemaSolicitudes; User Id=prod_user; Password=***; Encrypt=True;"
  },
  "Jwt": {
    "SecretKey": "USE_ENVIRONMENT_VARIABLE",
    "Issuer": "https://yourdomain.com",
    "Audience": "https://yourdomain.com"
  }
}

Publishing the Application

cd SolicitudesAPI
dotnet publish -c Release -o ./publish

Troubleshooting

Error: Cannot open database "SistemaSolicitudes" requested by the loginSolutions:
  1. Verify database name is exactly SistemaSolicitudes
  2. Check SQL Server instance name in connection string
  3. Ensure SQL Server is running: services.msc → SQL Server service
  4. Test connection in SSMS with the same credentials
  5. Verify firewall allows SQL Server connections (port 1433)
Error: IDX10503: Signature validation failedSolutions:
  1. Ensure Jwt:SecretKey is identical in both projects
  2. Verify Issuer and Audience match exactly
  3. Clear browser localStorage and re-login
  4. Check token hasn’t expired (2 hour default)
Error: Access to fetch at '...' from origin '...' has been blocked by CORS policySolutions:
  1. Verify CORS is enabled in Program.cs:62
  2. Check frontend URL matches CORS policy
  3. Ensure API is running before starting frontend
  4. Verify UseCors("PermitirBlazor") is called before UseRouting()
Error: QuestPDF license exceptionSolutions:
  1. Verify QuestPDF.Settings.License = LicenseType.Community; in Program.cs:12
  2. For commercial use, obtain proper license from QuestPDF
  3. Ensure line is before any PDF generation code
Error: Unable to bind to https://localhost:7123 on the IPv4 loopback interface: 'Address already in use'Solutions:
  1. Check if another instance is running
  2. Find and kill the process using the port:
    # Windows
    netstat -ano | findstr :7123
    taskkill /PID <process_id> /F
    
    # Linux/Mac
    lsof -i :7123
    kill -9 <process_id>
    
  3. Change the port in launchSettings.json
Error: TypeError: Failed to fetch or Network errorSolutions:
  1. Verify API is running on https://localhost:7123
  2. Check Program.cs BaseAddress matches API URL
  3. Accept the SSL certificate warning in browser
  4. Check browser console for detailed errors
  5. Verify firewall allows connections to localhost

Next Steps

Now that you have the application installed and running:

Quickstart Guide

Learn how to create your first transparency request

API Reference

Explore all available API endpoints

User Management

Set up roles and permissions

Security Guide

Secure your production deployment

Getting Help

If you encounter issues not covered in this guide:
  1. Check the Troubleshooting section above
  2. Review the application logs in the terminal output
  3. Inspect browser console for frontend errors (F12)
  4. Verify all prerequisites are correctly installed
  5. Ensure database is properly imported and accessible
For development, it’s helpful to set "launchBrowser": true in both launchSettings.json files to automatically open the applications when starting.

Build docs developers (and LLMs) love