ServiceDeploymentNote - sirtristancomtedeartois/note GitHub Wiki

Notenet Rest WCF Service Deployment problem note (take user.svc for example)

Setup hosts

To enable visiting the domain name instead of the localhost, add following to file

/windows/system32/drivers/etc/hosts 127.0.0.1 www.myxyz.com, if there is no such entry yet 127.0.0.1 user.myxyz.com, etc

IIS

Create 2 website in IIS

User: use User service as the root folder NotenetWeb: use the website as the root folder, if there is no such website yet

It will automatically create the an ApplicationPool for each site

change it to use .NET Framework 4.0 Make sure the Managed Pipeline Mode is Integrated for each site. Change the Identity to NetworkService for each site if it’s not.

SQL Server

In Sql server, you need to make sure you add NETWORK SERVICE account to login under security tree view item of the server.

web.config

These the configurations should be added to Notenet.User.Service &

Suggested the authentication url and other settings. (Need to do some change per needed)

Add an extension to <system.serviceModel>

<extensions>
  <behaviorExtensions>
    <add name="jsonQueryStringWebHttp" type="System.ServiceModel.Configuration.JsonQueryStringWebHttpElement, System.ServiceModel.Web.Extension" />
  </behaviorExtensions>
</extensions>

Add endpoint under behaviors

 <endpointBehaviors>
    <behavior name="AjaxBehavior">
      <jsonQueryStringWebHttp />
      <!--<enableWebScript />-->
    </behavior>
  </endpointBehaviors>

One thing need to notice is in serviceHostingEnvironment tag, you need to add aspNetCompatibilityEnabled="true" to make it aspnet compatible

Add service under services tag

<service name="Notenet.User.Service.User">
    <endpoint address="" behaviorConfiguration="AjaxBehavior" binding="webHttpBinding" contract="Notenet.User.Service.IUser" />
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>

Add authentication module under system.webServer tag

Make sure the connection strings are correct and consistent.

⚠️ **GitHub.com Fallback** ⚠️