1
Answer

How to solve the error "serviceActivation not found" in WCF

Photo of Guruprakash C

Guruprakash C

7y
337
1
I'm trying to display list of details from database using wcf but i got an error while running my service.
The error is "Failed to add a service. Service metadata may not be accessible. Make sure your service is running and exposing metadata." in detail as "Error: Cannot obtain Metadata from http://localhost:49825/Playstack.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: http://localhost:49825/Playstack.svc Metadata contains a reference that cannot be resolved".
I have tried by looking into url provided by many sites but error is not debugged.
What i have tried is:
  1. <system.serviceModel>  
  2.     <services>  
  3.       <service name="Playstack.Playstack" behaviorConfiguration="ps">  
  4.         <endpoint address="Playstack" binding="basicHttpBinding" contract="Playstack.IPlaystack"/>  
  5.         <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>  
  6.         <host>  
  7.           <baseAddresses>  
  8.             <add baseAddress="http://localhost:49825/"/>  
  9.           </baseAddresses>  
  10.         </host>  
  11.        </service>  
  12.     </services>   
  13.     <behaviors>  
  14.       <serviceBehaviors>  
  15.         <behavior name="ps">  
  16.           <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" httpGetBinding="basicHttpBinding"/>  
  17.         </behavior>  
  18.       </serviceBehaviors>  
  19.     </behaviors>  
  20.   </system.serviceModel>  
 

Attachment: PlaystackWs.zip

Answers (1)

1
Photo of Frogleg
NA 7.9k 33k 12y
Here
drag a timer onto form and set interval to 1
 public partial class Form1 : Form
  {
  int milli = 0;
  public Form1()
  {
  InitializeComponent();
  }

  private void button1_Click(object sender, EventArgs e)
  {
  timer1.Start();
  }

  private void timer1_Tick(object sender, EventArgs e)
  {
  milli++;
  label1.Text = milli.ToString();
  }
  }
0
Photo of Jane Abrams
NA 3 2.3k 12y
The result is not in milliseconds