![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | WCF service : Cannot browse the .svc file & hence the WSDL after hosting the service in IIS I have created a simple WCF service as below. But after hosting it in IIS, I am facing problems as I am unable to browse the .svc file, it gives 'Page cannot be displayed' error. But when I host the same service to some other machine, I can browse .svc file & hence the WSDL. Can anyone help me on this? My service contract & service code as below (GreetMessage.cs) using System; using System.Collections.Generic; using System.Text; using System.ServiceModel; using System.Runtime.Serialization; namespace GreetMessageSolution { [ServiceContract()] public interface IGreetMessage { [OperationContract] string SayHi(string name); } public class GreetMessage : IGreetMessage { public string SayHi(string name) { return "Hi: " + name; } } } My web.config file is as below: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="metaDataBehavior"> <serviceDebug includeExceptionDetailInFaults="true" /> <serviceMetadata httpGetEnabled="true" / > </behavior> </serviceBehaviors> </behaviors> <services> <service behaviorConfiguration="metaDataBehavior" name="GreetMessageSolution.GreetMessage"> <endpoint address="http://localhost/ GreetMessage/Service.svc" binding="wsHttpBinding" bindingConfiguration="" contract="GreetMessageSolution.IGreetMessage" /> </service> </services> </system.serviceModel> </configuration> And my .svc file is as below (Service.svc) <%@ServiceHost language=c# Debug="false" Service="GreetMessageSolution.GreetMessage" %> Please let me know on this as soon as possible. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: WCF service : Cannot browse the .svc file & hence the WSDL after hosting the service in IIS This is because the WCF IIS Scriptmaps aren't installed. To install it, you need to reinstall WCF using the ServiceModelReg.exe. Regards, <pramodj0611@gmail.com> wrote in message news:1170984743.073852.164350@s48g2000cws.googlegroups.com... >I have created a simple WCF service as below. But after hosting it in > IIS, I am facing problems as I am unable to browse the .svc file, it > gives 'Page cannot be displayed' error. But when I host the same > service to some other machine, I can browse .svc file & hence the > WSDL. Can anyone help me on this? > > > > My service contract & service code as below (GreetMessage.cs) > > using System; > > using System.Collections.Generic; > > using System.Text; > > using System.ServiceModel; > > using System.Runtime.Serialization; > > > > > > namespace GreetMessageSolution > > { > > [ServiceContract()] > > public interface IGreetMessage > > { > > [OperationContract] > > string SayHi(string name); > > > > } > > > > public class GreetMessage : IGreetMessage > > { > > public string SayHi(string name) > > { > > return "Hi: " + name; > > } > > } > > } > > > > > > My web.config file is as below: > > > > <?xml version="1.0" encoding="utf-8" ?> > > <configuration> > > <system.serviceModel> > > <behaviors> > > <serviceBehaviors> > > <behavior name="metaDataBehavior"> > > <serviceDebug > includeExceptionDetailInFaults="true" /> > > <serviceMetadata httpGetEnabled="true" / >> > > </behavior> > > </serviceBehaviors> > > </behaviors> > > <services> > > <service behaviorConfiguration="metaDataBehavior" > name="GreetMessageSolution.GreetMessage"> > > <endpoint address="http://localhost/ > GreetMessage/Service.svc" binding="wsHttpBinding" > > bindingConfiguration="" > contract="GreetMessageSolution.IGreetMessage" /> > > </service> > > </services> > > </system.serviceModel> > > </configuration> > > > > > > > > And my .svc file is as below (Service.svc) > > <%@ServiceHost language=c# Debug="false" > Service="GreetMessageSolution.GreetMessage" %> > > Please let me know on this as soon as possible. > |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| top web hosting service hosting reviews rank | Virtual Server | |||