Code Not working outside of the VS2010 Debugger

I am running a Server 2008R2 server using IIS. This server has Visual Studio 2010 installed and the IIS web directory is one level in from the VS solution file. I have a piece of code that when using the debugger works as it should but when trying to use it from IIS returns no value and also no errors. The code is below. I'm assuming i'm missing something I need to configure in IIS, but I dont' know what that would be.
Public Sub WinDC_DisplaySysLog()
        Dim strFolderPath As String = txtPath.Text & "\SystemInfo\"
        Dim strFileName As String = "SystemLog.csv"

        Dim strConnString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFolderPath & ";Extended Properties=Text;"
        Dim conn As New OleDbConnection(strConnString)

        Try
            conn.Open()
            Dim cmd As New OleDbCommand("SELECT TOP 1000 TimeGenerated , EventID , EventTypeName , Message FROM [" & strFileName & "] order by TimeGenerated desc", conn)
            Dim da As New OleDbDataAdapter()

            da.SelectCommand = cmd

            Dim ds As New DataSet()

            da.Fill(ds)
            da.Dispose()


            gridEVTLog.DataSource = ds
            gridEVTLog.DataBind()

            For Each row As GridViewRow In gridEVTLog.Rows
                If row.Cells(2).Text = "Warning event" Then
                    row.BackColor = Color.Yellow
                End If
                If row.Cells(2).Text = "Error event" Then
                    row.BackColor = Color.Red
                End If
            Next

        Catch

        Finally
            conn.Close()
        End Try
    End Sub

Open in new window

LVL 1
newimagentAsked:
Who is Participating?
 
newimagentAuthor Commented:
Figued it out. It was the Jet OLEDB driver. In IIS you have to change the application pool settings to allow 32 bit applications. Simple enough.

http://blog.nkadesign.com/2008/windows-2008-the-microsoftjetoledb40-provider-is-not-registered-on-the-local-machine/ 
0
 
Shaun KlineLead Software EngineerCommented:
Is there a SystemInfo folder in your Web directory? You are not seeing any errors because you are using a Try/Catch but are not displaying any message in the Catch portion.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.