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
-
Company dropdown — select Damsy Technologies (CompID 1) for minimal seed.
-
Password storage — DB holds encrypted value, not plaintext. Canonical hash for
Admin@123:pnvwVaziAnZkG/KRvd7FLA== -
Login chain —
GetLoginUserrequires joins:UserAccounts → CompanyUser → CompanyMasterUserAccounts → UserRoleUserAccounts → BranchMaster -
Run
04b-fix-admin-login.sqlonDB_DAMSYERP. -
Execute
EXEC dbo.GetLoginUserparameters matchingLogin_DAL(encrypted password, CompID, login ID). -
IsActiveflags on company, user, role.
Fix
- Re-run Seed scripts.
- Ensure
MyConnectionStringpoints to seeded database — not empty schema. - Recycle IIS app pool after connection string changes.
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.
ForceHttps and cookie SSL loop
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
- Set
ForceHttps=falseandrequireSSL=falsefor HTTP deployments. - Recycle app pool.
- Clear browser cookies for the site.
- When SSL certificate is installed: bind HTTPS in IIS, then set both to
true— Release 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
-
On publish output (before IIS copy):
app-assets/css/shell-modern.cssapp-assets/css/sidebar-unified.cssapp-assets/css/administration-dashboard.css -
On IIS physical path — same files must exist.
-
In
DamsyERP.UI.csproj— each CSS file needs:<Content Include="app-assets\css\shell-modern.css" /> -
Layout references may include
?v=cache buster — hard-refresh Ctrl+F5.
Fix
- Include missing files in project → Rebuild.
- Publish Release with
MVC_PUBLISH. - Verify publish folder → full copy to
inetpub\wwwroot\damsy_erp. - Recycle app pool.
Crystal Reports runtime
Symptom
- Report viewer page throws exception on load
- Error mentions
CrystalDecisionsor missing assembly 13.0.2000.0 - Works on dev machine with CR installed; fails on clean VPS
Checks
-
Crystal Reports runtime installed on server (version aligned with project references — typically SAP Crystal Reports runtime for .NET Framework matching 13.x).
-
Publish includes:
crystalreportviewers13/Areas/*/.../*.rptAreas/*/.../*Report*.aspx -
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
.rptand 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
- Session
dtVerifyUsermodule booleans — set fromGetLoginUserresult. - Database
UserAccountscolumns:Payroll,Billing,ZStock,Webenroll,ZSales,EmpSelfServices,ControlPanel, etc. must be 1 for admin seed. DashboardControllercopies flags toViewData— user must complete login redirect to/Dashboard/Index.
Fix
- Run
04b-fix-admin-login.sqlto reset module flags onadmin. - For other users, update flags via Administration or direct SQL on
UserAccounts(prefer UI when available).
| Flag | Dashboard module |
|---|---|
Payroll | Payroll |
Billing | Bills |
ZStock | Stock |
Webenroll | Registration |
ZSales | Sales |
EmpSelfServices | ESS |
ControlPanel | Administration |
Partial view not found
Symptom
The partial view '_UnitPermissionS' was not found
Or similar for Registration, Payroll, or shared partials.
Checks
- File exists in source: e.g.
Areas/Registration/Views/Shared/_UnitPermissionS.cshtml - File exists on IIS after publish.
- Listed as
<Content Include=...>inDamsyERP.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
| Area | Local vs VPS |
|---|---|
| Connection string | Local DB name vs DB_DAMSYERP on VPS |
| SQL auth | Integrated Security → IIS APPPOOL\PoolName must exist in SQL |
| Publish completeness | Local may run from project dir with all files; VPS only has copied publish |
| Release transforms | Local Debug may use different ForceHttps / customErrors |
| Crystal runtime | Installed locally, missing on VPS |
| Firewall | SQL port blocked from VPS to SQL host |
Fix checklist
- Compare
Web.configMyConnectionStringon VPS. - Grant SQL rights to app pool identity — IIS deploy.
- Run publish folder file audit — Publish verify.
- Apply blank DB + seed if VPS database empty.
- 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.
Related pages
Important notes
- Prefer
RemoteOnlycustom errors on VPS — RDP to server to see detailed ASP.NET errors during initial setup. ManageErrorin 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
| Mistake | Outcome |
|---|---|
Fixing only Web.config in source, not on IIS | Server unchanged |
| Testing with wrong company | False "login broken" |
| Partial file copy to inetpub | Random 404s and view errors |
| Assuming seed = full ERP | Menu errors mistaken for deploy failure |
Next steps
- Revisit Deployment guides for clean redeploy.
- Read FAQ for onboarding answers.
- After stabilization, enable HTTPS per Release configuration.