Unity WebGL web request error Access-Control-Allow-Origin - unity3d

im testing my game on webgl build and i have encountered an error when i tried to fetch data from the database :
XMLHttpRequest cannot load Origin is not allowed by Access-Control-Allow-Origin.
i understand that it got something to do with javascript security thing that i have no experience with.
any one know how t solve this issue?

The Unity Manual discusses this here. Do you have direct control of the server? If so, implement CORS there. If not, try moving the affected resources to the same server your unity scripts are running from.
If you need more specific advice, you'll need to provide more details.

Related

How to call Realm function via HTTP?

I need to call realm function via HTTP not sdk. Looks like it is possible, but I can not figure it out.
Reason behind it is simple, I do not need anything sdk provides us, I just want to get the data from db. Also I have a problem with sdk cos it's trying to create a folder related to sync (I do not need sync at all! This is big question why Mongo dev team did it this way) in google cloud function where I get the error about read/write permissions.
Would be grateful for any help
I found the answer is pretty obvious we just need to use web sdk not node sdk cos web does not have anything related to sync

Connecting mobile app with back-end algorithm

I'm working on a school project. We have an AWS server set up with MongoDB. We created some user DB for account verification purposes and communicate with it using REST API. What we need is for the mobile app to send some data to the server side. Run it with an algorithm, then return back the result in JSON format. I've never done anything similar to this, so I have no idea how to go about it. If anyone could provide some lead or guidance/links that would be amazing. Thank you.
First of all you dont need a algorithm for it. It is just a process you have to follow and its kinda lot more easy than you thinking.
If you are doing it in android you can connect to rest webservice via Google's Volley http://developer.android.com/training/volley/index.html.
Or You can use Retrofit 2.0. I have been using it for a long time and i prefer it.
http://square.github.io/retrofit/

Login Logout authentication and uploading views and pics in our applcation

I want to create an application in which i want a login logout authentication from the database file that can be handled by web services. This application should always need to be connected with the internet and after login i need to upload images and also give there views about the image and i am not getting any idea how start work on that can anyone help me.... I want to use this application some sort similar like facebook.
There is also a problem that which type of application i create native or web or else. Please help me to start this application.....
Try setting up a server that can handle the requests from your app. Your app can then request content or upload content to the server using NSURLRequest. For further reading refer http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/URLLoadingSystem/Concepts/URLOverview.html
I think you are asking the wrong question. What web development language do you know to help you accomplish this? There are many different ways to go, like open source as opposed to paid, which services best handle your specific needs, like Ruby or PHP, which RDBMS to use, etc. If you don't know any programming, then it is going to be a long road. Your first step should be taking what you already know and branching from there, learning what you need to know. In your case, you'll need to learn server side scripting, connect it with a database, how to set up a server to put it all in, as well as client side development like javascript to go with the html.

ASP MVC2 CombresLink Issue On RackSpace Cloudsite

Im just finishing off deploying my asp.net mvc 2 website up to RackSpace cloudsites.
Im currently just getting an error saying: System.Security.SecurityException: Request failed. Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
This is occurring on the following line:
<%= Combres.WebExtensions.CombresLink("siteJs")%>
So it is when Combres is trying to access the SiteJs link in the App_Data/Combres.xml file. Im transferring this site over from Discountasp where it was working without issue.
Any ideas on what the problem and fix would be?
Thanks in advance
If I had to take a shot in the dark based on your environment being Medium Trust, I am going to guess reflection is your issue. Combres uses Fasterflect which is a great reflection library. That being said, Medium Trust applications are not granted the ReflectionPermission so this would throw a SecurityException when attempting to run the code. If you have any details on the SecurityException, could likely confirm if that is indeed the case.

How to connect to a Remote Database from native Iphone app

I want to connect to a remote database(MySQL or SQL Server or Oracle) via internet from my native iphone app. I can't find any API or Framework in System to add. does any one know how to connect to a remote Database? pleased help me. Thank you very much
I'm not an iPhone programmer, but I would suspect you want some abstraction going on.
Instead of trying to make a native database connection work, consider writing some service layer that talks to the database on the back-end, and speaks HTTP to your client application.
Plenty of very good reasons for this. Security concerns chief among them.
One way to do it would be to setup an HTTPS server that wraps your requests. Submit your queries via HTTPS POST. The server setup would be pretty basic and it gives you the chance to do any post-processing before sending it over the wire.
The best alternative is to use webservices to access the information stored remotely.
Bye.
Disclaimer : Shamelessly plugging my own product :)
We've built an online system called Kumulos that allows iOS and OSX developers to build and host online databases in the cloud, while easily creating custom API methods for accessing it. It even builds all the Objective-C bindings for you.
Its really really easy to use and its free while in Beta. We'd love some honest developer feedback :)
Check it out here