Results for:

Suppor Center



.NET – Service Configuration and web.config

.NET – Service Configuration and web.config

To configure WCF in .NET applications, you have to add SDK MainStreaming Service Reference to your project.

By clicking Advanced you can access to configuration and you have to configure:

Access level for generated classes: Public
Dictionary collection type: System.Collections.Generic.Dictionary
Reuse types in referenced assemblies
Reuse types in all referenced assemblies

Configuration web.config

Web.config file of the application that will execute webservice requests must be modified as follows. If web service is imported in an external libyrary, the configuration must be applied to the project that executes the requests, not in the library.

            <binding name="xmlWebHttpBinding">
              <security mode="Transport">
                <transport clientCredentialType="None"></transport>
            <behavior name="webhttp">
              <webHttp defaultBodyStyle="WrappedRequest" faultExceptionEnabled="true" defaultOutgoingResponseFormat="Xml"></webHttp>

          <endpoint address="" 


.NET – API calls C#

.NET – API Calls C#

To execute a API Call in .NET is important to create an object of the service as follows:

WCFMSApi.WCFMSApiClient api = new WCFMSApi.WCFMSApiClient("xmlEndpoint");

To execute the service calls you have to call the methods available in the service object. All the calls need the token as first parameter and we suggest to store it in a variable/ constant/external settings so you can modify it only once if you need to.

Now we show an example to catch the list of not-published video of your collection, sorted by UPLOAD Date Desc, limited to 100 lines.

You can access to more informations in the Methods sections.

List<WCFMSApi.VodContentDTO> vodContents = api.ListVodContentUnPublished(MAINSTREAMING_TOKEN, "SORT_UPLOAD_DATE", "DESC", 0, 100);