Jump to content

Worldofjimmy

Members
  • Content Count

    77
  • Donations

    $0.00 
  • Joined

  • Last visited

Profile Information

  • Location
    Europe

Recent Profile Visitors

593 profile views
  1. The Refresh token, Will it expire at the same time as access token? is there a smart way to build a function to check if access token has expired?
  2. Okay I understand. Use NodeJs app account for API. So in theory - Login function The user provide with username and password. API account takes the credentials and check with API https://docs.freemmorpgmaker.com/api/v1/endpoints/users.html#validate-password Depending on the response, if the response is "Message" : "Password Correct" Fetch users data and then redirect user to his profile page.
  3. Hi, I would like to discuss best practice for implementing the API the correct way. I have not been working with APIs before but I was thinking of this way to implement it. Scenario one someone enters the homepage Scenario two user checks leaderboard. For user authentication to login on the website do all the accounts need to have access to the API? How would you implement it?
  4. I created a new task to run my shortcut as admin when the user has logged in, now the server starts at computer boot up. @jcsnider Seems like --apiport=5400 did the trick. Can confirm that it is now working both from another computer internal on the same network and an external network.
  5. I made a file.cmd with the following content: cd C:\Users\Lenovo\Desktop\Server "Intersect_Server.exe" --apiport=5400 Then I made a shortcut to that file to always run as admin. Will test to access the API from another computer now and also external.
  6. Didn't work for Windows 10, still same error when http://localhost:5400 Will try to find the correct alternative for --apiport=5400 for windows
  7. Sure, will do right away. Trying to make a cmd file on autostart the server with --apiport=5400 Do you know if this is the correct? filename: startServer.cmd content of file: cd C:\Users\Lenovo\Desktop\Server start Intersect_Server.exe --apiport=5400
  8. Seems to work with --apiport=5400 Check the following picture as the API is listening on http://*:5400 I'll test to start the server on another computer and try to access the API from this Mac and report back with results
  9. { "RouteAuthorization": {}, "Hosts": [ "http://213.67.202.187:5400" ], "Cors": [], "DataProtectionKey": "CE5DAD93C76EF62BB8259D0866D20B476632731979B3BCFD9F00FDAE03852FE1", "Enabled": true, "DebugMode": false, "SeedMode": false, "RefreshTokenLifetime": 15 } When I use localhost:5400 I can connect to the API on the current machine but not from another machine
  10. Can confirm the same errors occurs even when running server on Mac via Terminal
  11. I tried both public and internal IP. The server starts and then just crashes with the same logs as if run as admin. Do you think I have any fault with router settings, and or windows 10? is there any other tests I can do and provide with results? Listening on 0.0.0.0:5400. -------------------------------------------------------------------------------- UPnP Service Initialization Succeeded -------------------------------------------------------------------------------- Successfully auto port forwarded udp port 5400 using UPnP. -------------------------------------------------------------------------------- 2019-09-13 15:54:15.242 [Error] Message: Invalid URI: The hostname could not be parsed. Stack: at System.Uri.CreateThis (System.String uri, System.Boolean dontEscape, System.UriKind uriKind) [0x0007b] in <118907f5eb5f4e538f3e3bdd8361378f>:0 at System.Uri..ctor (System.String uriString) [0x00014] in <118907f5eb5f4e538f3e3bdd8361378f>:0 at Intersect.Server.Web.RestApi.Configuration.ApiConfiguration+<>c.<get_Ports>b__7_0 (System.String host) [0x00005] in <c9507855f5e44870b9975eb763bbcbda>:0 at System.Linq.Enumerable+SelectArrayIterator`2[TSource,TResult].ToArray () [0x00012] in <28b7381f9e304c3eae9fa66907f89854>:0 at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <28b7381f9e304c3eae9fa66907f89854>:0 at System.Collections.Immutable.ImmutableArray.CreateRange[T] (System.Collections.Generic.IEnumerable`1[T] items) [0x0004d] in <6518d0e60ca84f6b915c07341a031a32>:0 at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource] (System.Collections.Generic.IEnumerable`1[T] items) [0x0000f] in <6518d0e60ca84f6b915c07341a031a32>:0 at Intersect.Server.Web.RestApi.Configuration.ApiConfiguration.get_Ports () [0x0002a] in <c9507855f5e44870b9975eb763bbcbda>:0 at Intersect.Server.Core.ServerContext.InternalStartNetworking () [0x000be] in <c9507855f5e44870b9975eb763bbcbda>:0 at Intersect.Server.Core.ServerContext.InternalStart () [0x00002] in <c9507855f5e44870b9975eb763bbcbda>:0 -------------------------------------------------------------------------------- 2019-09-13 15:54:15.245 [Info] Acquiring context lock... (0ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.245 [Info] Acquired. (0ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.245 [Info] Beginning context dispose. (0ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.246 [Info] Disposing network... (0ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.249 [Info] Saving player database... (2ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.249 [Info] Saving game database... (3ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.324 [Info] Shutting down the API... (78ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.331 [Info] Base dispose. (85ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.331 [Info] Finished disposing server context. (85ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.331 [Info] GC.SuppressFinalize (85ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.331 [Info] InternalDispose() completed. (85ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.331 [Info] Clearing instance... (86ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.332 [Info] Releasing context lock... (86ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.332 [Info] Released. (86ms) -------------------------------------------------------------------------------- 2019-09-13 15:54:15.333 [Error] Received unhandled exception from . -------------------------------------------------------------------------------- 2019-09-13 15:54:15.333 [Error] Message: Invalid URI: The hostname could not be parsed. Stack: at System.Uri.CreateThis (System.String uri, System.Boolean dontEscape, System.UriKind uriKind) [0x0007b] in <118907f5eb5f4e538f3e3bdd8361378f>:0 at System.Uri..ctor (System.String uriString) [0x00014] in <118907f5eb5f4e538f3e3bdd8361378f>:0 at Intersect.Server.Web.RestApi.Configuration.ApiConfiguration+<>c.<get_Ports>b__7_0 (System.String host) [0x00005] in <c9507855f5e44870b9975eb763bbcbda>:0 at System.Linq.Enumerable+SelectArrayIterator`2[TSource,TResult].ToArray () [0x00012] in <28b7381f9e304c3eae9fa66907f89854>:0 at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <28b7381f9e304c3eae9fa66907f89854>:0 at System.Collections.Immutable.ImmutableArray.CreateRange[T] (System.Collections.Generic.IEnumerable`1[T] items) [0x0004d] in <6518d0e60ca84f6b915c07341a031a32>:0 at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource] (System.Collections.Generic.IEnumerable`1[T] items) [0x0000f] in <6518d0e60ca84f6b915c07341a031a32>:0 at Intersect.Server.Web.RestApi.Configuration.ApiConfiguration.get_Ports () [0x0002a] in <c9507855f5e44870b9975eb763bbcbda>:0 at Intersect.Server.Core.ServerContext.InternalStartNetworking () [0x000be] in <c9507855f5e44870b9975eb763bbcbda>:0 at Intersect.Server.Core.ServerContext.InternalStart () [0x00055] in <c9507855f5e44870b9975eb763bbcbda>:0 at Intersect.Core.ApplicationContext`1[TContext].Start (System.Boolean lockUntilShutdown) [0x00011] in <961f5c104a8f4d5d8805ed6ff1f7516f>:0 at Intersect.Core.ApplicationContext`1[TContext].StartWithActionQueue () [0x00001] in <961f5c104a8f4d5d8805ed6ff1f7516f>:0 at Intersect.Server.Core.Bootstrapper.Start (System.String[] args) [0x00038] in <c9507855f5e44870b9975eb763bbcbda>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0003b] in <b4d1a66727f44ba888b54966284fabb4>:0 -------------------------------------------------------------------------------- 2019-09-13 15:54:15.242 [Error] Message: Invalid URI: The hostname could not be parsed. Stack: at System.Uri.CreateThis (System.String uri, System.Boolean dontEscape, System.UriKind uriKind) [0x0007b] in <118907f5eb5f4e538f3e3bdd8361378f>:0 at System.Uri..ctor (System.String uriString) [0x00014] in <118907f5eb5f4e538f3e3bdd8361378f>:0 at Intersect.Server.Web.RestApi.Configuration.ApiConfiguration+<>c.<get_Ports>b__7_0 (System.String host) [0x00005] in <c9507855f5e44870b9975eb763bbcbda>:0 at System.Linq.Enumerable+SelectArrayIterator`2[TSource,TResult].ToArray () [0x00012] in <28b7381f9e304c3eae9fa66907f89854>:0 at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <28b7381f9e304c3eae9fa66907f89854>:0 at System.Collections.Immutable.ImmutableArray.CreateRange[T] (System.Collections.Generic.IEnumerable`1[T] items) [0x0004d] in <6518d0e60ca84f6b915c07341a031a32>:0 at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource] (System.Collections.Generic.IEnumerable`1[T] items) [0x0000f] in <6518d0e60ca84f6b915c07341a031a32>:0 at Intersect.Server.Web.RestApi.Configuration.ApiConfiguration.get_Ports () [0x0002a] in <c9507855f5e44870b9975eb763bbcbda>:0 at Intersect.Server.Core.ServerContext.InternalStartNetworking () [0x000be] in <c9507855f5e44870b9975eb763bbcbda>:0 at Intersect.Server.Core.ServerContext.InternalStart () [0x00002] in <c9507855f5e44870b9975eb763bbcbda>:0 -------------------------------------------------------------------------------- 2019-09-13 15:54:15.333 [Error] Received unhandled exception from . -------------------------------------------------------------------------------- 2019-09-13 15:54:15.334 [Error] Message: Invalid URI: The hostname could not be parsed. Stack: at System.Uri.CreateThis (System.String uri, System.Boolean dontEscape, System.UriKind uriKind) [0x0007b] in <118907f5eb5f4e538f3e3bdd8361378f>:0 at System.Uri..ctor (System.String uriString) [0x00014] in <118907f5eb5f4e538f3e3bdd8361378f>:0 at Intersect.Server.Web.RestApi.Configuration.ApiConfiguration+<>c.<get_Ports>b__7_0 (System.String host) [0x00005] in <c9507855f5e44870b9975eb763bbcbda>:0 at System.Linq.Enumerable+SelectArrayIterator`2[TSource,TResult].ToArray () [0x00012] in <28b7381f9e304c3eae9fa66907f89854>:0 at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <28b7381f9e304c3eae9fa66907f89854>:0 at System.Collections.Immutable.ImmutableArray.CreateRange[T] (System.Collections.Generic.IEnumerable`1[T] items) [0x0004d] in <6518d0e60ca84f6b915c07341a031a32>:0 at System.Collections.Immutable.ImmutableArray.ToImmutableArray[TSource] (System.Collections.Generic.IEnumerable`1[T] items) [0x0000f] in <6518d0e60ca84f6b915c07341a031a32>:0 at Intersect.Server.Web.RestApi.Configuration.ApiConfiguration.get_Ports () [0x0002a] in <c9507855f5e44870b9975eb763bbcbda>:0 at Intersect.Server.Core.ServerContext.InternalStartNetworking () [0x000be] in <c9507855f5e44870b9975eb763bbcbda>:0 at Intersect.Server.Core.ServerContext.InternalStart () [0x00055] in <c9507855f5e44870b9975eb763bbcbda>:0 at Intersect.Core.ApplicationContext`1[TContext].Start (System.Boolean lockUntilShutdown) [0x00011] in <961f5c104a8f4d5d8805ed6ff1f7516f>:0 at Intersect.Core.ApplicationContext`1[TContext].StartWithActionQueue () [0x00001] in <961f5c104a8f4d5d8805ed6ff1f7516f>:0 at Intersect.Server.Core.Bootstrapper.Start (System.String[] args) [0x00038] in <c9507855f5e44870b9975eb763bbcbda>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0003b] in <b4d1a66727f44ba888b54966284fabb4>:0 --------------------------------------------------------------------------------
  12. I tried to run that as Admin but then the whole Server just starts and then crashes. I run this on Windows 10 Logs
  13. It didn't work, is there any other way? _____ _ _ |_ _| | | | | | | _ __ | |_ ___ _ __ ___ ___ ___| |_ | | | '_ \| __/ _ \ '__/ __|/ _ \/ __| __| _| |_| | | | || __/ | \__ \ __/ (__| |_ |_____|_| |_|\__\___|_| |___/\___|\___|\__| free 2d orpg engine Copyright (C) 2019 Ascension Game Dev Version 0.6.0.0 For help, support, and updates visit: https://www.ascensiongamedev.com Loading, please wait. Server has 7 registered players. Game time is now: Thursday, September 12, 2019 1:22:27 PM Server Started. Using UDP Port #5400 Failed to start API. 2019-09-12 18:15:01.033 [Error] Failed to start API. System.Reflection.TargetInvocationException: Ett undantagsfel har inträffat i målet för en aktivering. ---> System.Net.HttpListenerException: Åtkomst nekad vid System.Net.HttpListener.AddAllPrefixes() vid System.Net.HttpListener.Start() vid Microsoft.Owin.Host.HttpListener.OwinHttpListener.Start(HttpListener listener, Func`2 appFunc, IList`1 addresses, IDictionary`2 capabilities, Func`2 loggerFactory) vid Microsoft.Owin.Host.HttpListener.OwinServerFactory.Create(Func`2 app, IDictionary`2 properties) --- Slut på stackspårning för interna undantag --- vid System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) vid System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) vid System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) vid Microsoft.Owin.Hosting.ServerFactory.ServerFactoryAdapter.Create(IAppBuilder builder) vid Microsoft.Owin.Hosting.Engine.HostingEngine.Start(StartContext context) vid Intersect.Server.Web.RestApi.RestApi.Start() i C:\Users\JC Snider\Desktop\AGD\Intersect-Engine\Intersect.Server\Web\RestApi\RestApi.cs:rad 71 Connection Information: Public IP: XXX.XX.XXX.XXX Public Port: 5400 Your game is accesible to the public! Enter your public ip and port into the client/editor config for others to join! Type exit to shutdown the server, or help for a list of commands. >
  14. Hello, Im looking at the documentation for the API and want to test it. I have granted my user the correct roles. I have enabled the API. The server is currently running from another computer in my home and is public. Currently says that the API listening on "HTTP://localhost:5400" How do I access the API from another computer within the same network and from external network? I have tried using postman sending the following from the same network on another computer but I get error 400.
×
×
  • Create New...