The remote name could not be resolved: 'your_uri'

424 Views Asked by At

I am trying to do some querying operations in episerver CMS...while doing i got the Above mentioned error occurred...the code i have used is,

        int contentTypeId = 16;
        var pages = SearchClient.Instance.Search<IContent>()
          .Filter(x => x.ContentTypeID.Match(contentTypeId))
          .GetContentResult();

Thanks and Regards, Mohan.

1

There are 1 best solutions below

2
On

Edit: I would guess 'your_uri' is a leftover from a sample configuration. Check your Episerver Find settings in web.config and make sure the URL and index name are correct.

Also, you should still use strongly typed content models wherever possible.

In this case use SearchClient.Instance.Search<YourContentType>() to search for a specific content type.