I have this code:
Dim Filename = "" 'I NEED TO GET THE FILE NEMAE
Using client As New WebClient()
client.DownloadFile("www.URL.com_that_redirects_to_random_file.pfx", "c:/" & Filename)
End Using
If I use
client.ResponseHeaders
It contains
Accept-Ranges: bytes
ETag: "95308f8df644d71:0"
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Sun, 09 May 2021 20:09:40 GMT
Content-Type: application/x-pkcs12
Last-Modified: Sun, 09 May 2021 17:12:55 GMT
Content-Length: 1542
But there is not the filaname
So How Can I get the filename of the redirect ? May I need to touch IIS ? As I cannot touch the "www.URL.com_that_redirects_to_random_file.pfx" as that server file gets a random string and resirects to a file based on random string get in a db