2
Answers

wcf can't query sql database

Photo of Tom Muz

Tom Muz

8y
344
1

 Hello everyone.  For a day I'm trying to figure out why my application can't get data from sql database when I host wcf service in command line application. All works perfectly when I host  WCF service in Visual Studio Service Host. When I host in command line I'm getting an exception. Intresting is when I call  others wcf methods (which are not query database), then it works in command line application host.

Please help !!!
 
 

 

Attachment: wcf.zip

Answers (2)

0
Photo of Dipen Lama
NA 331 195.9k 18y
Use Place holder control to place the user control dynamically.
Here is some lines:

    string userControlName = "UserControl1.ascx"; 
 
    Control control1 ;
    control1 = LoadControl( userControlName );
    placeHolderControl1.Controls.Clear();
    placeHolderControl1.Controls.Add( control1 );