Quantcast
Channel: patterns & practices – Enterprise Library
Viewing all 1928 articles
Browse latest View live

New Post: Unhandled exception from SqlCeDataReader.Finalize

$
0
0
Hello

I have a piece of code where we use SqlCeDatabase class as below
sqlCeDatabase.ExecuteResultSet(command, options, parameters);
If the command passed is an invalid one, we get an exception and we handle it with try-catch

But after some time an unhandled exception is thrown from SqlCeDataReader.Finalize() with following trace
<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical">
<TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier>
<Description>Unhandled exception</Description>
<AppDomain>xxx.vshost.exe</AppDomain>
<Exception>
<ExceptionType>System.ArgumentNullException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType>
<Message>Value cannot be null.</Message>
<StackTrace>   at System.Threading.Monitor.Enter(Object obj)
   at System.Data.SqlServerCe.SqlCeDataReader.Dispose(Boolean disposing)
   at System.Data.SqlServerCe.SqlCeDataReader.Finalize()</StackTrace>
<ExceptionString>System.ArgumentNullException: Value cannot be null.
   at System.Threading.Monitor.Enter(Object obj)
   at System.Data.SqlServerCe.SqlCeDataReader.Dispose(Boolean disposing)
   at System.Data.SqlServerCe.SqlCeDataReader.Finalize()</ExceptionString>
</Exception>
</TraceRecord>
If I comment out SqlCeDatabase.ExecuteResultSet, there is no unhandled exception.

Since the ExecuteResultSet call throws exception there is no SqlCEResultSet to dispose. I would like to know why the Finalize of DataReader is invoked, as the exception was thrown before the reader is initialized?

New Post: Trying to migrate Enterprise Library version 1 to version 6

$
0
0
Hi I need to Migrate .Net code with enterprise library version 1 to version 6.
But I am not able to get following the libraries in latest version:

Microsoft.Practices.EnterpriseLibrary.Caching
Microsoft.Practices.EnterpriseLibrary.Security
Microsoft.Practices.EnterpriseLibrary.Security.Database
Microsoft.Practices.EnterpriseLibrary.Data.DB2

I hav also found that some application bloacks are removed in version 6, but what to use instead.Please help !!

New Post: Fw(2): srinivas k

New Post: Sample Application for Enterprise Library 6

$
0
0
I am upgrading an existing project using Enterprise library (an older version). The code is working but I don't really understand the connections so I looked for and found the sample application.

Unfortunately, the sample doesn't work. I keep getting the following error:

"Exception type System.Data.SqlClient.SqlException was thrown. Message: A network-related or instance-specific error occurred while establishing a connect to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interface, error:50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.); Source: '.Net SqlClient Data Provided' No Inner Exception.

So obviously the example app is not working. I am running VS 2015 update 3 and windows 7.

New Post: Sample Application for Enterprise Library 6

New Post: Defining alternate filename for files that are locked by other process

$
0
0
Hi,

I notice when I run 2 or more instances of my application concurrently, the first instance will use the file with the filename defined in the configuration file. However, the second and later instance will log it into different files with <GUID><filename>.<extension>.

for example:
filename: traceFile.log
The first instance will use traceFile.log. The second instance will use <GUID>traceFile.log.

Is it possible to define alternate name for the second and later instance. say something like traceFile_01.log is for the second instance and traceFile_02.log is for the third instance and so on?

or is it possible for all instance log to the same file?

Reviewed: Enterprise Library 6 - April 2013 (8月 09, 2017)

$
0
0
Rated 4 Stars (out of 5) - 正好,下载来看看,学习学习

New Post: Enterprise Library 5 Logging rolling file not working with Logger.Reset()

$
0
0
We use Enterprise Library 5 and notice the log file stops rolling if we call Logger.Reset() after Logger.Write call. The reason we use Logger.Reset() is some memory leak was detected if the Writer is not disposed from previous Logger.Write calls.

Does anybody notice this behavior?

Viewing all 1928 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>