Im having problems with a webgl build for unity that uses a ftp connection to store and load .xml files. Everything works fine in the editor and on a local ftp server (using Xlight). But when I build a webgl solution and try to save a .xml file I get the following error:
> Uncaught abort() at Error at jsStackTrace (http://localhost:8080/Development/WebGL.js:875:12) at stackTrace (http://localhost:8080/Development/WebGL.js:889:21) at abort (http://localhost:8080/Development/WebGL.js:3830852:24) at _pthread_create (http://localhost:8080/Development/WebGL.js:13183:2) at __ZN6il2cpp2os10ThreadImpl3RunEPFvPvES2_ [il2cpp::os::ThreadImpl::Run(undefined?F?*, void, void*)] (http://localhost:8080/Development/WebGL.js:3596270:50) at Array.__ZN6il2cpp2os6Thread3RunEPFvPvES2_ [il2cpp::os::Thread::Run(undefined?F?*, void, void*)] (http://localhost:8080/Development/WebGL.js:3746555:7) at Object.dynCall_iiii (http://localhost:8080/Development/WebGL.js:3807075:39) at invoke_iiii (http://localhost:8080/Development/WebGL.js:16008:32) at Array.__ZN6il2cpp6icalls8mscorlib6System9Threading6Thread15Thread_internalEP12Il2CppThreadP14Il2CppDelegate [il2cpp::icalls::mscorlib::System::Threading::Thread::Thread_internal(Il2CppDelegate?**)] (http://localhost:8080/Development/WebGL.js:2708698:6) at Object.dynCall_iii (http://localhost:8080/Development/WebGL.js:3813716:38)
I have absolutley no idea what this means or how to remotely fix this. My interests in server techs wasn't really at an all time high so some help on this matter would be greatly appreciated.
This is my xml upload code I'm currently using:
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://localhost/construct.xml"); request.Method = WebRequestMethods.Ftp.UploadFile; request.Credentials = new NetworkCredential("name", "password"); string xml = xmlDoc.OuterXml; byte bytes = Encoding.UTF8.GetBytes(xml); Stream requestStream = request.GetRequestStream(); requestStream.Write(bytes, 0, bytes.Length); requestStream.Close(); FtpWebResponse response = (FtpWebResponse)request.GetResponse(); response.Close();
If there is anything else I've left out than please let me know. Thanks in advance!