I am fairly new to the C# world so I don't know much. I can't even find simple step by step documentation on how to set up a simple service without using the built in templates in Visual Studios.
I would prefer to use the following class and web.conf to make my service. I do not want to use anything that is going to depend on visual studios or IIS magic like .asmx files.
I can't seem to get my server to respond to it. When i go to localhost:8152/02/service or localhost:8152/02/service/echo2, I get a 404 error.
I have the following in my web.conf file.
<system.serviceModel>
<services>
<service name ="hessian.test.HessianService" behaviorConfiguration="HttpGetMetadata">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8152/02/service"/>
</baseAddresses>
</host>
<endpoint address="/echo2" contract="hessian.test.HessianService.sayHello" binding="wsHttpBinding"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name ="HttpGetMetadata">
<serviceMetadata httpGetEnabled="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings />
<client />
</system.serviceModel>
This is in my .cs file
namespace hessian.test{
public class HessianService : WebService, testInterface
{
public void runVoid(int count)
{
}
public string sayHello()
{
return "Hello";
}
public string repeatMe(string s)
{
return s;
}
}
}
Any help would be appreciated.