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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
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.

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

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
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
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.