WebServer dont work with 2.12

This forum is meant for questions and discussions about the X# language and tools
User avatar
Horst
Posts: 336
Joined: Tue Oct 13, 2015 3:27 pm

WebServer dont work with 2.12

Post by Horst »

Hallo Wolfgang

the compiler is comlaining because the assign of the byte is in the if-endif

Code: Select all

LOCAL bBuffer 			AS BYTE[]
if 
    bBuffer := System.Text.Encoding.UTF8:GetBytes( cString ) 
endif
ocontext:Response:ContentLength64 	:= bBuffer:Length

what i mean with i dont know how to assign a byte is like:

Code: Select all

Local cString := "" as string
so i tried this and it seems ok (found in the link you send me ).

Code: Select all

Local bBuffer := Byte[]{0} as byte []
Horst
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

WebServer dont work with 2.12

Post by wriedmann »

Hi Horst,
the compiler is completely right here because exactly this code also gives an error at runtime.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

WebServer dont work with 2.12

Post by ic2 »

Hello Wolfgang,
wriedmann wrote:,
personally I think that everyone that uses X# should also have XIDE installed - even if not used in production it is the best environment for test code, for a small library or a console executable.
And it also gives the possibility to transfer code using export files like VO.
Of course I have Xide installed and I wish I could use it for everything, which I can't so I am condemned to use VS. But that also means that everything which does not work like VO or VS could be crystal clear for Xide users but not for others.

I have no idea how to handle a viaef file. In VO I would select a repo and then File/Import. This command isn't present in Xide, File/Open does not select viaef files and doubleclicking on it does not run it. And it's not documented when I search in the help on viaef.

I directly admit that Xide is a genius piece of work. But without experience how to use it, I am afraid I am not the only one who gets stuck.....

DIck
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

WebServer dont work with 2.12

Post by FFF »

Godness, Dick,
aef is short for application export file. So, open any project in Xide, rightclick on its name in the treeview, hit IMPORT Application, and select the aef.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

WebServer dont work with 2.12

Post by Chris »

...or use Application->Import Application

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

WebServer dont work with 2.12

Post by ic2 »

Hello Karl,
FFF wrote:Godness, Dick,
That's too much honour. You may just call me Dick :P
FFF wrote: aef is short for application export file.
I know that, for over 20 years now.
FFF wrote:So, open any project in Xide, rightclick on its name in the treeview, hit IMPORT Application, and select the aef.
Thanks for explaining.

Compared to VO: VO always opens with a project, even a newly VO would open with a Default project with the standard libraries. Then the Import option can be found in the File menu.

In Xide I have the Empty Placeholder which doesn't work for importing viaef files. I also have another project which seems normally present in the indicated directory but first, after opening, nothing is there, see picture:
XideEmptyProject.jpg
XideEmptyProject.jpg (6.19 KiB) Viewed 485 times
On the main screen I can't remove it because nothing happens when I click the Remove button.

Chris' suggestion to use Application->Import Application sounds a lot more logical and easier.

No doubt, knowing Chris, Xide works more logical than VS (what isn't) or VO. But I maintain that when you are used to VS or VO it's less straightforward to use Xide than you seem to think.

DIck
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

WebServer dont work with 2.12

Post by Chris »

Hi Dick,

For this "orphan" project in the list, please open the XIDE.cpc file in the main XIDE folder with a text editor and remove that bogus entry.

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
ic2
Posts: 1858
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

WebServer dont work with 2.12

Post by ic2 »

Hello Chris,

Thanks, that works. I am not sure why & how it was added to Xide, there's no .sln file there either. It was a project to test setting the WebView2 to a customcontrol so nothing important.

I should spend some time on Xide I think B)

Dick
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

WebServer dont work with 2.12

Post by wriedmann »

Hi Dick,

Code: Select all

I should spend some time on Xide I think
that is always a good idea, specially for testing purposes. For these, I'm starting normally from the Basic X# application.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

WebServer dont work with 2.12

Post by Chris »

Hi Dick,

There's no .sln, because XIDE uses a completely custom project file format, it cannot read .sln files which are used by VS, and of course VS cannot read the project files of XIDE. For this reason I had told you it is not easy to share projects/code from both VS and XIDE at the same time. Doable, but since you're already used to VS now, I think it's best to stay with it. But yeah, does not hurt to be a little familiar with XIDE, too..

.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply