浏览代码

api test fix

Robert 2 年之前
父节点
当前提交
0e59b1633a

+ 1 - 1
EVCB_OCPP.WEBAPI/Controllers/FileController.cs

@@ -57,7 +57,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers
                             //System.IO.File.Move(localFileName, filePath);
                             using (var fstream = System.IO.File.Open(filePath, FileMode.CreateNew))
                             {
-                                file.CopyTo(fstream);
+                                await file.CopyToAsync(fstream);
                             }
                         }
                         else

+ 14 - 16
EVCB_OCPP.WEBAPI/Controllers/Version1/CPOController.cs

@@ -5,21 +5,16 @@ using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Net;
-using System.Net.Http;
 using Newtonsoft.Json;
 using System.Threading.Tasks;
 using EVCB_OCPP.WEBAPI.Models.WebAPI.Dto;
-using System.Net.Http.Headers;
 using EVCB_OCPP.Packet.Messages.SubTypes;
-using System.Security.Cryptography.X509Certificates;
-using OCPPPackage.Profiles;
-using EVCB_OCPP.Packet.Messages.Core;
-using EVCB_OCPP.Packet.Messages;
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Http.Extensions;
 using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
 
 namespace EVCB_OCPP.WEBAPI.Controllers.Version1
 {
@@ -30,19 +25,20 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
     [Route("api/v1/cpo")]
     public class CPOController : ControllerBase
     {
-        private HttpClientService service = new HttpClientService();
         private readonly IServiceProvider serviceProvider;
+        private readonly ILogger<CPOController> logger;
 
-        public CPOController(IServiceProvider serviceProvider, IConfiguration configuration)
+        public CPOController(IServiceProvider serviceProvider, IConfiguration configuration, ILogger<CPOController> logger)
         {
             this.serviceProvider = serviceProvider;
+            this.logger = logger;
         }
 
         private bool ContainsChargePoint(string chargeBoxId, out string customerId)
         {
             customerId = string.Empty;
 
-            if (!Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId)) return false;
+            if (!Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId)) return false;
 
             customerId = Request.Headers[EVCBConfiguration.Header_PartnerId].First();
 
@@ -60,7 +56,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
             int statusCode = StatusCodes.Status500InternalServerError;
             try
             {
-                if (Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId))
+                if (Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId))
                 {
                     var _customerId = Request.Headers[EVCBConfiguration.Header_PartnerId].First();
                     ChargingStationService _service = serviceProvider.GetRequiredService<ChargingStationService>();
@@ -97,7 +93,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
             {
                 ChargePointService _CPService = serviceProvider.GetRequiredService<ChargePointService>();// new ChargePointService();
                 var tt = _CPService.GetLastUpdatedTimebyMachineId("0da4f4a6-a952-46f0-b2f3-696385a9a56a");
-                if (Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId))
+                if (Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId))
                 {
                     var _customerId = Request.Headers[EVCBConfiguration.Header_PartnerId].First();
 
@@ -1262,7 +1258,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
                 }
                 else
                 {
-                    List<ActiveSession> _innerData = new List<ActiveSession>();
+                    List<ActiveSession> _innerData = new();
 
                     foreach (var transactionData in transactionDatas)
                     {
@@ -1292,9 +1288,9 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
                             Currency = currencyText
                         });
                         decimal energy = decimal.Parse(_innerData[_innerData.Count - 1].Energy);
-                        energy = _innerData[_innerData.Count - 1].Energy_Format == UnitOfMeasure.Wh.ToString() ? Decimal.Divide(energy, 1000) : energy;
-                        _innerData[_innerData.Count - 1].Energy = energy.ToString("0.000");
-                        _innerData[_innerData.Count - 1].Energy_Format = UnitOfMeasure.kWh.ToString();
+                        energy = _innerData[^1].Energy_Format == UnitOfMeasure.Wh.ToString() ? Decimal.Divide(energy, 1000) : energy;
+                        _innerData[^1].Energy = energy.ToString("0.000");
+                        _innerData[^1].Energy_Format = UnitOfMeasure.kWh.ToString();
                     }
                     var _innerResponse = new { Sessions = _innerData };
                     result.Data = JsonConvert.SerializeObject(_innerResponse, EVCBConfiguration.JSONSERIALIZER_FORMAT);
@@ -1389,7 +1385,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
             var result = new CPOOuterResponse();
             //HttpStatusCode statusCode = HttpStatusCode.InternalServerError;
             int statusCode = StatusCodes.Status500InternalServerError;
-            var _innerData = new { Result = CommandResponseType.Rejected.ToString(), Timeout = 60 };
+            //var _innerData = new { Result = CommandResponseType.Rejected.ToString(), Timeout = 60 };
             try
             {
 
@@ -1424,6 +1420,8 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version1
                 }
                 else
                 {
+                    logger.LogWarning(_innerresult.Exception, _innerresult.Response);
+
                     result.StatusCode = (int)CPO_StatusCode.CANT_FOUND_DATA;
                     result.StatusMessage = CPO_StatusMessage.ERROR_MSG_INNERSERVICE_ERROR;
                     //statusCode = HttpStatusCode.BadRequest;

+ 5 - 4
EVCB_OCPP.WEBAPI/Controllers/Version2/V2_CPOController.cs

@@ -24,6 +24,7 @@ using IChargePointService = EVCB_OCPP.WEBAPI.Services.Integration.IChargePointSe
 using Microsoft.Extensions.Configuration;
 using Microsoft.AspNetCore.Http.Extensions;
 using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Data.SqlClient;
 
 namespace EVCB_OCPP.WEBAPI.Controllers.Version2
 {    
@@ -53,7 +54,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version2
             {
 
 
-                if (Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId))
+                if (Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId))
                 {
                     var _customerId = Request.Headers[EVCBConfiguration.Header_PartnerId].First();
 
@@ -128,7 +129,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version2
             int statusCode = StatusCodes.Status500InternalServerError;
             try
             {
-                if (Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId))
+                if (Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId))
                 {
                     var customerId = Request.Headers[EVCBConfiguration.Header_PartnerId].First();
                     string mainConnectionString = configuration.GetConnectionString("MainDBContext");
@@ -255,7 +256,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version2
             int statusCode = StatusCodes.Status500InternalServerError;
             try
             {
-                if (Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId))
+                if (Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId))
                 {
                     var _customerId = Request.Headers[EVCBConfiguration.Header_PartnerId].First();
                     ChargingStationService _service = serviceProvider.GetRequiredService<ChargingStationService>();
@@ -1193,7 +1194,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version2
         {
             customerId = string.Empty;
 
-            if (!Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId)) return false;
+            if (!Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId)) return false;
 
             customerId = Request.Headers[EVCBConfiguration.Header_PartnerId].First();
 

+ 3 - 3
EVCB_OCPP.WEBAPI/Controllers/Version2/ocpp16/OCPP16_CPOController.cs

@@ -46,7 +46,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version2.ocpp16
 
             customerId = string.Empty;
 
-            if (!Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId)) return false;
+            if (!Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId)) return false;
 
             customerId = Request.Headers[EVCBConfiguration.Header_PartnerId].First();
 
@@ -67,7 +67,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version2.ocpp16
             int statusCode = StatusCodes.Status500InternalServerError;
             try
             {
-                if (Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId))
+                if (Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId))
                 {
                     var _customerId = Request.Headers[EVCBConfiguration.Header_PartnerId].First();
                     ChargingStationService _service = serviceProvider.GetRequiredService<ChargingStationService>();//new ChargingStationService();
@@ -102,7 +102,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version2.ocpp16
             {
                 ChargePoint16Service _CPService = serviceProvider.GetRequiredService<ChargePoint16Service>();
                 var tt = _CPService.GetLastUpdatedTimebyMachineId("0da4f4a6-a952-46f0-b2f3-696385a9a56a");
-                if (Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId))
+                if (Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId))
                 {
                     var _customerId = Request.Headers[EVCBConfiguration.Header_PartnerId].First();
 

+ 1 - 1
EVCB_OCPP.WEBAPI/Controllers/Version2/ocpp201/OCPP201_CPOController.cs

@@ -44,7 +44,7 @@ namespace EVCB_OCPP.WEBAPI.Controllers.Version2.ocpp201
         {
             customerId = string.Empty;
 
-            if (!Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId)) return false;
+            if (!Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId)) return false;
 
             customerId = Request.Headers[EVCBConfiguration.Header_PartnerId].First();
 

+ 1 - 1
EVCB_OCPP.WEBAPI/EVCB_OCPP.WEBAPI.csproj

@@ -44,12 +44,12 @@
     <PackageReference Include="jQuery" Version="3.6.1" />
     <PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
     <PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
+    <PackageReference Include="Microsoft.Data.SqlClient" Version="5.0.1" />
     <PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
     <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.17.0" />
     <PackageReference Include="Modernizr" Version="2.8.3" />
     <PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
     <PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
-    <PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
     <PackageReference Include="System.ServiceModel.Duplex" Version="4.10.0" />
     <PackageReference Include="System.ServiceModel.NetTcp" Version="4.10.0" />
     <PackageReference Include="System.ServiceModel.Federation" Version="4.10.0" />

+ 4 - 4
EVCB_OCPP.WEBAPI/Handlers/CPOAuthentication.cs

@@ -166,7 +166,7 @@ namespace EVCB_OCPP.WEBAPI.Handlers
             actionContext.Request.Body.Position = 0;
             string body = new StreamReader(actionContext.Request.Body).ReadToEnd();
             actionContext.Request.Body.Position = 0;
-            string diplayUrl = actionContext.Request.GetDisplayUrl();
+            string diplayUrl = actionContext.Request.GetDisplayUrl().Replace("%20", " ").Replace(@"\\", @"\");
             string tempText = diplayUrl.Substring(diplayUrl.IndexOf('?') + 1).ToLower();
             tempText = tempText.StartsWith("http") ? string.Empty : tempText;
             body = tempText + body;
@@ -185,9 +185,9 @@ namespace EVCB_OCPP.WEBAPI.Handlers
         {
             formatMessage = string.Empty;
 
-            if (actionContext.Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId)
-               && actionContext.Request.Headers.Keys.Contains(EVCBConfiguration.Header_Signature)
-               && actionContext.Request.Headers.Keys.Contains(EVCBConfiguration.Header_Timestamp))
+            if (actionContext.Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId)
+               && actionContext.Request.Headers.ContainsKey(EVCBConfiguration.Header_Signature)
+               && actionContext.Request.Headers.ContainsKey(EVCBConfiguration.Header_Timestamp))
             {
                 string timestamp = actionContext.Request.Headers[EVCBConfiguration.Header_Timestamp].FirstOrDefault();
                 string PartnerId = actionContext.Request.Headers[EVCBConfiguration.Header_PartnerId].FirstOrDefault();

+ 8 - 4
EVCB_OCPP.WEBAPI/Handlers/InernalAuthentication.cs

@@ -85,6 +85,10 @@ namespace EVCB_OCPP.WEBAPI.Handlers
 
 
             //return FromResult(new HttpResponseMessage(_status) { Content = new StringContent(JsonConvert.SerializeObject(_errorResponse), System.Text.Encoding.UTF8, "application/json") });
+            //actionContext.Response.StatusCode = _status;
+            //actionContext.Response.ContentType = "application/json";
+            //actionContext.Response.WriteAsJsonAsync(_errorResponse);
+
             context.Result = new ContentResult()
             {
                 StatusCode = _status,
@@ -170,7 +174,7 @@ namespace EVCB_OCPP.WEBAPI.Handlers
             //string body = content.Result;
             actionContext.Request.Body.Position = 0;
             string body = new StreamReader(actionContext.Request.Body).ReadToEndAsync().Result;//.ReadToEnd();
-            string diplayUrl = actionContext.Request.GetDisplayUrl();
+            string diplayUrl = actionContext.Request.GetDisplayUrl().Replace("%20"," ").Replace(@"\\", @"\");
             string tempText = diplayUrl.Substring(diplayUrl.IndexOf('?') + 1).ToLower();
             tempText = tempText.StartsWith("http") ? string.Empty : tempText;
             body = tempText + body;
@@ -190,9 +194,9 @@ namespace EVCB_OCPP.WEBAPI.Handlers
         {
             formatMessage = string.Empty;
 
-            if (actionContext.Request.Headers.Keys.Contains(EVCBConfiguration.Header_PartnerId)
-               && actionContext.Request.Headers.Keys.Contains(EVCBConfiguration.Header_Signature)
-               && actionContext.Request.Headers.Keys.Contains(EVCBConfiguration.Header_Timestamp))
+            if (actionContext.Request.Headers.ContainsKey(EVCBConfiguration.Header_PartnerId)
+               && actionContext.Request.Headers.ContainsKey(EVCBConfiguration.Header_Signature)
+               && actionContext.Request.Headers.ContainsKey(EVCBConfiguration.Header_Timestamp))
             {
                 string timestamp = actionContext.Request.Headers[EVCBConfiguration.Header_Timestamp].FirstOrDefault();
                 string PartnerId = actionContext.Request.Headers[EVCBConfiguration.Header_PartnerId].FirstOrDefault();

+ 5 - 3
EVCB_OCPP.WEBAPI/Middleware/APILogMiddleware.cs

@@ -12,8 +12,8 @@ using EVCB_OCPP.WEBAPI.Models.WebAPI;
 using Newtonsoft.Json;
 using System.Linq;
 using System.Net;
-using System.Data.SqlClient;
 using Microsoft.Extensions.Configuration;
+using Microsoft.Data.SqlClient;
 
 namespace EVCB_OCPP.WEBAPI.Middleware;
 
@@ -51,8 +51,12 @@ public class APILogMiddleware
         var task =  _next(context);
         await task;
 
+        fakeResponseBody.Seek(0, SeekOrigin.Begin);
+        await fakeResponseBody.CopyToAsync(originalBodyStream);
+
         if (request.GetDisplayUrl().Contains("api/v1/file"))
         {
+            await fakeResponseBody.DisposeAsync();
             return;
         }
 
@@ -108,8 +112,6 @@ public class APILogMiddleware
             apiLogEntry.ResponseTimestamp = DateTime.Now;
             WriteLog(apiLogEntry);
 
-            fakeResponseBody.Seek(0, SeekOrigin.Begin);
-            await fakeResponseBody.CopyToAsync(originalBodyStream);
             await fakeResponseBody.DisposeAsync();
 
             return;

+ 1 - 2
EVCB_OCPP.WEBAPI/Services/ChargePointService.cs

@@ -7,10 +7,9 @@ using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.DependencyInjection;
 using System;
 using System.Collections.Generic;
-using System.Configuration;
 using System.Data;
-using System.Data.SqlClient;
 using System.Linq;
+using Microsoft.Data.SqlClient;
 
 namespace EVCB_OCPP.WEBAPI.Services
 {

+ 1 - 1
EVCB_OCPP.WEBAPI/Services/ChargingStationService.cs

@@ -7,8 +7,8 @@ using System;
 using System.Collections.Generic;
 using System.Configuration;
 using System.Data;
-using System.Data.SqlClient;
 using System.Linq;
+using Microsoft.Data.SqlClient;
 
 namespace EVCB_OCPP.WEBAPI.Services
 {

+ 1 - 1
EVCB_OCPP.WEBAPI/Services/CustomerService.cs

@@ -4,7 +4,7 @@ using System;
 using System.Collections.Generic;
 using System.Configuration;
 using System.Data;
-using System.Data.SqlClient;
+using Microsoft.Data.SqlClient;
 using System.Linq;
 
 namespace EVCB_OCPP.WEBAPI.Services

+ 1 - 1
EVCB_OCPP.WEBAPI/Services/Integration/ChargePoint16Service.cs

@@ -10,7 +10,7 @@ using System;
 using System.Collections.Generic;
 using System.Configuration;
 using System.Data;
-using System.Data.SqlClient;
+using Microsoft.Data.SqlClient;
 using System.Linq;
 
 namespace EVCB_OCPP.WEBAPI.Services.Integration

+ 1 - 1
EVCB_OCPP.WEBAPI/Services/Integration/ChargePoint201Service.cs

@@ -8,7 +8,7 @@ using System;
 using System.Collections.Generic;
 using System.Configuration;
 using System.Data;
-using System.Data.SqlClient;
+using Microsoft.Data.SqlClient;
 using System.Linq;
 
 namespace EVCB_OCPP.WEBAPI.Services.Integration

+ 1 - 1
EVCB_OCPP.WEBAPI/Services/Integration/ChargingStationService.cs

@@ -8,7 +8,7 @@ using System;
 using System.Collections.Generic;
 using System.Configuration;
 using System.Data;
-using System.Data.SqlClient;
+using Microsoft.Data.SqlClient;
 using System.Linq;
 
 namespace EVCB_OCPP.WEBAPI.Services.Integration

+ 1 - 1
EVCB_OCPP.WEBAPI/Services/Integration/ServerTriggerService.cs

@@ -8,10 +8,10 @@ using System;
 using System.Collections.Generic;
 using System.Configuration;
 using System.Data;
-using System.Data.SqlClient;
 using System.Linq;
 using System.Net;
 using Microsoft.Extensions.Configuration;
+using Microsoft.Data.SqlClient;
 
 namespace EVCB_OCPP.WEBAPI.Services.Integration
 {

+ 1 - 2
EVCB_OCPP.WEBAPI/Services/ServerTriggerService.cs

@@ -7,11 +7,10 @@ using Microsoft.Extensions.Configuration;
 using Newtonsoft.Json;
 using System;
 using System.Collections.Generic;
-using System.Configuration;
 using System.Data;
-using System.Data.SqlClient;
 using System.Linq;
 using System.Net;
+using Microsoft.Data.SqlClient;
 
 namespace EVCB_OCPP.WEBAPI.Services
 {

+ 7 - 7
EVCB_OCPP.WEBAPI/appsettings.json

@@ -13,12 +13,12 @@
   "UnobtrusiveJavaScriptEnabled": true,
   "StatisticsAPI": "http://ocpp.phihong.com.tw/StatisticsReportApi/",
   "ConnectionStrings": {
-    "Main20DBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_Main;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework",
-    "MeterValue20DBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_Main;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework",
-    "ConnectionLogDBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_ConnectionLog;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework",
-    "MainDBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_Main;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework",
-    "MeterValueDBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_MeterValue;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework",
-    "APILogDBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_APILog;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework",
-    "WebDBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_Web;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework"
+    "Main20DBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_Main;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework;TrustServerCertificate=true",
+    "MeterValue20DBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_Main;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework;TrustServerCertificate=true",
+    "ConnectionLogDBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_ConnectionLog;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework;TrustServerCertificate=true",
+    "MainDBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_Main;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework;TrustServerCertificate=true",
+    "MeterValueDBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_MeterValue;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework;TrustServerCertificate=true",
+    "APILogDBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_APILog;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework;TrustServerCertificate=true",
+    "WebDBContext": "data source=172.1.0.131\\DEV_OCPP_PORTAL;initial catalog=Docker_Web;;persist security info=True;user id=sa;password=Ph0930118811;MultipleActiveResultSets=True;App=EntityFramework;TrustServerCertificate=true"
   }
 }