No description
- C# 53%
- JavaScript 43.4%
- HTML 2.9%
- CSS 0.5%
- PowerShell 0.2%
| App_Start | ||
| Areas/HelpPage | ||
| Connected Services/DPLService | ||
| Content | ||
| Controllers | ||
| Models | ||
| Properties | ||
| Scripts | ||
| Services | ||
| Views | ||
| .gitattributes | ||
| .gitignore | ||
| DPLGateway.csproj | ||
| DPLGateway.sln | ||
| favicon.ico | ||
| Global.asax | ||
| Global.asax.cs | ||
| health.ps1 | ||
| packages.config | ||
| README.md | ||
| Web.config | ||
| Web.Debug.config | ||
| Web.Klaic.config | ||
| Web.Release.config | ||
| Web.Vukovar.config | ||
Instaliraj IIS
Provjera da li je IIS instaliran:
Get-WindowsFeature Web-Server | Select Name, InstallState
Get-WindowsFeature Web-Asp-Net45, NET-Framework-45-Features |
Select Name, InstallState
Get-WindowsFeature Web-AppInit
Instalacija IIS-a i potrebnih komponenti:
Install-WindowsFeature -Name Web-Server -IncludeManagementTools
Install-WindowsFeature Web-Asp-Net45,NET-Framework-45-Features
Install-WindowsFeature Web-AppInit
Baza
- U tablici global unijeti parametar DPLToken.
- Kada je spremno u tablici skladisni staviti stupac dpl na 'da'.
Pool
-
Open IIS Manager (press Windows + R, type
inetmgr) -
In Connections pane, click your server name
-
Right-click Application Pools → Add Application Pool...
-
Configure:
- Name:
DPL - .NET CLR Version:
- ASP.NET Framework: Select matching version (e.g.,
v4.0)
- ASP.NET Framework: Select matching version (e.g.,
- Managed pipeline mode:
Integrated(recommended for modern apps) - Click OK
- Name:
-
Advanced Settings (right-click app pool → Advanced Settings):
- Process Model:
- Identity:
NetworkService(default, least privileges) - Always running
- Identity:
- Process Model:
Site
- Right-click Sites → Add Website...
- Configure:
- Site name:
DPL - Application pool: Select
DPL(created above) - Physical path:
C:\inetpub\wwwroot\MyApp(where you published files) - Binding:
- Type:
http - IP address:
All Unassigned(or specific IP) - Port:
80(HTTP)
- Type:
- Preload enabled
- Site name:
Permissions
Application pool identity needs access to:
- Application files (read/execute)
- Temp folder (read/write)
- Logs folder (write)
- Database (read/write - via connection string)
function Grant-AppPoolAccess {
param([string]$Path, [string]$AppPoolName)
$identity = "IIS AppPool\$AppPoolName"
$acl = Get-Acl $Path
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($identity, "Modify", "ContainerInherit,ObjectInherit", "None", "Allow")
$acl.SetAccessRule($rule)
Set-Acl $Path $acl
}
# Usage
$appPath = "C:\inetpub\wwwroot\MyApp"
Grant-AppPoolAccess "$appPath" "YourAppPoolName"
Grant-AppPoolAccess "$appPath\Logs" "YourAppPoolName"
Common Issues & Solutions
| Issue | Cause | Solution |
|---|---|---|
| 500.21 Error | IIS module not installed | Install .NET Hosting Bundle, restart IIS |
| Access Denied | Missing file permissions | Grant app pool identity Modify on app folder |
| 500.30 In-Process Load Failure | Wrong .NET version | Verify Hosting Bundle matches your .NET |
| 502 Bad Gateway | App crashes | Enable stdout logging in web.config, check logs |
| 404 Not Found | Wrong physical path | Verify path in site binding matches published folder |
| Connection timeout | Database unreachable | Test connection string from server, check firewall |
Unlocking Configuration Sections in IIS
Open IIS Manager → Select your server (top level).
Double-click Configuration Editor (under Management).
Navigate to the locked section (common ones):
system.webServer/handlers
system.webServer/modules
system.webServer/asp
Actions pane (right) → Unlock Section.
Apply → Yes to confirm (server-wide unlock).
Restart IIS: iisreset in admin command prompt.