Document IIS deployment handoff
This commit is contained in:
@@ -2,6 +2,41 @@
|
|||||||
|
|
||||||
Stand: 2026-05-19
|
Stand: 2026-05-19
|
||||||
|
|
||||||
|
## Nachtrag 2026-05-19 IIS Deployment / 500 Fehler
|
||||||
|
|
||||||
|
Vollstaendige Doku:
|
||||||
|
|
||||||
|
```text
|
||||||
|
docs/DEPLOYMENT_IIS_HANDOFF_2026-05-19.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Aktueller Stand:
|
||||||
|
|
||||||
|
- Publish erfolgt direkt aus `TrafagSalesExporter`.
|
||||||
|
- Publish-Ausgabe ist an das alte `BiDashboard` angepasst:
|
||||||
|
- `BiDashboard.dll`
|
||||||
|
- keine EXE
|
||||||
|
- `web.config` startet `.\BiDashboard.dll`
|
||||||
|
- Diagnose aktiv mit `stdoutLogEnabled=true`
|
||||||
|
- URL mit App-Pfad liefert laut Browser `500`:
|
||||||
|
|
||||||
|
```text
|
||||||
|
https://trch-webapp-bidashboard.trafagch.local/BiDashboard/
|
||||||
|
```
|
||||||
|
|
||||||
|
Wahrscheinlichstes offenes Thema:
|
||||||
|
|
||||||
|
- App-Pool/IIS hat auf dem Publish-Ordner nur Lesen/Ausfuehren.
|
||||||
|
- Die App schreibt beim Start in SQLite (`trafag_exporter.db`, `db-shm`, `db-wal`) und in `logs`.
|
||||||
|
- `icacls`-Versuch von lokal wurde vom Server mit `Zugriff verweigert` abgelehnt.
|
||||||
|
|
||||||
|
Naechster Schritt fuer Server-Spezialist:
|
||||||
|
|
||||||
|
- App-Pool-Identity ermitteln.
|
||||||
|
- `Modify` auf Publish-Ordner, `logs` und `trafag_exporter.db*` setzen.
|
||||||
|
- App-Pool neu starten.
|
||||||
|
- Danach URL neu testen und bei weiterem `500` stdout-Log/Event Viewer lesen.
|
||||||
|
|
||||||
## Nachtrag 2026-05-19 Finance-Cockpit-Login finalisieren
|
## Nachtrag 2026-05-19 Finance-Cockpit-Login finalisieren
|
||||||
|
|
||||||
Aktueller Stand:
|
Aktueller Stand:
|
||||||
|
|||||||
@@ -0,0 +1,215 @@
|
|||||||
|
# Deployment / IIS Handoff 2026-05-19
|
||||||
|
|
||||||
|
## Ziel
|
||||||
|
|
||||||
|
`TrafagSalesExporter` bleibt das fuehrende Projekt, wird aber fuer den Server als ASP.NET/IIS-Webanwendung im bisherigen `BiDashboard`-Schema veroeffentlicht.
|
||||||
|
|
||||||
|
Das separate lokale Projekt `..\BiDashboard` wird fuer die aktuelle Weiterarbeit nicht benoetigt. Die relevanten Publish-/Hosting-Einstellungen wurden in `TrafagSalesExporter` uebernommen.
|
||||||
|
|
||||||
|
## Server / URL / Publish-Pfad
|
||||||
|
|
||||||
|
Server / DNS:
|
||||||
|
|
||||||
|
```text
|
||||||
|
trch-webapp-bidashboard.trafagch.local
|
||||||
|
tragvapp401.trafagch.local
|
||||||
|
10.120.1.17
|
||||||
|
```
|
||||||
|
|
||||||
|
Publish-Share:
|
||||||
|
|
||||||
|
```text
|
||||||
|
\\trch-webapp-bidashboard.trafagch.local\BiDashboard$\
|
||||||
|
```
|
||||||
|
|
||||||
|
Wahrscheinliche Browser-URL:
|
||||||
|
|
||||||
|
```text
|
||||||
|
https://trch-webapp-bidashboard.trafagch.local/BiDashboard/
|
||||||
|
```
|
||||||
|
|
||||||
|
Hinweis: Ohne `/BiDashboard` bzw. ueber HTTP kam lokal weiterhin `404 Microsoft-HTTPAPI/2.0`. Mit `https://.../BiDashboard` meldete der Browser laut Test `500`, was bedeutet, dass IIS die Application erreicht.
|
||||||
|
|
||||||
|
## Aktueller Publish-Stand
|
||||||
|
|
||||||
|
Das Projekt `TrafagSalesExporter.csproj` erzeugt jetzt eine `BiDashboard`-Publish-Ausgabe:
|
||||||
|
|
||||||
|
```text
|
||||||
|
BiDashboard.dll
|
||||||
|
BiDashboard.deps.json
|
||||||
|
BiDashboard.runtimeconfig.json
|
||||||
|
BiDashboard.staticwebassets.endpoints.json
|
||||||
|
web.config
|
||||||
|
wwwroot
|
||||||
|
runtimes
|
||||||
|
trafag_exporter.db
|
||||||
|
Microsoft.AspNetCore.Authentication.Negotiate.dll
|
||||||
|
```
|
||||||
|
|
||||||
|
Bewusst:
|
||||||
|
|
||||||
|
- keine EXE / kein AppHost
|
||||||
|
- `UseAppHost=false`
|
||||||
|
- `AssemblyName=BiDashboard`
|
||||||
|
- `RootNamespace=TrafagSalesExporter`
|
||||||
|
- `Microsoft.AspNetCore.Authentication.Negotiate` ist enthalten wie im alten `BiDashboard`-Projekt
|
||||||
|
- lokale Build-/Probe-Ordner werden vom Publish ausgeschlossen
|
||||||
|
|
||||||
|
Relevante Commits:
|
||||||
|
|
||||||
|
```text
|
||||||
|
8d10372 Configure Trafag web publish profile
|
||||||
|
f128d35 Publish web app without apphost
|
||||||
|
e9b616f Align Trafag publish output with BiDashboard
|
||||||
|
1533570 Exclude local build artifacts from web publish
|
||||||
|
5087a7c Enable IIS publish diagnostics
|
||||||
|
```
|
||||||
|
|
||||||
|
## Veroeffentlichen
|
||||||
|
|
||||||
|
Standard-Publish:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
dotnet publish .\TrafagSalesExporter.csproj -c Release --no-restore /p:PublishProfile=FolderProfile --verbosity minimal
|
||||||
|
```
|
||||||
|
|
||||||
|
Das Publish-Profil liegt hier:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Properties/PublishProfiles/FolderProfile.pubxml
|
||||||
|
```
|
||||||
|
|
||||||
|
## Diagnose-web.config
|
||||||
|
|
||||||
|
Im Repo liegt eine explizite `web.config`, damit IIS/ANCM Diagnoseinformationen liefern kann:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<httpErrors errorMode="Detailed" existingResponse="PassThrough" />
|
||||||
|
<aspNetCore processPath="dotnet"
|
||||||
|
arguments=".\BiDashboard.dll"
|
||||||
|
stdoutLogEnabled="true"
|
||||||
|
stdoutLogFile=".\logs\stdout"
|
||||||
|
hostingModel="inprocess" />
|
||||||
|
```
|
||||||
|
|
||||||
|
Der Ordner `logs` wurde auf dem Share angelegt:
|
||||||
|
|
||||||
|
```text
|
||||||
|
\\trch-webapp-bidashboard.trafagch.local\BiDashboard$\logs
|
||||||
|
```
|
||||||
|
|
||||||
|
Nach einem Browser-Reload mit `500` war der Ordner weiterhin leer. Das deutet auf eines der folgenden Themen:
|
||||||
|
|
||||||
|
- App-Pool darf nicht in `logs` schreiben.
|
||||||
|
- Fehler passiert auf IIS/ANCM-Ebene vor dem App-Start.
|
||||||
|
- IIS verwendet einen anderen Physical Path als den Share-Ordner.
|
||||||
|
|
||||||
|
## Rechtebefund
|
||||||
|
|
||||||
|
ACL auf dem Publish-Ordner zeigte:
|
||||||
|
|
||||||
|
```text
|
||||||
|
IIS_IUSRS: ReadAndExecute
|
||||||
|
TRAFAGCH\koi: FullControl
|
||||||
|
```
|
||||||
|
|
||||||
|
Versuch, Rechte selbst zu setzen:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
icacls "\\trch-webapp-bidashboard.trafagch.local\BiDashboard$" /grant "IIS_IUSRS:(OI)(CI)M" /T
|
||||||
|
```
|
||||||
|
|
||||||
|
Ergebnis:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Zugriff verweigert
|
||||||
|
```
|
||||||
|
|
||||||
|
Auch per SID fuer `IIS_IUSRS` wurde es abgelehnt. Wir koennen publishen und Dateien schreiben, aber keine NTFS-/Share-Rechte auf dem Server aendern.
|
||||||
|
|
||||||
|
## Wahrscheinlichster aktueller Fehler
|
||||||
|
|
||||||
|
Die App startet in `Program.cs` sofort die Datenbankinitialisierung:
|
||||||
|
|
||||||
|
```text
|
||||||
|
DatabaseInitializationService.InitializeAsync()
|
||||||
|
db.Database.EnsureCreatedAsync()
|
||||||
|
PRAGMA journal_mode=WAL
|
||||||
|
Schema-Wartung
|
||||||
|
SeedDefaults
|
||||||
|
```
|
||||||
|
|
||||||
|
SQLite schreibt bzw. aendert dabei mindestens:
|
||||||
|
|
||||||
|
```text
|
||||||
|
trafag_exporter.db
|
||||||
|
trafag_exporter.db-shm
|
||||||
|
trafag_exporter.db-wal
|
||||||
|
```
|
||||||
|
|
||||||
|
Wenn der App-Pool nur Lesen/Ausfuehren hat, kann das beim Start als `500` enden.
|
||||||
|
|
||||||
|
## Server-Spezialist: konkrete Bitte
|
||||||
|
|
||||||
|
Bitte auf dem Server `tragvapp401` pruefen:
|
||||||
|
|
||||||
|
1. IIS Application `/BiDashboard` zeigt auf genau den Ordner mit dieser Datei:
|
||||||
|
|
||||||
|
```text
|
||||||
|
\\trch-webapp-bidashboard.trafagch.local\BiDashboard$\web.config
|
||||||
|
```
|
||||||
|
|
||||||
|
oder auf den entsprechenden lokalen physischen Pfad.
|
||||||
|
|
||||||
|
2. App-Pool-Identity ermitteln.
|
||||||
|
|
||||||
|
3. Dieser konkreten App-Pool-Identity `Modify` geben auf:
|
||||||
|
|
||||||
|
```text
|
||||||
|
Publish-Ordner
|
||||||
|
logs\
|
||||||
|
trafag_exporter.db
|
||||||
|
trafag_exporter.db-shm
|
||||||
|
trafag_exporter.db-wal
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternativ voruebergehend `IIS_IUSRS` mit `Modify`, wenn die genaue App-Pool-Identity nicht klar ist.
|
||||||
|
|
||||||
|
4. App-Pool neu starten.
|
||||||
|
|
||||||
|
5. URL testen:
|
||||||
|
|
||||||
|
```text
|
||||||
|
https://trch-webapp-bidashboard.trafagch.local/BiDashboard/
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Wenn weiter `500`, bitte pruefen:
|
||||||
|
|
||||||
|
```text
|
||||||
|
\\trch-webapp-bidashboard.trafagch.local\BiDashboard$\logs
|
||||||
|
```
|
||||||
|
|
||||||
|
und Windows Event Viewer:
|
||||||
|
|
||||||
|
```text
|
||||||
|
IIS AspNetCore Module V2
|
||||||
|
Application Error
|
||||||
|
.NET Runtime
|
||||||
|
```
|
||||||
|
|
||||||
|
## Aktueller Restzustand im Git-Working-Tree
|
||||||
|
|
||||||
|
Es gibt weiterhin alte/unabhaengige lokale Dateien und geloeschte Alt-Dokumente im Working Tree. Diese wurden bewusst nicht committed:
|
||||||
|
|
||||||
|
```text
|
||||||
|
../BiDashboard/
|
||||||
|
.tmp_tools/
|
||||||
|
Tools/FinanceProbe/.tmp_tools/
|
||||||
|
verify_probe_out*/
|
||||||
|
docs/CFO_Kurzbericht_270515_NEU.docx
|
||||||
|
docs/FINANCE_AMPEL_LAENDER_2026-05-19.xlsx
|
||||||
|
financeprobe.*.log
|
||||||
|
mainapp.*.log
|
||||||
|
```
|
||||||
|
|
||||||
|
Ausserdem sind mehrere alte Dateien als geloescht markiert. Nicht blind committen, bevor klar ist, ob sie wirklich entfernt werden sollen.
|
||||||
@@ -1,5 +1,28 @@
|
|||||||
# Last Change 2026-05-04
|
# Last Change 2026-05-04
|
||||||
|
|
||||||
|
## IIS Deployment Handoff 2026-05-19
|
||||||
|
|
||||||
|
Aktueller Deployment-/IIS-Stand wurde hier dokumentiert:
|
||||||
|
|
||||||
|
```text
|
||||||
|
docs/DEPLOYMENT_IIS_HANDOFF_2026-05-19.md
|
||||||
|
```
|
||||||
|
|
||||||
|
Kurzstand:
|
||||||
|
|
||||||
|
- `TrafagSalesExporter` veroeffentlicht jetzt als `BiDashboard.dll`.
|
||||||
|
- Keine EXE im Publish.
|
||||||
|
- Publish-Ziel: `\\trch-webapp-bidashboard.trafagch.local\BiDashboard$\`.
|
||||||
|
- Wahrscheinliche URL: `https://trch-webapp-bidashboard.trafagch.local/BiDashboard/`.
|
||||||
|
- Diagnose-`web.config` ist aktiv mit `httpErrors Detailed` und `stdoutLogEnabled=true`.
|
||||||
|
- `logs`-Ordner existiert auf dem Share, blieb nach dem 500 aber leer.
|
||||||
|
- ACL-Befund: `IIS_IUSRS` hat nur `ReadAndExecute`; App braucht fuer SQLite/logs wahrscheinlich `Modify`.
|
||||||
|
- Rechte konnten lokal nicht gesetzt werden: `icacls` auf dem Share endete mit `Zugriff verweigert`.
|
||||||
|
|
||||||
|
Naechster Schritt:
|
||||||
|
|
||||||
|
- Server-Spezialist muss App-Pool-Identity bzw. `IIS_IUSRS` mit `Modify` auf Publish-Ordner, `logs` und `trafag_exporter.db*` berechtigen und danach App-Pool neu starten.
|
||||||
|
|
||||||
## ASP.NET Publish direkt aus TrafagSalesExporter 2026-05-19
|
## ASP.NET Publish direkt aus TrafagSalesExporter 2026-05-19
|
||||||
|
|
||||||
Entscheid:
|
Entscheid:
|
||||||
|
|||||||
Reference in New Issue
Block a user