How to configure the IIS to support WCF service?
I wrote WCF service ( web service ). I never work with the IIS - and i dont know if i need to change \ config something in the IIS to work with my service.
Someone can help me ?
Thank开发者_开发问答s
P.S: IIS version is 7.5
Hosting a service on an IIS Web server is very similar to hosting a traditional Web service (with an .asmx file extension).
Services hosted in IIS require the creation of a file with an .svc file extension. This is done for you automatically if you use the Visual Studio 2008/2010 WCF Service template. The Service.svc file is an XML-based file that must include an @ServiceHost directive.
<% @ServiceHost Language="C#" Service="EmployeeService" %>
in the web config you can leave the address attribute blank.
<services>
<service name="EmployeeService">
<clear />
<endpoint address="mex" binding="mexHttpBinding" name="mex" contract="IEmployeeService" />
<endpoint binding="wsHttpBinding" name="wsHttpBinding" contract="IEmployeeService" />
<endpoint binding="basicHttpBinding" name="basicHttpBinding" contract="IEmployeeService" />
</service>
</services>
For more info take a look at: http://msdn.microsoft.com/en-us/library/ms733766.aspx
精彩评论