We have developed a web app using the application blocks. On our development machines everything seems to work correctly.
We recently got a new server with windows 2003 configured to host the website. We are connecting to an Oracle database.
The problem is that the website seems to run on the server, however no data is being retreived. No errors are being thrown as well. The website is displayed but where information should be displayed such as grids or lists, nothing is retreived.
I have put logging into the application in order to track down what might be causing the problem however I still can't figure it out.
Here is the main function where we attempt to access the database and get info.
Private
Function GetDataReader(ByVal sqlCommand
As String)
As IDataReader
' DataReader that will hold the returned results
' Create the Database object, using the default database service. The
' default database service is determined through configuration.
Try
Dim db As Database = DatabaseFactory.CreateDatabase("Dev1")
Dim dbCommand
As DbCommand = db.GetSqlStringCommand(sqlCommand)
' The ExecuteReader call will request the connection to be closed upon
' the closing of the DataReader. The DataReader will be closed
' automatically when it is disposed.
Dim dataReader
As IDataReader = db.ExecuteReader(dbCommand)
Return dataReader
Catch ex As Exception
Dim rethrow
As Boolean = ExceptionPolicy.HandleException(ex,
"Data Access Policy")
If (rethrow)
Then
Throw
End
If
Return Nothing
End Try
End Function
The application runs through the code as if it is getting information. No exceptions are thrown. No errors occur. Just doesn't return any data.
I have changed queries to purposefully fail and that is triggereing an exception, but no luck with trying to get data.
The website is located on a different drive than C:. Not sure if that would have anything to do with it. I wouldn't think so.
Any ideas? Is there something special I need to do on the server in order to get the Data Access Application block to work with Oracle?
The application is using windows authentication to retreive the username of the person logged in. Based on this id the application retreives information from the database. We had "Anonymous Access" turned ON in IIS. I turned it off and checked "Integrated
Windows Authentication".
At the very least, now I know we need some more error handling in this type of situation...
None
0 Points
36 Posts
Help with DAAB...Not retreiving data when running on Server...
May 06, 2008 01:57 PM|jarice1978|LINK
Hello,
We have developed a web app using the application blocks. On our development machines everything seems to work correctly.
We recently got a new server with windows 2003 configured to host the website. We are connecting to an Oracle database.
The problem is that the website seems to run on the server, however no data is being retreived. No errors are being thrown as well. The website is displayed but where information should be displayed such as grids or lists, nothing is retreived.
I have put logging into the application in order to track down what might be causing the problem however I still can't figure it out.
Here is the main function where we attempt to access the database and get info.
The application runs through the code as if it is getting information. No exceptions are thrown. No errors occur. Just doesn't return any data.
I have changed queries to purposefully fail and that is triggereing an exception, but no luck with trying to get data.
The website is located on a different drive than C:. Not sure if that would have anything to do with it. I wouldn't think so.
Any ideas? Is there something special I need to do on the server in order to get the Data Access Application block to work with Oracle?
Please help...
Thanks,
Joe
None
0 Points
36 Posts
Re: Help with DAAB...Not retreiving data when running on Server...
May 06, 2008 03:04 PM|jarice1978|LINK
Problem solved.
The application is using windows authentication to retreive the username of the person logged in. Based on this id the application retreives information from the database. We had "Anonymous Access" turned ON in IIS. I turned it off and checked "Integrated Windows Authentication".
At the very least, now I know we need some more error handling in this type of situation...
Thanks,
Joe