Hello, please apologize my english, i am from Argentina.
I have an Vb.net app, that works fine when testing in localhost, but does not work when publishing it.
A button opens an aspx page (PdfPrint) in a new tab... In page_load of "PdfPrint.aspx" page i make a "Call PdfSub".
The PdfSub do some searches, that works fine always, an then create a PDF using iTextSharp. When testing in localhost work ok, but when publishing to my server i get the following error (i traslated to english...)

Server Error in '/' Application.
Resource not found (or somethnig like this)
Description: HTTP 404. The resource you are looking .....
URL requested: /PdfPrint.aspx

The PdfSub do something like this:

HttpContext.Current.Response.ContentType = "application/pdf"
HttpContext.Current.Response.AddHeader("content-disposition", "inline;filename=NewDocument.pdf")
HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache)

Dim PdfTable As New PdfPTable(Columnas)
Dim pdfDoc As New iTextSharp.text.Document(iTextSharp.text.PageSize.A4, 30, 30, 25, 25)
PdfWriter.GetInstance(pdfDoc, HttpContext.Current.Response.OutputStream)

pdfDoc.Open()

Dim Tif As iTextSharp.text.Image, p1 As New Phrase
Tif = iTextSharp.text.Image.GetInstance("http://www.somesite.com.ar/someimage.jpg")
pdfDoc.Add(Tif)

pdfDoc.Close()
HttpContext.Current.Response.Write(pdfDoc)
HttpContext.Current.Response.End()

When testing in localhost using Vs2013 works ok, i click button and a new tab is opened with PDF file in it... When publishing the app, tehe new tab is opened, but with error message. Filename problem?
I suspect some file name or fle path problem, but i can solve it, please help me.
Thank you very much!