hi, .Net Httplistener need permission

Questions about Wine on Linux
Locked
game12138
Level 2
Level 2
Posts: 21
Joined: Wed Oct 10, 2018 10:35 pm

hi, .Net Httplistener need permission

Post by game12138 »

hello everyone, I finish create a C# Httplistener on Windows 10 by admin, but in wine is useless, what wrong about it? can some one fix it?

there are my C# and wine err:

HttpListener listener = new HttpListener();
string sPort = "http://+:8887/";
listener.Prefixes.Add(sPort);
listener.Start();

0009:fixme:nls:LCMapStringEx unsupported lparam 16dc50
http://+:8887/
0009:fixme:httpapi:HttpCreateServerSession ({2,0}, 0x32f390, 0): stub!

Unhandled Exception: 0009:fixme:ver:GetCurrentPackageId (0x32c89c (nil)): stub
System.Net.HttpListenerException: Access denied
at System.Net.HttpListener.SetupV2Config()
at System.Net.HttpListener.Start()
at ConsoleApplication1.Program.Main(String[] args)
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: hi, .Net Httplistener need permission

Post by DarkShadow44 »

You seem to be using native .NET, can you confirm that?

Can you try with wine-mono?
rgyorodi
Newbie
Newbie
Posts: 3
Joined: Fri Oct 12, 2018 4:57 pm

Re: hi, .Net Httplistener need permission

Post by rgyorodi »

I've had the same problem when using the native .NET

I can confirm that using wine-mono this works, but only for HTTP and HTTPS with TLS 1.0

I am looking for a solution that also supports TLS 1.2.

Can anyone confirm if wine-mono supports TLS 1.2, and if yes what are the correct settings for it? Do I need to install some native modules/dll's maybe using winetricks?

I also posted a question about this (viewtopic.php?f=8&t=31302)
game12138
Level 2
Level 2
Posts: 21
Joined: Wed Oct 10, 2018 10:35 pm

Re: hi, .Net Httplistener need permission

Post by game12138 »

DarkShadow44 wrote:You seem to be using native .NET, can you confirm that?

Can you try with wine-mono?
yes, I use .net46, and I run it in wine-mono is ok, but I need to .net46 to do other work.
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: hi, .Net Httplistener need permission

Post by DarkShadow44 »

Probably need a bugreport for the .NET issue. Tried native dlls, didn't get it to work.
game12138
Level 2
Level 2
Posts: 21
Joined: Wed Oct 10, 2018 10:35 pm

Re: hi, .Net Httplistener need permission

Post by game12138 »

DarkShadow44 wrote:Probably need a bugreport for the .NET issue. Tried native dlls, didn't get it to work.
where can I report the bug?
User avatar
DarkShadow44
Level 8
Level 8
Posts: 1207
Joined: Tue Nov 22, 2016 5:39 pm

Re: hi, .Net Httplistener need permission

Post by DarkShadow44 »

At https://bugs.winehq.org/. But only if the bug doesn't already exist.
rgyorodi
Newbie
Newbie
Posts: 3
Joined: Fri Oct 12, 2018 4:57 pm

Re: hi, .Net Httplistener need permission

Post by rgyorodi »

I looked up the source code for HTTPAPI.DLL (this is what is used by .NET, but wine-mono seems to use something else ...) and unfortunately everything is just a STUB there. Look at HttpCreateServerSession https://github.com/wine-mirror/wine/blo ... api_main.c.

So it seems that unless someone implements the functionality in that DLL or figures out how to use the native DLL (which by the way throw an exception somewhere in the line that says "Platform not supported"), this approach will not work :-(
Locked