2760 2
"Invalid URI: The format of the URI could not be determined" Error in C#

I am trying to run the below code in my asp.net MVC web-application, to get the URL of first image(<img>) in the HTML string, using the code below

       public static List<Uri> FetchLinksFromSource(string htmlSource)
        {
            List<Uri> links = new List<Uri>();
            string regexImgSrc = @"<img[^>]*?src\s*=\s*[""']?([^'"" >]+?)[ '""][^>]*?>";
            MatchCollection matchesImgSrc = Regex.Matches(htmlSource, regexImgSrc, RegexOptions.IgnoreCase | RegexOptions.Singleline);
            foreach (Match m in matchesImgSrc)
            {
                string href = m.Groups[1].Value;
                links.Add(new Uri(href)); //getting error here
            }
            return links;
        }

but I am getting this error "Invalid URI: The format of the URI could not be determined" when I run this code, here is the image of the error

...

Type
Question
C# asp-net-mvc invalid-uri asp.net
2744 2
Git push error "git did not exit cleanly (exit code 128)" , how to solve?

When I am trying to push my new commit using Tortoise-Git on server, I am getting this error "git did not exit cleanly (exit code 128)", here is the image of the issue

...

Type
Question
Git push error git did not exit cleanly
2708 0
Exception handling in C# (With try-catch-finally block details)
In this article, I will explain you in detail about the concept of Exception handling in C# and how we can use try-catch block to handle errors with example.
Type
Article
C# exception handling c# exception c# try catch
2677 1
Ways to Convert Datatable to List in C# (with performance test example)
This article explains you the various ways to convert Datatable to List using C# with example, this article also shows a small performance test of linq and foreach method.
Type
Article
C# ASP.NET Datatable to List convert datatable to generic list c# convert datatable to list in c# using linq c# convert datatable to list of objects
2459 2
Multiple actions were found that match the request: in web api C# ?

HI, I am trying to work with the Web API in C#, and when calling it using jquery I am getting the error "Multiple actions were found that match the request: in web API C#", so how to resolve this issue, here is my current code

...
Type
Question
C# MVC Web-api multiple actions were found error asp.net

2450 2
Error : Keyword not supported: 'metadata'

I was trying to use Hangfire.IO in my MVC ASP.NET boilerplate application and pasted this code in Startup.cs as explained here in tutorial

...
Type
Question
C# ASP.NET Keyword-not-supported
2376 0
Encrypt password & decrypt it (C# Console application example)
In this article, I am going to provide code in C# to encrypt password and decrypt it using AES in Console application example & also shows MD5 password hashing example.
Type
Article
C# c# encrypt password encryption and decryption in c#
2255 1
Connect to SQL Server in C# (example using Console application)
In this article, I will provide working console application example in C# to connect to SQL server database and explain about connection string C# with various connection strings sample.
Type
Article
C# c# connect to sql server c# database connection
2146 0
File I/O in C# (Read, Write, Delete, Copy file using C#)
In this article, I have explained about File input/output (I/O) handling operations in C# with an example to read, write data to a file and delete or copy the file using C# .NET Console application.
Type
Article
C# File I/O File handling in C#
2138 2
DbArithmeticExpression arguments must have a numeric common type

When I am trying to run this command using Entity framework in controller of my project

...
Type
Question
C# Linq Entity Framework

Page 2 of 12