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)
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()
gridEVTLog.DataSource = ds
For Each row As GridViewRow In gridEVTLog.Rows
If row.Cells(2).Text = "Warning event" Then
row.BackColor = Color.Yellow
If row.Cells(2).Text = "Error event" Then
row.BackColor = Color.Red