The WCF service runs in my IDE but does not run on my webserver after publishing

Posted on 2014-07-17
Last Modified: 2014-08-16
I wrote a Little test program. A Website with a button.
The button calls a method of my wcf Service. This Returns a string.
The string is displayed in a TextBox.

Everything is fine when i press F5 to start debugging in the IDE of Visual Studio 2013.

Now i publish my application, call the Website. The button is Display but when I click on it...nothing happens.
 On the Webserver I have IIS 7 and Windows Server 2008 DataCenter

Is there any component missing on my webserver...How can I detect whats missing. Do I have to Register the wcf Service in IIS ?

Thanx for your help
Question by:sb67pro
    LVL 74

    Expert Comment

    by:käµfm³d 👽
    Are you catching exceptions in your code? If so, are there any exceptions?

    Author Comment

    its only a little testpgm
    At the Moment I do not catch any exception

    Should I do this ?
    LVL 74

    Accepted Solution

    If your WCF is throwing any exceptions, then how would you know if you don't catch them? There could be an exception that is being generated, causing your code not to function as expected.

    Author Comment

    Hi kaufmed,

    now I have more detailled information about myproblem...
    The event is fired when click in my button. The control gets back

            public void svc_GetDataCompletedWelcome(object sender, ServiceReference1.GetWelcomeCompletedEventArgs e)
                string mytext;

                    MessageBox.Show("Welcome is back 1....");
                    textbox1.Text = "Testtext";
                    MessageBox.Show("Welcome is back 2....");
                    mytext = e.Result;       /// Here I get the exception
                    MessageBox.Show("Welcome is back 3....");
                    textbox1.Text = mytext;
                    MessageBox.Show("Welcome is back 4....");
                    MessageBox.Show("Welcome aborted.");
                MessageBox.Show("Welcome successfull.");

    The Exception is thrown when in the line mytext = e.Result
    why this ?

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API ( has made its way into the popular lexicon of the English language.  A few years ago, …
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now