CLR20r3 System.InvalidOperationException RRS feed

  • Question

  •  All,

    I have a windows 2008 VB app whose code is as follows:

    This code works on the development environment which is VS 2008 but when I deploy it on windows 2008 server it fails. I removed the sql statements and saw that it works. So what is it about sql on the windows server 2008 that I am missing to successfully deploy it.

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    Dim myConnection As SqlConnection
    Dim MyCommand As New SqlCommand()
    Dim connectionString As String = ConfigurationSettings.AppSettings("ConnectionString")
    Dim dr As SqlDataReader

    MsgBox("This is second button")
    myConnection =
    New SqlConnection(connectionString)

    'opening the connection
    MyCommand = New SqlCommand("SELECT auditid,assettag,computername FROM full_index where auditid=1", myConnection)

    'executing the command and assigning it to connection
    dr = myCommand.ExecuteReader()
    While dr.Read()

    'reading from the datareader
    MessageBox.Show("auditid is" & dr(0).ToString())
    "assettag is" & dr(1).ToString())
    "computername is" & dr(2).ToString())

    'displaying the data from the table
    End While


    End Sub

    Got the following error mesg:

      Stopped working

    Problem signature:
      Problem Event Name: CLR20r3
      Problem Signature 01: windowsapplication1.exe
      Problem Signature 02:
      Problem Signature 03: 499444c2
      Problem Signature 04: WindowsApplication1
      Problem Signature 05:
      Problem Signature 06: 499444c2
      Problem Signature 07: e
      Problem Signature 08: e9
      Problem Signature 09: System.InvalidOperationException
      OS Version: 6.0.6001.
      Locale ID: 1033

    Read our privacy statement:

    Thursday, February 12, 2009 4:00 PM


All replies

  • When I put an apphandler, I saw the following mesg:

    Activation context generation failed for "C:\Program Files\Business Objects\Common\2.8\bin\sacommlayer.dll".
    Dependent Assembly Microsoft.VC90.ATL,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",
    version="9.0.21022.8" could not be found. Please use sxstrace.exe for detailed diagnosis.

    Now what do I do?

    Thursday, February 12, 2009 4:41 PM
  • I solved it. I just had to install Microsoft Visual C++ 2008 redistributable on the server.

    Thursday, February 12, 2009 5:08 PM