Click here to Skip to main content
15,887,256 members
Home / Discussions / C#
   

C#

 
QuestionCrystal Reports Pin
GermanDM5-May-08 3:51
GermanDM5-May-08 3:51 
QuestionPass DataGridView to a UserControl Pin
mariusth5-May-08 3:51
mariusth5-May-08 3:51 
QuestionThreading question Pin
kensai5-May-08 3:48
kensai5-May-08 3:48 
AnswerRe: Threading question Pin
carbon_golem5-May-08 4:05
carbon_golem5-May-08 4:05 
AnswerRe: Threading question Pin
S. Senthil Kumar5-May-08 4:11
S. Senthil Kumar5-May-08 4:11 
GeneralRe: Threading question Pin
kensai5-May-08 21:28
kensai5-May-08 21:28 
Questionrunning script using Sqlcmd Pin
Denver Thomas5-May-08 3:45
Denver Thomas5-May-08 3:45 
QuestionInvalid Cast Problem using Enterprise Library MS DAAB (with dynamic dll loading) Pin
Pankaj Chamria5-May-08 3:21
Pankaj Chamria5-May-08 3:21 
Hi,
I am loading a dll say XYZ.dll dynamically from console application by using activator.createinstance() method. This XYZ.dll is having reference to a data access layer ABC.dll which has reference to the 3 MS-DAAB dlls of enterprise library:
1. Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings
2. Microsoft.Practices.EnterpriseLibrary.Data
3. Microsoft.Practices.ObjectBuilder

I have placed these 3 dlls and ABC.dll in the folder with the exe of console application. However XYZ.dll is not placed there as it will be loaded at runtime specifying a certain path. Now when I try using code which uses the MS DAAB dlls then I am getting an error:

Unable to cast object of type 'Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings' to type 'Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings'

(I do not get this error when I am not dynalically loading the dll)
Note: I have specified the dataConfiguration section in App.config of Console Application.

Any help is appreciated.

Pankaj Chamria,
Software Programmer.

QuestionAdding Active Directory Users to local Groups Pin
André Stroebel5-May-08 3:05
André Stroebel5-May-08 3:05 
AnswerRe: Adding Active Directory Users to local Groups Pin
André Stroebel5-May-08 3:26
André Stroebel5-May-08 3:26 
QuestionDataGridView Selection Pin
stancrm5-May-08 3:03
stancrm5-May-08 3:03 
AnswerRe: DataGridView Selection Pin
Csharp™5-May-08 10:46
Csharp™5-May-08 10:46 
QuestionHow to global access from other forms? Pin
daden2035-May-08 2:53
daden2035-May-08 2:53 
AnswerRe: How to global access from other forms? Pin
Christian Graus5-May-08 2:54
protectorChristian Graus5-May-08 2:54 
GeneralRe: How to global access from other forms? Pin
daden2035-May-08 3:16
daden2035-May-08 3:16 
Questionwhat happens if value is longer than fieldlength Pin
stephan_0075-May-08 2:45
stephan_0075-May-08 2:45 
AnswerRe: what happens if value is longer than fieldlength Pin
Christian Graus5-May-08 2:55
protectorChristian Graus5-May-08 2:55 
AnswerRe: what happens if value is longer than fieldlength Pin
Gareth H5-May-08 2:55
Gareth H5-May-08 2:55 
GeneralRe: what happens if value is longer than fieldlength Pin
stephan_0075-May-08 3:00
stephan_0075-May-08 3:00 
GeneralRe: what happens if value is longer than fieldlength [modified] Pin
stephan_0075-May-08 3:03
stephan_0075-May-08 3:03 
AnswerRe: what happens if value is longer than fieldlength Pin
SomeGuyThatIsMe5-May-08 2:57
SomeGuyThatIsMe5-May-08 2:57 
GeneralRe: what happens if value is longer than fieldlength Pin
stephan_0075-May-08 3:16
stephan_0075-May-08 3:16 
GeneralRe: what happens if value is longer than fieldlength Pin
SomeGuyThatIsMe5-May-08 3:31
SomeGuyThatIsMe5-May-08 3:31 
QuestionUsing "DictationGrammar" to dictate a URL Pin
thoraia5-May-08 2:37
thoraia5-May-08 2:37 
QuestionDynamic workflow Project Pin
Thaer Hamael5-May-08 2:00
Thaer Hamael5-May-08 2:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.