Welcome to our forums...

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Forum Statistics

  • Forum Members:
  • Total Threads:
  • Total Posts: 1
There are 1 users currently browsing forums.
.Net Programming A powerful framework built by Microsoft to facilitate development in Windows platforms.

Reply
  #1  
Old 03-14-2010
Child
 
Join Date: Oct 2008
Location: Israel
Age: 28
Posts: 84
Rep Power: 2
Dimkin is on a distinguished road
Wcf service and database

Hello,
I have this sevice that should work with database and send query results to the clients. The service itself works with DAL and has a typed dataset to connect to the database.
I run the service with console application project using the ServiceHost instance. (found in System.ServiceModel)
Code:
using (ServiceHost host = new ServiceHost(typeof(Service1)))
{
       host.Open();
       Console.ReadLine();
}
Everything runs smoothly until I try to fill onc of the tables with the adapter provided by the data set.
When the fill function fired I get the following exception:
"Object reference not set to an instance of an object"

After testing I've undertood that this exception can be solved by putting the host launcher and the service itself in the same project under Visual Studio. But that wasn't the original idea.

Can somone help please?

Thanks ,
Dimkin
Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Your Own Backup Service hostthebest Marketplace & Ad Rack 0 01-18-2009 10:38 AM