Hi All,
I created a basic WCF service. I published the service in IIS. when I try to run the service ,it displays the below.. Please help me on this..
Hi All,
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Piyush PansuriyaRank #454 · 5.5K reputationPosted Sep 10, 2014, 5:20 AM EDT
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -i
Start installing ASP.NET (2.0.50727).
..........
Finished installing ASP.NET (2.0.50727).
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis -ga ASPNET
Note:
1) change asp.net version as per installed
2) Check MIME type in IIS .svc is there or not? if not than add MIME type .svc
After this try once again
suman p12 reputationPosted Sep 10, 2014, 7:25 AM EDT
I am using version 4.5. Can you help on this.
Piyush PansuriyaRank #454 · 5.5K reputationPosted Sep 10, 2014, 10:29 PM EDT
I think this error occurs due to mismatch of Service name in .SVC file. Probably you might have changed the name of the service class that is implementing the interface.The Solution is to open .SVC file and exactly match the Service attribute and CodeBehind Attribute. So your .SVC file should be like
ServiceHost Language="Language you are using" Debug="bool value to enable debugging" Service="Service class name that is implementing your Service interface" Codebehind="~/Appcode/Class implementing interface.cs"%>. for eg.: ServiceHost Language="C#" Debug="true" Service="Product.Service" CodeBehind=~/AppCode/Product.Service.cs"%>suman p12 reputationPosted Sep 10, 2014, 10:37 PM EDT
No every thing is correct. I think the problem with MIME types.
My TargetFrameWork :4.5.1 ..