Last post Jul 27, 2005 05:25 PM by LesioS
Jul 27, 2005 02:34 AM|lesios|LINK
I'm starting new project & want to take some training in Enterprise Library. So I've made simple winform and have added into references to Enterprise dll Data and Configuration, but not to Common (which BTW is also copied into
I've following code:
private void button1_Click(object sender, System.EventArgs e)
if(ofdPlikDanych.ShowDialog() == DialogResult.OK)
fileName = ofdPlikDanych.FileName;
Database db = DatabaseFactory.CreateDatabase(); <<<<
Compilation goes well, but on run-time when execution reaches
<<<< point my personal firewall reports that myapp.exe calls csc.exe compiler and after that System.InvalidCastException ("Specified cast is not valid.") is thrown.
During execution EntLib DataAccess samples csc.exe is not called and everything goes well.
Could anyone explain me what I'm doing wrong?
Jul 27, 2005 05:49 AM|haidar_bilal|LINK
Jul 27, 2005 06:55 AM|lesios|LINK
Jul 27, 2005 07:01 AM|haidar_bilal|LINK
Jul 27, 2005 07:25 AM|lesios|LINK
Jul 27, 2005 05:25 PM|lesios|LINK
I've tried to load my app.config file to EntLIb Configuration tool and received... unhandled exception [:)] So I've created the same confoguration file and found the difference. Lack of tag
name="Xml Serializer Transformer">
in my config file was reason of exception throwing. In fact my app during runtime was calling csc compiler what was catch by my firewall, but after permanent permit for such call everything looks good now [;)]