network path access

This commit is contained in:
misya 2025-05-13 17:25:17 +08:00
parent 1b6b25d7e7
commit 0b298c7965
5 changed files with 5 additions and 4 deletions

View File

@ -13,7 +13,7 @@ namespace PSTW_CentralSystem.Areas.MMS.Controllers
{
private readonly MMSSystemContext _context;//Used in TarBallForm and GeneratePdfResponse to query the database.
private readonly NetworkShareAccess _networkAccessService;//used in GetImage and GeneratePdfResponse
private const string PhotoBasePath = "\\192.168.12.42\\images\\marine\\manual_tarball";//used in GetImage and GeneratePdfResponse
private const string PhotoBasePath = "\\\\192.168.12.42\\images\\marine\\manual_tarball";//used in GetImage and GeneratePdfResponse
public MarineController(MMSSystemContext context, NetworkShareAccess networkAccessService)
{

View File

@ -28,7 +28,7 @@ public class NetworkShareAccess : IDisposable
RemoteName = _networkPath
};
var result = WNetAddConnection2(netResource, _password, _username, 0);//
var result = WNetAddConnection2(netResource, _password, _username, 0);//ERROR HERE
if (result != 0)
{

View File

@ -86,7 +86,8 @@ namespace PSTW_CentralSystem.Areas.MMS.Models.PDFGenerator
column.Item()
.AlignMiddle()
.AlignCenter()
.Text("Logo Placeholder");
.Image("assets/images/pstw-logo.png")
.FitArea();
});
row.RelativeItem(1).Element(CellStyle)

View File

@ -23,7 +23,7 @@ internal class Program
builder.Services.AddControllersWithViews();
builder.Services.AddRazorPages();
builder.Services.AddScoped<NetworkShareAccess>(provider =>
new NetworkShareAccess("\\192.168.12.42\\images\\marine\\manual_tarball", "installer", "mms@pstw"));
new NetworkShareAccess("\\\\192.168.12.42\\images\\marine\\manual_tarball", "installer", "mms@pstw"));
Log.Logger = new LoggerConfiguration()

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB