WWW Error in Web Player

I’ve got some problem with Unity3d WWW class.

I’m trying to get string from an URL, it works fine in unity editor, but when I build into Web Player, it does not working. its like the coroutine always trying to get data (I’m not set the time out), but got nothing, “WWW.error” properties is also null, if I use “while(www.isDone){}” it will be blocking (never enter into the scene/level). Can anyone help?

here are the coroutine code:

public IEnumerator SubmitLogin()
{		
	
	WWW download = new WWW("http://targetdomain/index.php?op=login&username=user&password=pwd");
	
	yield return download;

	// this is will be blocking forever in web player
	//while(!download.isDone){}	
	if(download == null)
	{
		Debug.Log("download data is null");
	}
	else
	{
		//_sessionId = download.text;
		Debug.Log(download.text);
	}

	
	if(download.error != null)
	{
		Debug.Log("Download error" + download.error);
		_sessionId = "SESSION EMPTY, " + download.error;
	}
}

methods of return type IEnumerator shouldn’t return any values as you did with

yield return download;

the usual snippet would be

yield download; // only proceed if download is complete

also make sure that your crossdomain.xml is accessible like http://targetdomain/crossdomain.xml with the right entries like this template (whereas everything is allowed)

<cross-domain-policy>
    <allow-access-from domain="*"/>
    <site-control permitted-cross-domain-policies="master-only"/>
</cross-domain-policy>