- Home /
Any reason why HttpWebRequest would work in editor but not in standalone?
I have been using HttpWebRequest. It runs great in the editor, but the standalone throws a NotSupportedException when I instantiate the HttpWebRequest.
Somehow it seems to either not be allowed to using WebRequest or the standalone is not being packaged with all of its dependencies.
Any thoughts?
I have tried to write my own socket connection for this, but am having a rough go of it.
Answer by danny83 · Jun 30, 2011 at 06:44 AM
Two things you could try:
1: Check: Edit > Project Settings > Player and try changing the API optimisation from .NET (Subset) to just .NET
2: Check out Unity's WWW class as an alternative: http://unity3d.com/support/documentation/ScriptReference/WWW.html
Okay, found out that it works fine on a pc standalone build, just not $$anonymous$$ac. I will look into why this might be happening. Just must not be packaging the dependencies properly or something.
Answer by am128256 · Jun 30, 2011 at 01:50 PM
Had to change the project settings before it would compile in the editor.
Already looked into WWW and WWWForm classes, but they do not seem to provide a way to do PUT and DELETE protocol methods, so cannot use them.
Needless to say, I have already tried a great number of work arounds.
Still, it just seems odd that something would work in the editor and not in the standalone. There has to be a reason, but nothing from the user-side of things seems to explain this.
Answer by Benglin · Jul 21, 2012 at 06:11 PM
I am completely stuck because WWW class does not support PUT/DELETE http verbs. Our multiplayer game can no longer be done because we are using Azure Queue Storage as a way to deliver a message to the client (Unity Web Player in a browser). Without DELETE verb, the message can never be removed from the queue.
I'd urge anyone who needs this to vote on the wishlist item here, thanks :)
http://feedback.unity3d.com/unity/all-categories/1/hot/active/more-rest-api-friendly-www-class
Your answer
Follow this Question
Related Questions
Standalone player - Customizing launcher 2 Answers
how to detect if there is an instance of my game already running? 1 Answer
My game wont run 2 Answers
Average Standalone File Size 2 Answers
Unity4 standalone build problem....Help! 0 Answers