The type 'WcfService1.Service1', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
It's trying to find Wcf1Service1.Service1. To change to your current service name, example:
public class TestService : IService1 { public string GetData(int value) { return string.Format("You entered: {0}", value); } }
...from Solution Explorer, right-click Service1.svc, choose Open With..., select XML (Text) Editor, click OK, change this...
<%@ ServiceHost Language="C#" Debug="true" Service="WcfService1.Service1" CodeBehind="Service1.svc.cs" %>
...To:
<%@ ServiceHost Language="C#" Debug="true" Service="WcfService1.TestService" CodeBehind="Service1.svc.cs" %>
mate, I searched the whole freakin internet and I cant believe you're the only one that presented this information. Thank you very much!
I searched a lot but this is perfect .Thank you verymuch
Thanks dude, you saved me a lot of time
I also searched the entire net for solution. You gave the correct solution. Thank you.
Fianaly SVC file contains should be
<%@ ServiceHost Language="C#" Debug="true" Service="WcfService1.Service1" CodeBehind="Service1.svc.cs" %>
Importantly you need to clean and rebuild the solutin too
worked for me.. thanks a lot
Thanks for this , you save my day !! :)
Great tip. Solved an issue with a namespace change for my service.
this was very helpful.. thx a lot dude
thanks a lot from spain , i was looking for two days
Thank you, thank you, thank you! This was extremely helpful and kept me from starting over from scratch for the fifth time!
Thanks Dude for this help
Thanks a lot
After a lot of time on Google..Finally I got it what i was looking for...Thanx a ton for your valuable solution for my Problem
Awesome, thank you!!!!!
Thanx a lot... i searched almost about an hour luckily got ur post...thankyou
You are the man. After 2 hours, you saved me
Seriously, what would have otherwise typically amounted to hours of banging my head against a wall, this time did not because of this extremely helpful post. My gratitude
Man you saved my live! Thanks, God bless you!!
Thanks.l
Thanks..
You sir are a life saver. Thanks a bunch
After 4 hours of searching... this helped. Thank you.
Hey Thanks Buddy..It woked for me..good Effort..
Thank you, it saves me.
Thanks, you are the only who has the solution
Searched for ages before finding this simple solution - Thanks
Thanks a lot it really helpful.
You save my day.