0

When I build as a standalone executable my application works fine with database SQL server, but does not work when built as a web player. What can I do?.

1 Answer 1

1

You won't be able to connect to a database using the web player as it is inside a security sandbox.

  • Restrictions on accessing data on a domain other than the one hosting your .unity3d file.

  • Some limitation on the usage of the Sockets.

You can read more about it here: http://docs.unity3d.com/Manual/SecuritySandbox.html

Sign up to request clarification or add additional context in comments.

8 Comments

Excuse me could you please mention more specific what I can fix this?
You may not be able to, or not easily. Please provide more information about how you are trying to access the database.
@StevenH. I think that if you hosted the SQL server on the same domain you would be able to access it.
The way I access database is by using **System.Data.dll ** and just provide the connection string in order to connect. @yoyo
Right, and a System.Data connection won't work from a web player. You could instead access the database from the enclosing web page, and then communicate from your Unity app to the web page, as explained here. This will be a very different approach from System.Data usage, but I don't know if there is a better alternative.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.