469,133 Members | 1,019 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,133 developers. It's quick & easy.

Data Acess aplication block

Hi

I have Microsoft Enterprise Library 2005 installed on my local system.
I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
Server 2000.

I am developing a web application in which i am using data Access
Application Block for data access.

I have a remote web n data server with asp.net 1.1 support

the application is working fine here on the local server(web & data).

when i change the data server path to the remote server it also working
fine but
When I uploaded the application on the remote server n tested there it
gives me the following err
ex.message was

>>>>>The type initializer for
>"Microsoft.Practices.EnterpriseLibrary.Data.I nstrumentation.DataConnectionFailedEvent"
>threw an exception.
ex.Source was

.............Microsoft.Practices.EnterpriseLibrary .Data

ex.trace was

at
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataConnectionFailedEvent.Fire(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataInstrumentationFacade.ConnectionFaile d(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.OpenConnection() at
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.ExecuteReader(DBCommandWrapper
command) at property.m4.Button2_Click(Object sender, EventArgs e)
Plz help me why this is happening...........

Mukesh Kumar agarwal
Delhi
India

Sep 9 '06 #1
6 3895
Mukesh,

Are you sure that the user that ASP.NET is running under has access to
the database you are trying to reach? It seems as if this is an error on
connecting.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mukesh" <ef*****@newsgroups.nospamwrote in message
news:u6**************@TK2MSFTNGP05.phx.gbl...
Hi

I have Microsoft Enterprise Library 2005 installed on my local system.
I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
Server 2000.

I am developing a web application in which i am using data Access
Application Block for data access.

I have a remote web n data server with asp.net 1.1 support

the application is working fine here on the local server(web & data).

when i change the data server path to the remote server it also working
fine but
When I uploaded the application on the remote server n tested there it
gives me the following err
ex.message was

>>>>The type initializer for
"Microsoft.Practices.EnterpriseLibrary.Data.In strumentation.DataConnectionFailedEvent"
threw an exception.

ex.Source was

............Microsoft.Practices.EnterpriseLibrary. Data

ex.trace was

at
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataConnectionFailedEvent.Fire(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataInstrumentationFacade.ConnectionFaile d(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.OpenConnection() at
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.ExecuteReader(DBCommandWrapper
command) at property.m4.Button2_Click(Object sender, EventArgs e)
Plz help me why this is happening...........

Mukesh Kumar agarwal
Delhi
India



Sep 9 '06 #2
The error you are getting is because the enterprise library wants to write
events to the event log and setting this up requires registry permissions.
You need to installutil the dlls for the enterprise library (this is covered
in the docs somewhere). The reason it is writing to the event log is because
the connection failed. If you setup the event log access correctly then you
will have an eventlog entry telling you why the connection failed.

HTH

Ciaran O'Donnell

"Mukesh" wrote:
Hi

I have Microsoft Enterprise Library 2005 installed on my local system.
I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
Server 2000.

I am developing a web application in which i am using data Access
Application Block for data access.

I have a remote web n data server with asp.net 1.1 support

the application is working fine here on the local server(web & data).

when i change the data server path to the remote server it also working
fine but
When I uploaded the application on the remote server n tested there it
gives me the following err
ex.message was

>>>>>The type initializer for
>>>>>"Microsoft.Practices.EnterpriseLibrary.Data.I nstrumentation.DataConnectionFailedEvent"
>>>>>threw an exception.

ex.Source was

.............Microsoft.Practices.EnterpriseLibrary .Data

ex.trace was

at
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataConnectionFailedEvent.Fire(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataInstrumentationFacade.ConnectionFaile d(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.OpenConnection() at
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.ExecuteReader(DBCommandWrapper
command) at property.m4.Button2_Click(Object sender, EventArgs e)
Plz help me why this is happening...........

Mukesh Kumar agarwal
Delhi
India

Sep 9 '06 #3
Hello Mukesh,

I think Ciaran's suggestion is reasonable since the enterprise library will
perform instrumentatino and log data into multiple event storages(such as
eventlog, WMI category...). Have you tried manually installing the
instrumentation on the problem server to see whether it helps?

BTW, if convenient, would you provide us the complete exception message+
call stack since that can be helpful to trace the complete code path.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Sep 11 '06 #4
Hi all

As per my earlier conversation with Ciaran (thx for reply) I have
installed the MS APplication block on the server , when i ran Build
Enterprise Library file and Install Services from (batch files )
programme files menu it was asking for visual studio 2003 , I have only
.net framework on the server how can i use the MS application block
data access library on my server plz help...

Mukesh Agarwal
mu*********@gmail.com
Delhi India

Ciaran O''Donnell wrote:
The error you are getting is because the enterprise library wants to write
events to the event log and setting this up requires registry permissions.
You need to installutil the dlls for the enterprise library (this is covered
in the docs somewhere). The reason it is writing to the event log is because
the connection failed. If you setup the event log access correctly then you
will have an eventlog entry telling you why the connection failed.

HTH

Ciaran O'Donnell

"Mukesh" wrote:
>Hi

I have Microsoft Enterprise Library 2005 installed on my local system.
I m also using ASp.net 1.1 And C3 as coding language , I have MS Sql
Server 2000.

I am developing a web application in which i am using data Access
Application Block for data access.

I have a remote web n data server with asp.net 1.1 support

the application is working fine here on the local server(web & data).

when i change the data server path to the remote server it also working
fine but
When I uploaded the application on the remote server n tested there it
gives me the following err
ex.message was

> >>>>>The type initializer for
>>"Microsoft.Practices.EnterpriseLibrary.Data.I nstrumentation.DataConnectionFailedEvent"
>>threw an exception.

ex.Source was

.............Microsoft.Practices.EnterpriseLibrar y.Data

ex.trace was

at
Microsoft.Practices.EnterpriseLibrary.Data.Instru mentation.DataConnectionFailedEvent.Fire(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Instru mentation.DataInstrumentationFacade.ConnectionFail ed(String
connectionString) at
Microsoft.Practices.EnterpriseLibrary.Data.Databa se.OpenConnection() at
Microsoft.Practices.EnterpriseLibrary.Data.Databa se.ExecuteReader(DBCommandWrapper
command) at property.m4.Button2_Click(Object sender, EventArgs e)
Plz help me why this is happening...........

Mukesh Kumar agarwal
Delhi
India

Sep 11 '06 #5
Hi Mukesh,

As for the Enterprise Library(2005) for .net framework 1.1, the
instrumentation services does need to be installed separately. And the
"install services" bat file does require the VS 2003 IDE installed on the
machine. Actually this is because instrumetation feature is mainly used in
development environment. For production environment, generally we do not
use them and can disable the setting at compilation time(through some build
flags).

Therefore, for your scenario, you can consider the following options:

1. Build a product version of the enterprise library which disable the
instrumentation in the build options(some conditional compile variables).

2. Instead of using the "Install Services" bat file, use the
InstallUtil.exe utility(shipped with .net framework 1.1 rather than vs
2003) to register the instrumentation service against each enterprise
library assembly (you will use in your application).

Here is a blog article from the product manager of enterprise library
(pattern&practice team) which has provide a complete description on the
instrumentation services of Enterprise library 2005(.net 1.1) and how to
disable it in custom build or install the service without VS 2003 IDE:

#Instrumentation in Enterprise Library
http://blogs.msdn.com/tomholl/archiv...18/376187.aspx

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 12 '06 #6
Hello Mukesh,

Have you got any progress on the enterprise library instrumentation issue
or does the information in my last reply helps some? Please feel free to
post here if there is anything else we can help.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 14 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Fernando Lopes | last post: by
3 posts views Thread by Rachel | last post: by
1 post views Thread by Mukesh | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.