I have developed a unity game which listens to a TCP port. I have used System.Net.Sockets.TcpListener class to achieve this.
I have ported the game for UWP (using IL2CPP scripting backend). I also have checked internetClientServer and privateNetworkClientServer capabilities in the Visual Studio.
After creating the package and installing the package using XBOX Remote Access, it will work successfully. But after restarting the console the game crashes when a client wants to connect.
Exception: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Appreciate any help
Related
I am new to developing apps for the Xbox one. I have been following the tutorial as listed here. However, I the publish keeps failing due to the following:
Severity Code Description Project File Line Suppression State
Error DEP6957: Failed to connect to device '169.xxx.xxx.xx' using Universal Authentication. Please verify the correct remote authentication mode is specified in the project debug settings. COMException - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (Exception from HRESULT: 0x8007274C) [0x8007274C] Test
I have just installed the latest SDK from here, but I did not install the packages for C++.
Also, using the IP address and port I cannot connect via the web browser, and my router doesn't show my Xbox either.
Does anyone know what I am missing?
It turns out you need to click the Launch Home button. Then go to settings and configure your WiFi network. After that is done, then restart your console. Your IP address should be updated, and showing on the router.
I am having some issues with sockets in UWP.
I'm trying to test some simple socket communications (stripped down version of the MSDN example) between a mobile and a desktop on the same LAN subnet. I am developing in a VM (on a separate desktop) and can deploy to the VM and mobile. In that case connections work fine.
When I create an app package and install it on the desktop, I cannot connect.
I have windows firewall on the desktop completely off. The VM is set to have a separate IP on the network. I have checked all IPs I'm using are correct.
I am getting the typical: A connection attempt failed because the connected party did not properly respond after a period of time
This is driving me crazy, if anyone has any helpful advice that would be much appreciated!
edit: To clarify the above.
My app has both both client and server roles (can connect to a listener, and is also listening itself).
App (on Mobile) --> App (on VM, deployed from VS) - this works fine, Mobile can connect to VM no problem.
App (on Mobile) --> App (on Desktop, installed from appx) - Mobile unable to connect to Desktop. Firewall on desktop disabled. Task Manager shows .exe listening on the correct port.
Thanks, Inci
Found a solution to this - it appears connections over LAN need to have the Internet(Client & Server) capability selected.
I am most certainly connecting over my local network (specifically 192.168.0.15 (mobile) to .21 (desktop). It seems that when deploying with VS the app doesn't need the Internet capability.
If there is a more 'correct' solution I'll amend this.
For develop purpose only I'm testing a UWP (Universal Windows Platform) client app locally on my Windows 10 Laptop, where a WebAPI service is running.
By default, WinRT apps cannot connect to localhost but Visual Studio locally deployed apps should, but I coudn't manage to succeed.
Then I've used Fiddler to check and eventually enable loopback ability for my UWP app and found that it was already enabled.
By accident I've discovered that only while Fiddler is running, my UWP app can connect to the WebAPI service.
I'd like to know why.
Fiddler is able to Allow your App to use the local network loopback.
Simply check your App and you can reach your WebService.
You will see if you uncheck your App, you won't reach your WebService again.
Visual Studio enables the local network loopback while debugging as well if you check the option in your Projects Debugging Properties. (Project -> Properties -> Debugging -> Allow local network loopback)
I am new to unity ,
I am trying to buid a chat functionality using RPC for Unity.
If one of my device(in which app is installed) is become server and other deivces connect to it, It work fine.
But i want my server to be different machine, in which app is not installed.
I want my all devices to connect to that server.
How should i configure my server such that i can connect to it for a RPC call.
I've downloaded the .NET xAPI from here: https://github.com/RusticiSoftware/TinCanAPILibraryCSharp
When I test the code in console mode I am able to make a connection with both my local server and public lrs: http://tincanapi.com/public-lrs/
However, when I run that same code from Unity, I can only make a connection with my local server, I can no longer connect with the public lrs or any other remote server for that matter, I keep getting "no internet connection" and nothing else.
Any ideas on what this could be??
Currently and if i m right, running dlls compiled with .NET frameworks > 3.5 on unity3d can be a problem. Considering tin can is newly released... Maybe your problem is related?
If you create the dll yourself, be sure to focus on .Net framework 3.5