Opening of Pdf file with specific page number doesn't work on production environment.

Hi,

The following code works fine to open a pdf file with a specific page number in developer environment but when I install the web application on my local iis machine, the pdf file doesn't open. There is no error message either to trouble shoot. Can you please help on this issue?

Thanks
Joe

Private Sub ShowPDF(intRecID As Integer, intBkRecID As Integer, _
                       intImageID As Integer, intPdfPageNo As Integer, strFileCode As String)


        Dim strJoePath As String = LoadWebImagePath(intImageID)
        Dim myProcess As New System.Diagnostics.Process()


        myProcess.StartInfo.FileName = "Acrobat.exe"
        myProcess.StartInfo.Arguments = String.Format(" /A ""page=" & intPdfPageNo & "=OpenActions"" ""{0}""", strJoePath & "\" & strFileCode & ".PDF")
        Try
            myProcess.Start()
        Catch ex As Exception
            If ex.Message <> "" Then
                Try
                    If File.Exists(strJoePath & "\" & strFileCode & ".PDF") = True Then
                        Me.RadWindowManager1.RadAlert("FILE EXISTS..!!!", 300, 100, "Image Loading", "alertCallBackFn", "/images/Alert.gif")
                    End If
                    myProcess.StartInfo.FileName = "AcroRd32.exe"
                    myProcess.StartInfo.Arguments = String.Format(" /A ""page=" & intPdfPageNo & "=OpenActions"" ""{0}""", strJoePath & "\" & strGRRFileCode & ".PDF")
                    myProcess.Start()
                Catch ex2 As Exception                
                    Me.RadWindowManager1.RadAlert("FATAL ERROR : " & ex2.Message.ToString & ". ..!!!", 300, 100, "Image Loading", "alertCallBackFn", "/images/Alert.gif")
                    Exit Sub
                End Try
            End If
        End Try
        myProcess.Close()
        myProcess = Nothing    
    End Sub
JOLEEJJAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
If you are trying to load this thru a web browser, I think you will find that you can't launch an EXE on a user machine thru a web browser.  That is considered a serious security problem and is blocked by all browsers.
0
JOLEEJJAuthor Commented:
Hi Dave,

Is there any way you can suggest to a open pdf file with a specific page?

Thanks

Joe
0
Dave BaldwinFixer of ProblemsCommented:
Sorry, no.  I just know that trying to launch an EXE thru a browser isn't going to work.  I have seen some other questions here about it though.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.