Jump to content
  • Advertisement
RobbyT15

SqlException: System.Net.Security.Native in Unity

Recommended Posts

I'm receiving the error in the attached image in Unity while trying to connect to my SQL Database. I'm assuming that it has something to do with a missing dll but I'm not sure. Can anyone explain to me what I need to do to fix it?

Capture.PNG

Share this post


Link to post
Share on other sites
Advertisement
26 minutes ago, Alberth said:

No error message attached to the exception? That may give you more detailed information what  is wrong.

The closest thing to an error message I get is in the image on this reply.

Capture.PNG

Share this post


Link to post
Share on other sites

That is not an error message, that is a stack-dump. (That is, the nested function calls that were active at the time the exception happened.)

I don't know what .net does with error-messages if it dumps the stack, but in case it doesn't show the message by default, you can try the following:

In that stack-dump find the function in your code that was active. Change that code by catching the exception, retrieve and print the message from the exception (or save it somewhere), and probably then rethrow it, or exit in some other way.

 

By the way, it is good practice to always check returned results from calls to the system (or in this case, catch raised exceptions), and deal with  them in a proper way. It avoids the situation you're in now, a crashed program and no idea what is wrong.

 

Share this post


Link to post
Share on other sites
On 4/13/2019 at 3:22 PM, RobbyT15 said:

in Unity while trying to connect to my SQL Database

If this is released to the public you probably shouldn't connect directly to the database.
Add some (Web/REST/SOAP/etc-)API to handle authorization, authentication and dataflow beween the game client and your database.

Without further information my guess is, you are using C# functionality that's not 100% supported by Unity.
But the exception message would help in indetifying the problem.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!