Help! Dataset returning an error on one machine, works fine on another.

Discussion in 'ASP .Net' started by Rico, Feb 1, 2006.

  1. Rico

    Rico Guest

    Hello,

    I have a web application that I developed in ASP.NET on one machine and I'm
    trying to deploy it on a Windows 2003 Server. The application runs fine on
    the development workstation connected to the development SQL Server 2000.

    I've deployed the application to the server and it works fine, accesses the
    data in the SQL database, but the problem comes when I try to create a
    report using a dataset. I get an error "Object reference not set to an
    instance of an object". This occurs on every report I try. Any idea what I
    should look at?

    I also have a second problem; the server does not (and will not) have
    VS2003 installed, I have administrator privledges, I have taken all the
    advice I can from elsewhere on the net (re: IIS set up, HTTP Keep Alive,
    Windows Authentication etc) but I can't debug the ASP.net application from
    this workstation, I get the error "Unable to start debugging on the web
    server. The debugger is not properly installed. Run setup to install or
    repair the debugger." But the problem is, Visual Studio is not going to be
    installed on the server and I know debugging can take place without VS
    installed, but can't find a solution to this problem.

    Any help would be greatly appreciated.

    Thanks!
     
    Rico, Feb 1, 2006
    #1
    1. Advertising

  2. Rico maybe try posting some code how you are trying to
    write the report
    Patrick
    "Rico" <r c o l l e n s @ h e m m i n g w a y . c o mREMOVE THIS PART IN
    CAPS> wrote in message news:Sw8Ef.409503$2k.312999@pd7tw1no...
    > Hello,
    >
    > I have a web application that I developed in ASP.NET on one machine and

    I'm
    > trying to deploy it on a Windows 2003 Server. The application runs fine

    on
    > the development workstation connected to the development SQL Server 2000.
    >
    > I've deployed the application to the server and it works fine, accesses

    the
    > data in the SQL database, but the problem comes when I try to create a
    > report using a dataset. I get an error "Object reference not set to an
    > instance of an object". This occurs on every report I try. Any idea what

    I
    > should look at?
    >
    > I also have a second problem; the server does not (and will not) have
    > VS2003 installed, I have administrator privledges, I have taken all the
    > advice I can from elsewhere on the net (re: IIS set up, HTTP Keep Alive,
    > Windows Authentication etc) but I can't debug the ASP.net application from
    > this workstation, I get the error "Unable to start debugging on the web
    > server. The debugger is not properly installed. Run setup to install or
    > repair the debugger." But the problem is, Visual Studio is not going to

    be
    > installed on the server and I know debugging can take place without VS
    > installed, but can't find a solution to this problem.
    >
    > Any help would be greatly appreciated.
    >
    > Thanks!
    >
    >
     
    Patrick.O.Ige, Feb 2, 2006
    #2
    1. Advertising

  3. Rico

    Rico Guest

    I've pasted the code below. I don't think it's the code that's the issue,
    since it works fine on this machine, but blows up on the server. Here is is
    either way;

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    System.EventArgs) Handles MyBase.Load
    Dim dt As New dbTier
    Dim ds As DataSet, dv As DataView
    Dim dsA As New dsCourses
    Dim i As Long
    Dim r As DataRow
    Dim t As Long

    t = Date.Now.Ticks()


    ds = dt.GenericDS("SELECT * FROM [viewCourses];")

    '!!!!!! NOTE: The following line is where the code blows up on the server.
    dv = ds.Tables(0).DefaultView
    '!!!!!!
    For i = 0 To dv.Count - 1
    ' Check to see if this record is valid.
    r = dsA.Tables("viewCourses").NewRow()
    r("CourseID") = dv(i)("CourseID")
    r("Title") = dv(i)("Title")
    r("Description") = dv(i)("Description")
    r("Safety") = dv(i)("Safety")
    r("RetrainInterval") = dv(i)("RetrainInterval")
    dsA.Tables("viewCourses").Rows.Add(r)

    Next
    ds.Dispose()


    r = dsA.Tables("Heading").NewRow
    r("Heading1") = "Western Forest Products Inc."
    r("Heading2") = ""
    dsA.Tables("Heading").Rows.Add(r)

    ' Load the report document and push in the data.
    Dim fname As String
    Dim rpt As New ReportDocument
    Dim repName As String

    'rpt.Load(Server.MapPath("rptTrainingRequired_I.rpt"))
    repName = Request.Form("repName")
    rpt.Load(Server.MapPath(repName))


    Dim exp As ExportOptions = rpt.ExportOptions

    exp.ExportFormatType = ExportFormatType.PortableDocFormat
    exp.ExportDestinationType = ExportDestinationType.DiskFile

    exp.DestinationOptions = New DiskFileDestinationOptions
    fname = GetNewFilename() & ".pdf"
    exp.DestinationOptions.diskfilename = Server.MapPath("reports/pdf/"
    & fname)

    rpt.SetDataSource(dsA)
    rpt.Export()

    Link = "reports/pdf/" & fname

    t = Date.Now.Ticks - t
    ElapsedTicks = t
    End Sub

    "Patrick.O.Ige" <> wrote in message
    news:%...
    > Rico maybe try posting some code how you are trying to
    > write the report
    > Patrick
    > "Rico" <r c o l l e n s @ h e m m i n g w a y . c o mREMOVE THIS PART IN
    > CAPS> wrote in message news:Sw8Ef.409503$2k.312999@pd7tw1no...
    >> Hello,
    >>
    >> I have a web application that I developed in ASP.NET on one machine and

    > I'm
    >> trying to deploy it on a Windows 2003 Server. The application runs fine

    > on
    >> the development workstation connected to the development SQL Server 2000.
    >>
    >> I've deployed the application to the server and it works fine, accesses

    > the
    >> data in the SQL database, but the problem comes when I try to create a
    >> report using a dataset. I get an error "Object reference not set to an
    >> instance of an object". This occurs on every report I try. Any idea
    >> what

    > I
    >> should look at?
    >>
    >> I also have a second problem; the server does not (and will not) have
    >> VS2003 installed, I have administrator privledges, I have taken all the
    >> advice I can from elsewhere on the net (re: IIS set up, HTTP Keep Alive,
    >> Windows Authentication etc) but I can't debug the ASP.net application
    >> from
    >> this workstation, I get the error "Unable to start debugging on the web
    >> server. The debugger is not properly installed. Run setup to install or
    >> repair the debugger." But the problem is, Visual Studio is not going to

    > be
    >> installed on the server and I know debugging can take place without VS
    >> installed, but can't find a solution to this problem.
    >>
    >> Any help would be greatly appreciated.
    >>
    >> Thanks!
    >>
    >>

    >
    >
     
    Rico, Feb 2, 2006
    #3
    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. Nico Grubert
    Replies:
    1
    Views:
    2,641
    Markus Rosenstihl
    Sep 21, 2005
  2. Steve Holden
    Replies:
    0
    Views:
    427
    Steve Holden
    Sep 21, 2005
  3. Michael Champagne
    Replies:
    4
    Views:
    361
    Matt Kruse
    Apr 20, 2004
  4. Larry R Harrison Jr

    Java Webpage Works Fine on One Machine But Not Another

    Larry R Harrison Jr, Aug 20, 2004, in forum: Javascript
    Replies:
    0
    Views:
    118
    Larry R Harrison Jr
    Aug 20, 2004
  5. Larry R Harrison Jr

    Java Webpage Works Fine On One Machine But Not Another

    Larry R Harrison Jr, Aug 20, 2004, in forum: Javascript
    Replies:
    1
    Views:
    157
Loading...

Share This Page