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!
ReplyDeleteI searched a lot but this is perfect .Thank you verymuch
DeleteThanks dude, you saved me a lot of time
ReplyDeleteI also searched the entire net for solution. You gave the correct solution. Thank you.
ReplyDeleteFianaly 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
ReplyDeleteThanks for this , you save my day !! :)
ReplyDeleteGreat tip. Solved an issue with a namespace change for my service.
ReplyDeletethis was very helpful.. thx a lot dude
ReplyDeletethanks a lot from spain , i was looking for two days
ReplyDeleteThank you, thank you, thank you! This was extremely helpful and kept me from starting over from scratch for the fifth time!
ReplyDeleteThanks Dude for this help
ReplyDeleteThanks a lot
ReplyDeleteAfter 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
ReplyDeleteAwesome, thank you!!!!!
ReplyDeleteThanx a lot... i searched almost about an hour luckily got ur post...thankyou
ReplyDeleteYou are the man. After 2 hours, you saved me
ReplyDeleteSeriously, 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
ReplyDeleteMan you saved my live! Thanks, God bless you!!
ReplyDeleteThanks.l
ReplyDeleteThanks..
ReplyDeleteYou sir are a life saver. Thanks a bunch
ReplyDeleteAfter 4 hours of searching... this helped. Thank you.
ReplyDeleteHey Thanks Buddy..It woked for me..good Effort..
ReplyDeleteThat's true, very very thanks
ReplyDeleteThank you, it saves me.
ReplyDeleteThanks, you are the only who has the solution
ReplyDeleteSearched for ages before finding this simple solution - Thanks
ReplyDeleteThanks a lot it really helpful.
ReplyDeleteYou save my day.