Getting Error : While hosting WCF service over Window Service


I created one window service project in visual studio 2005 and added following files
after adding dll of system.ServiceModel and system.ServiceProcess

namespace CheckingWcFApplication
    public interface IService
        void ModifyServiceData();

namespace CheckingWcFApplication
    public class Service : IService
        public void ModifyServiceData()
            CommonData data = CommonData.Instance;
            data.IsModified = true;

and for hosting WCF over window service i written:

namespace CheckingWcFApplication
    public partial class CheckWCFApplication : ServiceBase, IService
         public ServiceHost serviceHost = null;
         public bool isModified = false;

        public void Test()
            this.serviceHost = new ServiceHost(typeof(CheckWCFApplication), new Uri("http://localhost:8000/CheckingWcFApplication/service"));


        protected override void OnStart(string[] args)

            this.serviceHost = new ServiceHost(typeof(CheckWCFApplication), new Uri("http://localhost:8000/CheckingWcFApplication/service"));


        protected override void OnStop()
            this.serviceHost = null;

        public void ModifyServiceData()
            isModified = true;

And Added app.config file :

<?xml version="1.0" encoding="utf-8" ?>

      <service name="CheckingWcFApplication.Service">
            <add baseAddress="http://localhost:8000/CheckingWcFApplication/service"/>
        <!-- this endpoint is exposed at the base address provided by host: http://localhost:8000/ServiceModelSamples/service  -->
        <endpoint address=""
                  contract="CheckingWcFApplication.IService" />
        <!-- the mex endpoint is explosed at http://localhost:8000/ServiceModelSamples/service/mex -->
        <endpoint address="mex"
                  contract="IMetadataExchange" />
        <behavior name="MyServiceTypeBehaviors">
          <serviceMetadata httpGetEnabled="true"/>


This code is not giving me any compillation error and when i am tring to start the service i m getting the error:

Service 'CheckingWcFApplication.CheckWCFApplication' has zero application (non-infrastructure) endpoints. This might be because no configuration file was found for your application, or because no service element matching the service name could be found in the configuration file, or because no endpoints were defined in the service element.

I am understanding what is going wrong here..Please any one help me to make this WCF service working and hosting over window service and please
tell me how to consume this WCF application from client application(ASP web application)



8/19/2008 6:43:11 AM 7760 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 33


it might help 

Kamran Shahid
Sr. Software Engineer
Netprosys Inc.

Remember to click "Mark as Answer" on the post that helps U
8/19/2008 7:50:15 AM

Similar Artilces:

Converting windows application using web service from Visual 2003 to Visual 2005
Hello, everyone! I have a solution which contains a windows project,a web service project and several other library projects. These projects were coded under visual 2003. Now I need to converted them to use Visual 2005. Does any one know any article providing step-by-step guide  to converting WINDOWS APPLICATION with web service? I can find one under MSDN for converting web project.  But I guess I am a little confused if mine should follow this article since I am using web service in my windows application? Thanks a lot in advance.  ...

Windows Service
I'm having difficulty with my windows service, I've created it in Visual Studio C# - the service runs but nothing seems to be happining can anyone help?I have the connectionstring in the app.config filein the design i've got a timer component enabled to false with interval set to 30000 this is the service1.cs code:public CreateXml() { InitializeComponent(); } protected override void OnStart(string[] args) { this.timer1.Enabled = true; } protected override void OnStop() { ...

Sql Server 2005 Reporting Service + Visual Studio.NET 2005
Hi, Iam new 2 sql server 2005 reporting services, I created a report server project with few reports and deployed in reportserver. Everything is working fine but i want to integrate these reports to my 2005 web appliction. Through the interface i have to pass the perameters to my reports. Iam looking for help thxs in advance PradeepPradeep Reddy Take a look over here for a working example :   HTH,Suprotim Agarwal ----- Grid With Excel Capabilities | 27 GridView Tips & Tricks |...

SQL Server Reporting Services for SQL SERVER 2000 AND Visual Studio.NET 2005 .NET 2.0
Hi, Which version of SQl Server Reporting Services will work with SQL SERVER 2000 in pararrel with ASP.NET 2.0 (.NET 2.0 framework)?  Thanks, Azam HighOnCodingWanna get high! Hi, Okay I got the answer. Yes, we can use the SQL SERVER 2005 Reporting Services with SQL SERVER 2000. HighOnCodingWanna get high! ...

Getting Errors on visual studio .NET 2005 still it is working.
Im getting this errors but when u try to run it its ok. here the html source code.1 <%@ Page Language="VB" MasterPageFile="MasterAdmin.master" AutoEventWireup="false"2 CodeFile="orders.aspx.vb" Inherits="orders" %>3 4 <asp:Content ID="corder" runat="server" ContentPlaceHolderID="Main">5   6 <asp:GridView ID="GVorders" runat="server" AllowPaging="True" AutoGenerateColumns="False"7 BackColor="White" B...

Migrating from Visual Studio .NET 2003 Windows Application to Visual Studio 2005 Web Application
How do I migrate a Visual Studio .NET Windows Application to Visual Studio 2005 Web Application. Are there any tools available for this.  As far as I know there is no direct migration path. You convert VS2003 to VS2005 and then to VS2005 Web Application.Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. manish kumar: How do I migrate a Visual Studio .NET Windows Application to Visual Studio 2005 Web Application. Are there any tool...

Visual Studio 2005 Edition Released! Is it the same as Visual Studio.Net 2005 ?
Edited by XIIIVisual Studio 2005 Edition Released! Is it the same as Visual Studio.Net 2005 ? Yes. ".NET" part is not actually/officially part of the Visual Studio 2005 name.-- Mike PopeASP.NET User EducationThis posting is provided "AS IS" with no warranties, and confers no rights. Is it Visual Studio .NET 2003 update version? Does Microsoft change its name? I'm not sure I understand your question exactly -- I'm a little thrown by the word "update." Visual Studio 2005 is the new/current version, released on Monday. This product never officially had the word ".NET" in its nam...

Sql Server 2005 Reporting Service ReportViewer Control and Visual Studio.NET 2003
Hi, We have an ASP.NET 1.1 Application that is written using VS2003 but using SQL Server 2005 as database. Can we use Report Viewer Control that comes with SQL Server 2005 in our ASP.NET 1.1 Application?If not, Can some one suggest some alternative way of showing SQL Server 2005 Reports in ASP.NET 1.1  appllication.  ...

why did i get prompt widow to request Reporting Services Login when i tried to deploy a report through Visual Studio 2005?
at work the reporting server has been set up by others.  when i create a report, i just deploy it without having to login.  i just installed reporting server at home computer.  i chose windows authentication and checked the box to add the installer as administrator.  now when i try to deploy a report, i was asked to login to the server http://localhost/ReportServer with user name and password.  I didn't set up user name or password.  i tried to click ok without filling anything but it didn't work.  could anybody tell me why i am required to...

I can't install Visual Studio .NET 2003 on Windows XP Professional with Service Pack 2
Hi guys, I've been having problem installing Visual Studio .NET 2003 on my Windows XP Professional ever since I installed service pack 2. Whenever I run the setup, I always receive the error message telling me there is a newly installed program that requires me to reboot my system, please click OK to reboot now or click cancel to run the setup again later. I'm really puzzled by that as I have no problem installing it on Windows XP Professional with Service Pack 1. Thanks a million. Regards,Jenson Reinstall the Service pack 2, and restart the PC, afterthat run the setup of VS 2003.NET.G...

Loading Visual 2003 on a pc with Visual 2005 installed
I have recently installed Visual 2005 on a pc and have been using it to create a .net 2.0 application. I also have pc running Visual Studio 2003 that I use to support a .net 1.1 application. This pc has broke. Would I be ok loading Visual Studio 2003 on the machine I have running Visual Studio 2005 so I can manage both the .net 1.1 and the .net 2.0 applications?               Thanks Danny Hmmm. Not sure if it works in that direction, but I installed VS2005 on a machine that has VS2003 already installed and they se...

can we migrate visual studio .net 2003 project to visual 2005
Hai friends, I am doing project in ASP.NET(vb language)  I have visual studio .net 2003 installed in my pc and i am doing my project in it , because i need to use additional functionality like "AJAX" , i want to use visual studio .net 2005 or visual studio .net 2008 my project folder name is "sqls" can i install visual studio .net 2005 or visual studio .net 2008 and migrate this project folder to work in visual studio .net 2005 or visual studio .net 2008 i have uninstall visual studio .net 2003 and install visual studio .net 2005 or visual ...

An object data source in the Website Data Sources window doesn't appear for a Web Services in Visual Studio 2005
Hello,  I have created a Web Service (ASMX). Everything is fine.   In ASP.NET Web Application, web reference is added for the web service (ASMX). I can access web methods. Works fine till this point.   But unable to see referenced class in Website Data Sources. Our requirement is populate report with web service data.   I have done the same thing with Web Site (project type). Things are perfect here.   Kindly through some idea, to resolve the above issue   (want to see website data source in Web Application project).    Your ...

Error in hosting WCF Service
 Hi Everyone,I have devloped a web service using WCF in .NET 3.5 I tried to deploy the service on Shared Hosting server which has IIS 6.0 I get this error when I try to open the service through URL.IIS specified authentication schemes 'IntegratedWindowsAuthentication, Basic, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.  I googled it and found a reply to change the ...

Web resources about - Getting Error : While hosting WCF service over Window Service -

The Fifth Republican Debate Ends In A Nine-Way Draw
The Republican debate in Las Vegas on Tuesday night had the feeling of a soccer match that ended in a nil-nil draw. It was a tactical and defensively ...

LA schools threat disrupts many people's daily routines
Los Angeles Times LA schools threat disrupts many people's daily routines Los Angeles Times "What are people going to do? They're going to ...

Australia banks agree Android Pay deal, Apple Pay still frozen out
By Swati Pandey SYDNEY (Reuters) - Big Australian banks have agreed to accept payments made on mobile devices using Google Inc's Android Pay, ...

First Trailer for Fantastic Beasts and Where to Find Them Drops
The key to the ignition of the hype engine has officially been turned — a month after its coming out party in the pages of Entertainment Weekly ...

Space station gets its first ‘official’ British astronaut
Today the International Space Station’s crew welcomed aboard its first “official” British astronaut, Tim Peake, just hours after he blasted off ...

‘Super Smash Bros’: Bayonetta And Corrin Join Cloud As Final Three Fighters, Amiibos Coming Too
A Nintendo Direct livestream presented the final new characters for Super Smash Bros. for Nintendo 3DS and Wii U. Final Fantasy VII ‘s Cloud ...

Damning report says officers are missing 'obvious indicators of suspicion' such as violence when investigating ...
A Home Office study revealed UK police are making blunders when investigating crime scenes that are likely to be letting murderers and other ...

Saudi Arabia forms Muslim 'anti-terrorism' coalition
Alliance includes 34 mainly Muslim states but excludes regional rival Iran as well as Iraq and Syria.

Grooveshark clone slammed with damages in lost court case
Following the original Grooveshark’s demise, a cloned version of the service was brought to life in early May of this year, just a few days after ...

Nuance’s voice control going where Siri, Google Now and Cortana fall short
Nuance, the company behind some of the voice technology used for Samsung's S Voice and Apple’s Siri, is ready to go where no other digital assistant ...

Resources last updated: 12/16/2015 7:51:41 AM