ResolveUrl
resolves a URL relative to the current page. It will not change a UNC path.
Which means that the user browsing your application would need to have access to the specified UNC path in order to be able to open that path.
You'll also find that most browsers will refuse to embed a local file, such as a UNC path, into a web page served over HTTP or HTTPS, since this would be a security vulnerability.
Instead of trying to embed the UNC path, you need to create a handler in the same site to load the file and write it to the response. Then point your
<object>
tag to that handler. You will need to ensure that your application pool is running as a user with permissions to access the file.
<%@ WebHandler Language="VB.NET" %>
Imports System.IO
Imports System.Web
Public Class DocumentHandler : Implements IHttpHandler
Public ReadOnly Property IsReusable As Boolean
Get
Return False
End Get
End Property
Public Sub ProcessRequest(ByVal context As HttpContext)
Dim fileName As String = Path.GetFileName(Request.QueryString("file"))
Dim filePath As String = Path.Combine("\\Sils-home\j-disk-3\pdf\", fileName)
context.Response.TransmitFile(filePath)
End Sub
End Class