network path access
This commit is contained in:
parent
1b6b25d7e7
commit
0b298c7965
@ -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)
|
||||
{
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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()
|
||||
|
||||
BIN
wwwroot/assets/images/pstw-logo.jpg
Normal file
BIN
wwwroot/assets/images/pstw-logo.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
Loading…
Reference in New Issue
Block a user