tagged [uri]

best URL validation

best URL validation im using code as below to check for the URL validation: The result as below should show all as , but somehow it has its own pattern to validate the url: : google.com : [http://

23 May at 11:47

Path.Combine for URLs (part 2)

Path.Combine for URLs (part 2) For awhile now, I've been searching for a Path.Combine method that works on URLs. This is similiar to [Path.Combine for URLs?](https://stackoverflow.com/questions/372865...

23 May at 10:30

Get file extension or "HasExtension" type bool from Uri object C#

Get file extension or "HasExtension" type bool from Uri object C# Quick question: Can anyone think of a better way then RegEx or general text searching to work out whether a Uri object (not URL string...

31 Dec at 04:16

How are parameters sent in an HTTP POST request?

How are parameters sent in an HTTP POST request? In an HTTP request, parameters are sent as a : In an HTTP request, the parameters are not sent along with the URI. In the request header? In the reques...

17 Dec at 10:21

I get a 400 bad request - invalid Url when the length of the request exceeds 320+ characters

I get a 400 bad request - invalid Url when the length of the request exceeds 320+ characters Not sure what could be the reason. Added the following in Web.config also. maxUrlLength="1024" maxQueryStri...

6 Nov at 11:4

How can I get the baseurl of site?

How can I get the baseurl of site? I want to write a little helper method which returns the base URL of the site. This is what I came up with: ``` public static string GetSiteUrl() { string url = st...

27 Sep at 06:54

Use URI builder in Android or create URL with variables

Use URI builder in Android or create URL with variables I'm developing an Android app. I need to build a URI for my app to make an API request. Unless there's another way to put a variable in a URI, t...

21 Sep at 18:14

Check if a url is reachable - Help in optimizing a Class

Check if a url is reachable - Help in optimizing a Class net 4 and c#. I need a Class able to return a Bool value if an Uri (string) return [HTTP status codes 200](http://en.wikipedia.org/wiki/List_of...

11 Jun at 18:52

How to get Bitmap from an Uri?

How to get Bitmap from an Uri? How to get a Bitmap object from an Uri (if I succeed to store it in `/data/data/MYFOLDER/myimage.png` or `file///data/data/MYFOLDER/myimage.png`) to use it in my applica...

Uri.AbsoluteUri vs. Uri.OriginalString

Uri.AbsoluteUri vs. Uri.OriginalString I recently became aware of the odd behavior of `Uri.ToString()` (namely, it unencodes some characters and therefore is primarily suitable for display purposes). ...

8 Mar at 18:39

Regex to parse image data URI

Regex to parse image data URI If I have : ```

19 Dec at 20:56

Add scheme to URL if needed

Add scheme to URL if needed To create a Uri from a string you can do this: But the problem is if the string (like the one above) doesn't contain the protocol you will get an exception: "`Invalid URI: ...

11 Oct at 14:34

Registering an Application to a URI Scheme in windows 10

Registering an Application to a URI Scheme in windows 10 A few years back I developed a Silverlight Component called from within an ASP.net web app, that uses PInvoke to access a USB (Serial COM port)...

21 Sep at 11:57

servicestack pass forward slash in uri

servicestack pass forward slash in uri I'm using servicestack to build a web api serving some old data over the web. Unfortunately the data schema does not lend itself particularly well to the standar...

9 Sep at 17:48

How to implement my very own URI scheme on Android

How to implement my very own URI scheme on Android Say I want to define that an URI such as: must be handled by my own application, or service. Notice that the scheme is `"myapp"` and not `"http"`, or...

Convert file path to a file URI?

Convert file path to a file URI? Does the .NET Framework have any methods for converting a path (e.g. `"C:\whatever.txt"`) into a file URI (e.g. `"file:///C:/whatever.txt"`)? The [System.Uri](https://...

30 Mar at 20:49

Getting exact domain name from any URL

Getting exact domain name from any URL I need to extract the exact domain name from any Url. For example, Url : [http://www.google.com](http://www.google.com) --> Domain : google.com Url : [http://www...

17 Dec at 18:56

ServiceStack URI encoding

ServiceStack URI encoding I'm using ServiceStack for a while now and I'm very happy with the functionality it provides. Already implemented serveral services with it and it works like a charm. Recentl...

24 Nov at 09:56

Why is it that "No HTTP resource was found that matches the request URI" here?

Why is it that "No HTTP resource was found that matches the request URI" here? I have code in my controller like so: ...and I'm calling it via Postman like so: .

Create new URI from Base URI and Relative Path - slash makes a difference?

Create new URI from Base URI and Relative Path - slash makes a difference? does a slash make difference when using [new URI(baseUri, relativePath)](http://msdn.microsoft.com/en-us/library/9hst1w91(v=v...

20 Mar at 20:4

Is there any way to specify a suggested filename when using data: URI?

Is there any way to specify a suggested filename when using data: URI? If for example you follow the link: `data:application/octet-stream;base64,SGVsbG8=` The browser will prompt you to download a fil...

9 Mar at 15:13

C# The provided URI scheme 'http' is invalid; expected 'https'

C# The provided URI scheme 'http' is invalid; expected 'https' I am getting this error while invoking a method of my web service, I dont know what to do anymore :s Here is the exception details: > {"T...

14 Feb at 13:35

Add Whatsapp function to website, like sms, tel

Add Whatsapp function to website, like sms, tel I have a website that a lot of people view on mobile. I have link for : Call and SMS and I want to add one for Whatsapp, so a user can click the whatsap...

30 Jan at 13:17

Get just the domain name from a URL?

Get just the domain name from a URL? I am trying to extract just the domain name from a URL string. I almost have it... I am using URI I have a string.. my first thought was to use Regex but then i de...

17 Dec at 07:45

Is embedding background image data into CSS as Base64 good or bad practice?

Is embedding background image data into CSS as Base64 good or bad practice? I was looking at the source of a greasemonkey userscript and noticed the following in their css: ``` .even { background: #ff...

29 Nov at 12:21