title: How to fix Invalid URI: The format of the URI could not be determined in asp.net core problem
body: <p>I am using serilog and Seq in my Asp.net core program but I keep getting the above error. My Seq server is running though. Find below the configuration in the <code>appsetting.json</code> and <code>startup.cs</code> respectively.</p>
  
  <p><em>Appsetting.json</em></p>
  
  <pre><code>"Serilog": {
      "Destructure": [
        {
          "Name": "With",
          "Args": { "policy": "Sample.CustomPolicy, Sample" }
        },
        {
          "Name": "ToMaximumDepth",
          "Args": { "maximumDestructuringDepth": 4 }
        },
        {
          "Name": "ToMaximumStringLength",
          "Args": { "maximumStringLength": 100 }
        },
        {
          "Name": "ToMaximumCollectionCount",
          "Args": { "maximumCollectionCount": 10 }
        }
      ],
      "Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ],
      "MinimumLevel": "Debug",
      "Properties": {
        "Application": "Sample"
      },
      "Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Async", "Serilog.Sinks.Console", "Serilog.Sinks.Seq", "Serilog.Sinks.Graylog" ],
      "WriteTo": [
        {
          "Name": "Console"
  
        },
        {
          "Name": "File",
          "Args": { "path": "Loggers/logs.txt" }
        },
        {
          "Args": {
            "serverUrl": "http://localhost:5341"
  
          },
          "Name": "Seq"
        }
      ]
    }
  </code></pre>
  
  <p><em>StartUp.cs</em></p>
  
  <pre><code> services.AddLogging(loggingBuilder =&gt;
   {
       loggingBuilder.AddSeq("Seq");
   });
  </code></pre>