Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - WCF service : Cannot browse the .svc file & hence the WSDL after hosting the service in IIS

 
 
Old 02-08-2007   #1 (permalink)
pramodj0611@gmail.com


 
 

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 SpecsSystem Spec
Old 02-09-2007   #2 (permalink)
Ronald Ricardo Ramirez Moran


 
 

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 SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
top web hosting service hosting reviews rank Virtual Server


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46