A
Alec MacLean
Hi all,
I'm trying to deploy an ASP.NET (1.1) app to our production webserver, but
having problems with the DAAB (from Ent Lib June 2005).
As you might guess, it works just fine and dandy on my dev PC (VS2003).
The error I'm getting on the production server is:
The type initializer for
"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
threw an exception
Background info:
Using our own webserver, so I have direct folder access.
The application is for use on our Extranet and uses SSL for all comms.
Users access control is via Forms Auth (tried and tested methods used in all
our extranet apps).
I have used normal xcopy (cut & paste) deployment for the project folders
and aspx, dataconfiguration and dll files, then set up the virtual directory
on IIS, and enabled the required use of SSL on the new virtual directory.
I have other apps using the direct ADO.NET data methods, which all work
fine, so the folder structure and setup is not something I'm concerned
about.
I've converted one page of my new app to use the direct methods and these
work OK, so I believe the virtual directory config and SQL permissions can
be eliminated as a problem and it narrows the problem directly to the DAAB
methods.
So the folder structure is:
<myWebsite>
+--<myAppVDir>
+--Bin
+--images
With the files in my app's V-Dir being:
all the aspx files, globa.asax, styles.css
dataconfiguration.config
web.config
Content of /bin:
My project's dll
Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.EnterpriseLibrary.Configuration.dll
Microsoft.Practices.EnterpriseLibrary.Data.dll
I have set a project-level Imports for the
Microsoft.Practices.EnterpriseLibrary.Data
The production versions of web.config and dataconfiguration.config files
have been modified to use the production instance of the SQL dbo.
I've narrowed down my problem specifically to the db.ExecuteReader method
used to load the IDataReader.
In Page_Load, call is made to method for retrieving users email address:
Private Sub GetStaffEmail()
Dim db As Database = DatabaseFactory.CreateDatabase
Dim cmd As DBCommandWrapper =
db.GetStoredProcCommandWrapper("usp_OnLine_EmailAddr_for_Staff_SELECT")
Dim dataReader As IDataReader
'Add the required parameter:
cmd.AddInParameter("@ExtranetUSID", DbType.Int32, Me.intUSID)
Try
'Execute command and retrieve data:
dataReader = db.ExecuteReader(cmd) ' <--- Fails. Triggers exception
....
Catch
....
Finally
'Dispose of dataReader
....
End Try
End Sub
I have not installed or run any process specifically for the EntLib on the
server, other than copy the three DLL's as outlined above.
Should I run/install the EntLib MSI and then run the "Install Services"
batch file?
Being cautious, I avoid installing anything I don't have to on the
production server.
Is there anything else I should be aware of to implement the EntLib DAAB?
Thanks for any pointers.
Al
I'm trying to deploy an ASP.NET (1.1) app to our production webserver, but
having problems with the DAAB (from Ent Lib June 2005).
As you might guess, it works just fine and dandy on my dev PC (VS2003).
The error I'm getting on the production server is:
The type initializer for
"Microsoft.Practices.EnterpriseLibrary.Data.Instrumentation.DataConnectionFailedEvent"
threw an exception
Background info:
Using our own webserver, so I have direct folder access.
The application is for use on our Extranet and uses SSL for all comms.
Users access control is via Forms Auth (tried and tested methods used in all
our extranet apps).
I have used normal xcopy (cut & paste) deployment for the project folders
and aspx, dataconfiguration and dll files, then set up the virtual directory
on IIS, and enabled the required use of SSL on the new virtual directory.
I have other apps using the direct ADO.NET data methods, which all work
fine, so the folder structure and setup is not something I'm concerned
about.
I've converted one page of my new app to use the direct methods and these
work OK, so I believe the virtual directory config and SQL permissions can
be eliminated as a problem and it narrows the problem directly to the DAAB
methods.
So the folder structure is:
<myWebsite>
+--<myAppVDir>
+--Bin
+--images
With the files in my app's V-Dir being:
all the aspx files, globa.asax, styles.css
dataconfiguration.config
web.config
Content of /bin:
My project's dll
Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.EnterpriseLibrary.Configuration.dll
Microsoft.Practices.EnterpriseLibrary.Data.dll
I have set a project-level Imports for the
Microsoft.Practices.EnterpriseLibrary.Data
The production versions of web.config and dataconfiguration.config files
have been modified to use the production instance of the SQL dbo.
I've narrowed down my problem specifically to the db.ExecuteReader method
used to load the IDataReader.
In Page_Load, call is made to method for retrieving users email address:
Private Sub GetStaffEmail()
Dim db As Database = DatabaseFactory.CreateDatabase
Dim cmd As DBCommandWrapper =
db.GetStoredProcCommandWrapper("usp_OnLine_EmailAddr_for_Staff_SELECT")
Dim dataReader As IDataReader
'Add the required parameter:
cmd.AddInParameter("@ExtranetUSID", DbType.Int32, Me.intUSID)
Try
'Execute command and retrieve data:
dataReader = db.ExecuteReader(cmd) ' <--- Fails. Triggers exception
....
Catch
....
Finally
'Dispose of dataReader
....
End Try
End Sub
I have not installed or run any process specifically for the EntLib on the
server, other than copy the three DLL's as outlined above.
Should I run/install the EntLib MSI and then run the "Install Services"
batch file?
Being cautious, I avoid installing anything I don't have to on the
production server.
Is there anything else I should be aware of to implement the EntLib DAAB?
Thanks for any pointers.
Al