Forum C# ...uses the non-allowed method??

...uses the non-allowed method??

Postby igli1 » May 3rd, 2014, 10:55 pm

Server Started
========================
(waiting for connection)

Trying last loaded dll
- error: MyGame.GameCode..ctor(...) uses the non-allowed method: System.Xml.Linq.XDocument System.Xml.Linq.XDocument::Load(System.String)

Trying last loaded dll
- error: MyGame.GameCode..ctor(...) uses the non-allowed method: System.Xml.Linq.XDocument System.Xml.Linq.XDocument::Load(System.String)

Trying last loaded dll
- error: MyGame.GameCode..ctor(...) uses the non-allowed method: System.Xml.Linq.XDocument System.Xml.Linq.XDocument::Load(System.String)

Trying last loaded dll
- error: Could not find any Player.IO room types [RoomType(...)] in the dll.

Checking if newGame.dll is a game dll (from application directory)
- error: MyGame.GameCode..ctor(...) uses the non-allowed method: System.Xml.Linq.XDocument System.Xml.Linq.XDocument::Load(System.String)

Checking if newGame.dll is a game dll (from application directory)
- error: MyGame.GameCode..ctor(...) uses the non-allowed method: System.Xml.Linq.XDocument System.Xml.Linq.XDocument::Load(System.String)

Checking if newGame.dll is a game dll (from application directory)
- error: MyGame.GameCode..ctor(...) uses the non-allowed method: System.Xml.Linq.XDocument System.Xml.Linq.XDocument::Load(System.String)

Checking if newGame.dll is a game dll (from application directory)
- error: Could not find any Player.IO room types [RoomType(...)] in the dll.


I think I ran to this again, but my whole program is based on XElement(part of XDocument), and if this doesn't work , nothing works
So I ask you guys, is there any possible way to whitelist Linq.XDocument?
Thanks
igli1
 
Posts: 38
Joined: June 29th, 2013, 1:12 pm

Re: ...uses the non-allowed method??

Postby Guillaume » May 4th, 2014, 1:20 pm

You may use a reimplementation of XDocument ?

Otherwise, can't you serialize in advance your XML documents in JSON, and then read them in JSON ?
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France

Re: ...uses the non-allowed method??

Postby igli1 » May 4th, 2014, 4:59 pm

So what you mean with "reimplementation of XDocument"?

Well, why JSON when I already made it with XML
igli1
 
Posts: 38
Joined: June 29th, 2013, 1:12 pm

Re: ...uses the non-allowed method??

Postby Guillaume » May 5th, 2014, 9:40 am

I mean by reimplementation that some library are strictly forbidden on PlayerIO / Yahoo Games Network.
I don't know wish library exactly, but reflection and some other things will not be allowed in the server side.

In this case you have two solution :

You may use a external library that mimic XDocument but not use the forbiden libraries (Maybe an external library, maybe some Mono Source code ?).

If it's too complicated, maybe an other solution is to serialize your data in an other format accepted by the server side.

In my case, i came to XML to JSON only because i was having some problems for the mobile platforms, specially iOS where i was having some reflection and AOT problems. My problem were gone when i preloaded everything in a Object ready format like JSON.

But your problem is different. Using JSON was only a suggestion, maybe to avoid the Server Side limitation.
Guillaume
 
Posts: 277
Joined: March 28th, 2014, 1:59 am
Location: France


Return to C#



cron