Skip to main content

Common issues

Extended diagnostics for the most frequent Damsy ERP deployment and runtime problems. Start with the Troubleshooting overview table if you need a quick routing index.

Introduction

These issues recur across VPS go-lives because ASP.NET MVC publish, IIS identity, SQL seed data, and Release transforms interact. This page explains root cause, verification, and fix for each cluster.


Sign-in failed

Symptom

Login page shows failure after entering credentials, or POST returns without dashboard redirect.

Checks

  1. Company dropdown — select Damsy Technologies (CompID 1) for minimal seed.

  2. Password storage — DB holds encrypted value, not plaintext. Canonical hash for Admin@123:

    pnvwVaziAnZkG/KRvd7FLA==
  3. Login chainGetLoginUser requires joins:

    UserAccounts → CompanyUser → CompanyMaster
    UserAccounts → UserRole
    UserAccounts → BranchMaster
  4. Run 04b-fix-admin-login.sql on DB_DAMSYERP.

  5. Execute EXEC dbo.GetLoginUser parameters matching Login_DAL (encrypted password, CompID, login ID).

  6. IsActive flags on company, user, role.

Fix

  • Re-run Seed scripts.
  • Ensure MyConnectionString points to seeded database — not empty schema.
  • Recycle IIS app pool after connection string changes.
tip

If SSMS verify SELECT in 04-seed-minimal.sql returns a row but UI fails, compare encryption: app uses HashCryptography.Encrypt on POST before SP call.


Symptom

  • Browser redirect loop on every request
  • Login appears to work; next navigation returns to login
  • Session cookie never sticks

Checks

Inspect deployed Web.config:

<add key="ForceHttps" value="false"/>
<httpCookies httpOnlyCookies="true" requireSSL="false"/>

Global.asax.cs permanently redirects when ForceHttps == "true" and request is HTTP.

Fix

  1. Set ForceHttps=false and requireSSL=false for HTTP deployments.
  2. Recycle app pool.
  3. Clear browser cookies for the site.
  4. When SSL certificate is installed: bind HTTPS in IIS, then set both to trueRelease configuration.

Missing CSS after publish

Symptom

  • Dashboard and modules look unstyled or "legacy"
  • Browser network tab shows 404 for app-assets/css/*.css
  • Layout spacing and sidebar search broken

Checks

  1. On publish output (before IIS copy):

    app-assets/css/shell-modern.css
    app-assets/css/sidebar-unified.css
    app-assets/css/administration-dashboard.css
  2. On IIS physical path — same files must exist.

  3. In DamsyERP.UI.csproj — each CSS file needs:

    <Content Include="app-assets\css\shell-modern.css" />
  4. Layout references may include ?v= cache buster — hard-refresh Ctrl+F5.

Fix

  1. Include missing files in project → Rebuild.
  2. Publish Release with MVC_PUBLISH.
  3. Verify publish folder → full copy to inetpub\wwwroot\damsy_erp.
  4. Recycle app pool.

Crystal Reports runtime

Symptom

  • Report viewer page throws exception on load
  • Error mentions CrystalDecisions or missing assembly 13.0.2000.0
  • Works on dev machine with CR installed; fails on clean VPS

Checks

  1. Crystal Reports runtime installed on server (version aligned with project references — typically SAP Crystal Reports runtime for .NET Framework matching 13.x).

  2. Publish includes:

    crystalreportviewers13/
    Areas/*/.../*.rpt
    Areas/*/.../*Report*.aspx
  3. Application pool 32-bit setting — some CR deployments require Enable 32-Bit Applications = True (environment-specific; test if 64-bit pool fails).

Fix

  • Install matching CR runtime on VPS.
  • Republish ensuring .rpt and viewer folders copied.
  • Recycle pool; test one known report (e.g. Payroll statutory viewer).

See Crystal Reports architecture.


Module tile missing

Symptom

Home dashboard loads but expected module card (Payroll, Bills, Stock, etc.) is absent.

Checks

  1. Session dtVerifyUser module booleans — set from GetLoginUser result.
  2. Database UserAccounts columns: Payroll, Billing, ZStock, Webenroll, ZSales, EmpSelfServices, ControlPanel, etc. must be 1 for admin seed.
  3. DashboardController copies flags to ViewData — user must complete login redirect to /Dashboard/Index.

Fix

  • Run 04b-fix-admin-login.sql to reset module flags on admin.
  • For other users, update flags via Administration or direct SQL on UserAccounts (prefer UI when available).
FlagDashboard module
PayrollPayroll
BillingBills
ZStockStock
WebenrollRegistration
ZSalesSales
EmpSelfServicesESS
ControlPanelAdministration

Partial view not found

Symptom

The partial view '_UnitPermissionS' was not found

Or similar for Registration, Payroll, or shared partials.

Checks

  1. File exists in source: e.g. Areas/Registration/Views/Shared/_UnitPermissionS.cshtml
  2. File exists on IIS after publish.
  3. Listed as <Content Include=...> in DamsyERP.UI.csproj.

Fix

Same workflow as missing CSS: include in project → publish → verify output → IIS copy → recycle.

Known historical gaps (now fixed in repo but verify on old publishes):

  • _UnitPermissionS, _RegDashHero
  • Module dashboard CSS under app-assets/css/

Works locally, fails on VPS

Symptom

Full functionality on IIS Express / local IIS; failures only on remote Windows server.

Checks

AreaLocal vs VPS
Connection stringLocal DB name vs DB_DAMSYERP on VPS
SQL authIntegrated Security → IIS APPPOOL\PoolName must exist in SQL
Publish completenessLocal may run from project dir with all files; VPS only has copied publish
Release transformsLocal Debug may use different ForceHttps / customErrors
Crystal runtimeInstalled locally, missing on VPS
FirewallSQL port blocked from VPS to SQL host

Fix checklist

  1. Compare Web.config MyConnectionString on VPS.
  2. Grant SQL rights to app pool identity — IIS deploy.
  3. Run publish folder file audit — Publish verify.
  4. Apply blank DB + seed if VPS database empty.
  5. Install CR runtime; recycle pool.
# Quick DLL timestamp check on VPS
Get-Item C:\inetpub\wwwroot\damsy_erp\bin\DamsyERP.UI.dll | Select LastWriteTime

Empty menus after minimal seed

Symptom

Login and dashboard succeed; sidebar menu sparse; drilling into Admin pages errors.

Cause

Minimal seed does not populate MenuMaster / UserPermissions.

Fix

Copy menu and permission tables from a working development database, or use your organization's full migration scripts. This is expected until Phase 4b data import.


Important notes

  • Prefer RemoteOnly custom errors on VPS — RDP to server to see detailed ASP.NET errors during initial setup.
  • ManageError in each Area handles local report redirects — distinguish root vs Area error controllers.
  • Keep a checklist document per environment: pool name, SQL login, publish date, schema export source DB.

Common mistakes

MistakeOutcome
Fixing only Web.config in source, not on IISServer unchanged
Testing with wrong companyFalse "login broken"
Partial file copy to inetpubRandom 404s and view errors
Assuming seed = full ERPMenu errors mistaken for deploy failure

Next steps