Server error in ServiceDeskApi Application when trying to open any API on ServiceDeskAPI help page.

book

Article ID: 172608

calendar_today

Updated On:

Products

ServiceDesk

Issue/Introduction

There is a ServiceDesk API located at: [servicedeskserver]\ServiceDeskApi. When opening that page and proceeding to Help page with list of APIs you can click on each of them for further details. However, clicking on any of them will result in a Server Error.

Server Error in '/ServiceDeskApi' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to
service this request. Please review the following specific error details and
modify your source code appropriately.
Compiler Error Message: CS0012: The type 'Dictionary<,>' is defined in an
assembly that is not referenced. You must add a reference to assembly
'System.Collections, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'.
Source Error:
Line 4: @{
Line 5: // Group the samples into a single tab if they are the same.
Line 6: Dictionary<string, object> samples = Model.GroupBy(pair =>
pair.Value).ToDictionary(
Line 7: pair => String.Join(", ", pair.Select(m => m.Key.ToString()).ToArray()),
Line 8: pair => pair.Key);
Source File: E:\Program Files\Symantec\Workflow\ServiceDesk
API\Areas\HelpPage\Views\Help\DisplayTemplates\Samples.cshtml Line: 6

Environment

ServiceDesk 8.5

Resolution

This issue has been reported to Symantec Engineering.

Workaround:

Adding the reference manually to web.config.

  • Edit the %ProgramFiles%\Symantec\Workflow\ServiceDesk API\web.config
  • Replace:
        <compilation debug="true" targetFramework="4.5.2" />
  • With:
        <compilation debug="true" targetFramework="4.5.2">
            <assemblies>
                <add assembly="System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

            </assemblies>
        </compilation>