Click here to Skip to main content
15,791,050 members
Home / Discussions / C#
   

C#

 
SuggestionRe: Func<> Question Pin
BillWoodruff26-May-23 20:56
professionalBillWoodruff26-May-23 20:56 
QuestionXML validation with Schematron Pin
antann781-May-23 1:56
antann781-May-23 1:56 
AnswerRe: XML validation with Schematron Pin
jschell1-May-23 12:21
jschell1-May-23 12:21 
QuestionHow to "Reach" content of an XML node/tag (and turn it into a new reader) Pin
pr1mem0ver20-Apr-23 4:30
pr1mem0ver20-Apr-23 4:30 
AnswerRe: How to "Reach" content of an XML node/tag (and turn it into a new reader) Pin
Gerry Schmitz22-Apr-23 6:34
mveGerry Schmitz22-Apr-23 6:34 
AnswerRe: How to "Reach" content of an XML node/tag (and turn it into a new reader) Pin
lmoelleb24-Apr-23 6:18
lmoelleb24-Apr-23 6:18 
GeneralRe: How to "Reach" content of an XML node/tag (and turn it into a new reader) Pin
pr1mem0ver7-Jul-23 23:46
pr1mem0ver7-Jul-23 23:46 
Question405 Error for WebSocket with WSS but not WS (ASP.Net) Pin
Gwyll14-Apr-23 5:20
Gwyll14-Apr-23 5:20 
Banging my head on a likely simple problem...
I'm getting a 405 on a WebSocket connection with WSS but not WS.
Vanilla project in VS with this code. Starting with HTTP works. Starting under HTTPS faults 405.
public static class Program {
  public static void Main (string [] args) {
    var builder = WebApplication.CreateBuilder ( args );
    var app = builder.Build ();
    app.UseWebSockets ();

    app.MapGet ( "/" , (HttpContext http) 
      => http.Response.WriteAsync ($$"""
      <script>
        self.Socket = new WebSocket(`${location.origin.replace("http", "ws")}/socket`);
      </script>
      """ ) );
    app.MapGet ( "/socket" , Connect);
    app.Run ();
    }

    static void Connect (HttpContext HttpContext) {
      _ = HttpContext.WebSockets.AcceptWebSocketAsync ().Result;
    }
}


modified 14-Apr-23 11:30am.

AnswerRe: 405 Error for WebSocket with WSS but not WS (ASP.Net) Pin
OriginalGriff14-Apr-23 7:00
mvaOriginalGriff14-Apr-23 7:00 
GeneralRe: 405 Error for WebSocket with WSS but not WS (ASP.Net) Pin
Gwyll14-Apr-23 8:53
Gwyll14-Apr-23 8:53 
GeneralRe: 405 Error for WebSocket with WSS but not WS (ASP.Net) Pin
jschell14-Apr-23 12:38
jschell14-Apr-23 12:38 
AnswerRe: 405 Error for WebSocket with WSS but not WS (ASP.Net) Pin
Gwyll14-Apr-23 13:43
Gwyll14-Apr-23 13:43 
QuestionHow to get XSI:type in inner class while converting to XML Pin
dineshrastogi14-Apr-23 2:42
dineshrastogi14-Apr-23 2:42 
AnswerRe: How to get XSI:type in inner class while converting to XML Pin
Pete O'Hanlon14-Apr-23 3:05
subeditorPete O'Hanlon14-Apr-23 3:05 
QuestionC# List of Tasks Pin
Kevin Marois6-Apr-23 20:07
professionalKevin Marois6-Apr-23 20:07 
AnswerRe: C# List of Tasks Pin
OriginalGriff6-Apr-23 20:15
mvaOriginalGriff6-Apr-23 20:15 
GeneralRe: C# List of Tasks Pin
Kevin Marois6-Apr-23 20:45
professionalKevin Marois6-Apr-23 20:45 
GeneralRe: C# List of Tasks Pin
OriginalGriff6-Apr-23 21:21
mvaOriginalGriff6-Apr-23 21:21 
GeneralRe: C# List of Tasks Pin
Kevin Marois6-Apr-23 21:22
professionalKevin Marois6-Apr-23 21:22 
GeneralRe: C# List of Tasks Pin
OriginalGriff6-Apr-23 22:50
mvaOriginalGriff6-Apr-23 22:50 
GeneralRe: C# List of Tasks Pin
OriginalGriff6-Apr-23 22:58
mvaOriginalGriff6-Apr-23 22:58 
AnswerRe: C# List of Tasks Pin
lmoelleb7-Apr-23 2:54
lmoelleb7-Apr-23 2:54 
AnswerRe: C# List of Tasks Pin
jschell7-Apr-23 10:20
jschell7-Apr-23 10:20 
AnswerRe: C# List of Tasks Pin
Richard Deeming10-Apr-23 22:27
mveRichard Deeming10-Apr-23 22:27 
QuestionPassword Regex Help Pin
Jassim Rahma28-Mar-23 10:41
Jassim Rahma28-Mar-23 10:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.