ImageGear .NET - Updated
Set up HTTPS for a Web Application
User Guide > How to Work with... > Common Operations > Viewing > Viewing Using ASP.NET > ASP.NET Web.Config Editor Application > Set up HTTPS for a Web Application

This topic provides information about how to set up HTTPS for a web application in ImageGear .NET.

  1. Open our JQuery Plugin Sample in Visual Studio 2010. (See Samples for more information on this and other samples.)
  2. Right-click the ImGearPluginSample project and select Use IIS Express ... in the context menu. If this menu item cannot be found in the menu, then IIS Express is already used as a development server.
  3. In the Properties window of the project, set SSL Enabled to true.
  4. Modify the system.ServiceModel section of Web.config file as follows:
    (In a viewer)
    Web.config
    Copy Code
    <behaviors>
      <servicebehaviors>
        <behavior name="simpleBehavior">
          <servicemetadata httpgetenabled="true" httpsgetenabled="true"></servicemetadata>
          <servicedebug includeexceptiondetailinfaults="true"></servicedebug>
        </behavior>
      </servicebehaviors>
      <endpointbehaviors>
        <behavior name="webHttpBehavior">
          <webhttp></webhttp>
        </behavior>
      </endpointbehaviors>
    </behaviors>
    <bindings>
      <webhttpbinding>
        <binding name="webHttpTransportSecurity">
          <security mode="Transport"></security>
        </binding>
      </webhttpbinding>
    </bindings>
    <services>
      <service name="ImageGear.Web.ImGearService" behaviorconfiguration="simpleBehavior">
        <endpoint binding="webHttpBinding" contract="ImageGear.Web.IImGearService" behaviorconfiguration="webHttpBehavior" bindingconfiguration="webHttpTransportSecurity"></endpoint>
      </service>
    </services>
    <servicehostingenvironment aspnetcompatibilityenabled="true"></servicehostingenvironment>
  5. Remember the port value in the Properties window of the project in the SSL URL field.
  6. Build and run the project.
  7. In the browser, start the same webpage with HTTPS protocol and the port from the SSL URL field of the project.
  8. Check the Network window of the "Developer Tool" in the browser to verify that all requests to the service are passing via HTTPS protocol.