SimpleHttpServer not working in Island / Windows? (2.4 KB)

The sample http server project that you provide runs perfectly on the .NET Framework. I am able to connect via the Chrome web browser.

I created a small Island Windows test project that launches the server in program.cs. Everything compiles and runs. When I try to connect to the web server in Chrome my Visual Studio shows the message in the image and hard crashes and has to be End Tasked.

I’m missing …....\B-TEK\BTEK_COMMON_CORE\RemObjects\Internet Pack\Samples\C#\Sample Server\SampleServer.2015.csproj

That is actually the Visual Studio 2015 sample project that you provide in your Internet Pack repository. When my project didn’t work I added it to the solution to run the .NET Windows forms sample you provided and found it to work. It is also what I based my program.cs on.

You can simply remove it from the solution.

Ah, ok. I will try later today if I can reproduce the issue here with Island/macOS. If not, I might have to leave it for my colleague Diego who’s currently on vacation, but he knows this code better, and I am not well set up for serious debugging on Windows :wink:

Hmm, seems to work fine here:

if I point it to a folder that actually has html files, it serves everything fine too

I did notice an (unrelated) minor NRE specific to Island though, that I;m fixing now. But I don’t believe that’s the cause of your problem, as this happened as part of a expected exception when the connection shuts down.

I don’t know then because it definitely doesn’t work on my end. The .NET sample project does but my test application does not. The folder in question does exist and has “Everyone” set to full control. I tried adding an simple index.html page but got the same result.

I am using the Internet Pack from the repository.

I thought perhaps it was something that was updated in RTL2 so I tried to build Elements.RTL.Island.Windows and get an error:

(E44) No member “FullName” on type “RemObjects.Elements.System.Type” Elements.RTL.Island.Windows C:\Projects\Test Projects\RTL2-master\RTL2-master\Source\Reflection\Type.pas 113

I tried downloading RTL2 again since it shows an update today but still get the same error.

When that failed I tried referencing RemObjects.InternetPack.fx in C:\Program Files (x86)\RemObjects Software\Elements\References\Island\Windows\x86_64 instead but still get the hard crash.

I’ve tried changing the port number. I’ve tried pointing it to a different folder.

I’ve even tried running it from the command prompt to see if it is a Visual Studio issue.

No matter what I try it fails.

Not sure where to go from here but I’ll keep poking at it…

You need both latest Island RTL and Elements RTL for this, yes, that’s a change I made yesterday (for serialization, and for general platform consistency).

Probanly bets to just wait for 2861, out soon today, at this stage.

Ok, I’ll see if I can try on Windows, later

Just for giggles I decided to try a different platform and built the .NET Standard version of Internet Pack.

My first thought was to try your Console Application (.NET Core) / RemObjects C# template. This one works.

Next I ran Microsoft’s standard .NET console application template and chose .NET 6. This one works.

Finally I ran the template for the RemObjects C# Classic .NET console application for .NET Framework 4.x and this one also works.

I get my basic index.html everywhere but Island.

Yeah, I’ve been using the .NET Standard one for two projects I’m working on right now, extensively. ;). Note that the different .NET flavors will make very little difference here, while Island is a whole different platform and uses very different low-level APIs under the hood.

Now that we’ve established Island/macOS works too, we know the issue must be in something specific to Windows. I’ll have a look once I have a chance to grab my other laptop where I have the Windows VM.

Curious, i get this error on Windows. Not the same as yours, but definitely something is broken:

~> Process Internet Pack Test started, took 0.682.
The magic happens here.
!> Exception of type RemObjects.Elements.System.Exception on thread 1DB8
!> Message: No default constructor could be found on type RemObjects.InternetPack.Http.HttpServer.HttpWorker

#> (edb) bt
~> 0140701701664816 RemObjects.Elements.System.ExternalCalls.RaiseException Internet_Pack_Test.exe (windowshelpers.pas, line 1407)
~> 0140701702010664 RemObjects.Elements.System.Type.Instantiate__i01ta__1sBoehmGC Internet_Pack_Test.exe (type.pas, line 691)
~> 0140701702184456 $ehgcr_6_5 Internet_Pack_Test.exe
~> 0140701701689652 RemObjects.Elements.System.<global>.WindowsThreadProc Internet_Pack_Test.exe (thread.pas, line 0)
~> 0140732978822380 BasepInitAppCompatData KERNEL32.DLL

#> (edb) 

I’ll need to create a local build of IP so I can debug more…

This seems to be either a compiler or Island RTL bug that’s out of my wheelhouse :(. I’ve created an issue E26712 for the team and will try to create a smaller test case now, but chances are I can’t fix this today, myself.

I can certainly understand that.

Thank you for looking at it.

1 Like

Workaround: built the Debug config of Island RTL, and reference that, instead of the one we ship.