We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

Search API License is not Properly Applied in C#

I’m testing GroupDocs Search using the temporary license in my .Net application. I have sporadic success and then I get the " Object reference not set to an instance of an object. error that occurs for a period of time and then the search functions successfully. I’m very frustrated with this because the search is excellent when it works successfully.

Here’s the code I’m using to call the license. It succeeds and fails on this line:


Is this happening because I’m using a temporary license?


No, a temporary license is just like a full license with just the time limitation. Could you please share the license file in a private message? Are you using any other GroupDocs or Aspose APIs in the same application? If yes, please share their versions.

I don’t know how to send you the file in a private message, but the error didn’t occur all night but now this morning I get it again. I’m curious, are you load balanced and is there a chance that one of your servers is acting up?

Now I’m getting the second error message that the license is not valid.

And now, inexplicably, the link to the license is successful again.


Please apply license only in Global.asax.cs.

protected void Application_Start()
       License license = new License();
       license.SetLicense("license path");

If issue persists, please share the sample application/project using that we could reproduce the issue at our end.

Ok, I’ll try that.



Atir, everything has been working very well since I added the code to the global.ascx file. No errors so far.

Thank you very much for your help.


1 Like


You are welcome.

When will it be supported for Dotnet core 6?

1 Like


We answered this query here.