• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • Last Modified:

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

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
0
sb67pro
Asked:
sb67pro
  • 2
  • 2
1 Solution
 
käµfm³d 👽Commented:
Are you catching exceptions in your code? If so, are there any exceptions?
0
 
sb67proAuthor Commented:
its only a little testpgm
At the Moment I do not catch any exception

Should I do this ?
0
 
käµfm³d 👽Commented:
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.
0
 
sb67proAuthor Commented:
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;

            try
            {
                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....");
            }
            catch
            {
                MessageBox.Show("Welcome aborted.");
                return;
            }
            MessageBox.Show("Welcome successfull.");
        }

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now