Please HELP!!!!!! Earnest request!!Starting desktop app. thr aspx page

Discussion in 'Software' started by Hijabi, Sep 20, 2006.

  1. Hijabi

    Hijabi

    Joined:
    Sep 20, 2006
    Messages:
    1
    Hi All, I am new to ASP/VB .NET - I wrote a code for running desktop applications for buttons. It works fine on my local machine, it doesn't work on the webserver. I am using SQL authentication.

    Protected Sub Button5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button5.Click
    Dim strSID As String = Session.SessionID
    Dim ConnectionString As String = Session("sessConn")
    SqlDataSource1.ConnectionString = Session("sessConn")
    SqlDataSource2.ConnectionString = Session("sessConn")
    svr_machine_model.ConnectionString = Session("sessConn")
    svr_location.ConnectionString = Session("sessConn")
    svr_calling_station.ConnectionString = Session("sessConn")
    svr_corporate_build.ConnectionString = Session("sessConn")
    svr_machine_type.ConnectionString = Session("sessConn")
    svr_OS.ConnectionString = Session("sessConn")
    svr_service_pack.ConnectionString = Session("sessConn")

    If DropDownList3.Items.Count = 0 Then
    'MsgBox("No Server Selected!", MsgBoxStyle.Exclamation)
    Return
    End If

    Dim Param As String = ""

    Dim ctrl2 As Control = FormView1.FindControl("Remote_Acc_IPLabel")
    Dim RemoteAccessIPLabel As Label = ctrl2
    Param = RemoteAccessIPLabel.Text

    Dim command As String = "http://" + Param
    If Param <> "" Then
    System.Diagnostics.Process.Start(command)
    Else
    End If

    End Sub


    The above code gives the following error on webserver.
    Exception Details: System.ComponentModel.Win32Exception: Access is denied

    Line 370: System.Diagnostics.Process.Start(command, args)


    And a similar code for another button gives a diff. error:
    Protected Sub Button6_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button6.Click

    Dim strSID As String = Session.SessionID
    Dim ConnectionString As String = Session("sessConn")
    SqlDataSource1.ConnectionString = Session("sessConn")
    SqlDataSource2.ConnectionString = Session("sessConn")
    svr_machine_model.ConnectionString = Session("sessConn")
    svr_location.ConnectionString = Session("sessConn")
    svr_calling_station.ConnectionString = Session("sessConn")
    svr_corporate_build.ConnectionString = Session("sessConn")
    svr_machine_type.ConnectionString = Session("sessConn")
    svr_OS.ConnectionString = Session("sessConn")
    svr_service_pack.ConnectionString = Session("sessConn")

    If DropDownList3.Items.Count = 0 Then
    'MsgBox("No Server Selected!", MsgBoxStyle.Exclamation)
    Return
    End If

    Dim Param As String = ""

    Dim command As String = "mstsc"

    Dim ctrl2 As Control = FormView1.FindControl("IPAddressLabel")
    Dim IPAddressLabel As Label = ctrl2
    Param = IPAddressLabel.Text

    Dim args As String = "/v:" + Param
    If Param <> "" Then
    'MsgBox("Please wait while trying to connect...", MsgBoxStyle.MsgBoxRight, "Connecting")
    System.Diagnostics.Process.Start(command, args)
    Else
    'MsgBox("IP Address field empty!!! Please enter a valid IP Address in the Server Details Card.", MsgBoxStyle.Exclamation, "Error!!!")
    End If
    End Sub

    Gives the following EXCEPTION:
    Exception Details: System.ComponentModel.Win32Exception: The system cannot find the file specified

    Also, kindly let me know how to pop-up msgs on IIS/webserver.

    Hijabi
    Hijabi, Sep 20, 2006
    #1
    1. Advertising

  2. Hijabi

    Headhuntar

    Joined:
    Sep 29, 2006
    Messages:
    4
    Confused :S
    Headhuntar, Sep 29, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ablang
    Replies:
    1
    Views:
    462
    Joe Blow
    Jan 6, 2005
  2. Naga_01
    Replies:
    0
    Views:
    1,361
    Naga_01
    Jun 6, 2006
  3. Armando Ruiz

    default.aspx or login aspx?

    Armando Ruiz, Jun 22, 2004, in forum: MCAD
    Replies:
    0
    Views:
    424
    Armando Ruiz
    Jun 22, 2004
  4. getmeaditi
    Replies:
    0
    Views:
    1,675
    getmeaditi
    Mar 10, 2009
  5. RichA

    Olympus cover-up begins in earnest

    RichA, Dec 7, 2011, in forum: Digital Photography
    Replies:
    9
    Views:
    384
    PeterN
    Dec 20, 2011
Loading...

Share This Page