SpellCheck Connectivity Issue

Ed Maybert 1 Reputation point
2021-01-15T00:51:48.887+00:00

I have been working with the support team for the following issue.

In my C# code ( from the tutorial ) I get the following errors:

InnerException = {"The underlying connection was closed: An unexpected error occurred on a send."}
InnerException = {"Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."}

When using the following endpoints:
https://api.bing.microsoft.com/v7.0/SpellCheck/
https://api.bing.microsoft.com/v7.0/search

When we switched to this endpoint:
https://api.cognitive.microsoft.com/bing/v7.0/news/search

I received a response, but the response object was:
{StatusCode: 401, ReasonPhrase: 'PermissionDenied', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:{ Date: Fri, 15 Jan 2021 00:49:11 GMT Content-Length: 224}}

We tried both keys and they seemed to check out as valid.

Any help would be appreciated.

Bing Spell Check
Bing Spell Check
A Bing service that detects and corrects spelling mistakes in your app.
29 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 42,116 Reputation points Microsoft Employee
    2021-02-04T10:49:36.653+00:00

    @Ed Maybert The following should work.

    static string subscriptionKey = "<key>";  
    static string endpoint = "https://api.bing.microsoft.com/v7.0";  
    static string path = "/spellcheck?"  
    

    64021-image.png