tagged [uri]
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...
Uri constructor with dontEscape is obsolete, what is alternatieve?
Uri constructor with dontEscape is obsolete, what is alternatieve? My question is regarding passing an URL to HttpWebRequest without escaping, I searched the forums and internet, but I didn't find a g...
- Modified
- 7 Dec at 08:6
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). ...
- Modified
- 8 Mar at 18:39
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://
Combining two relative Uris
Combining two relative Uris I need to combine two relative Uris, e.g. `../mypath/` and `myimage.png` to create `../mypath/myimage.png`. They are not paths to files on disk so `Path.Combine` is not app...
How to check that a uri string is valid
How to check that a uri string is valid How do you check that a uri string is valid (that you can feed it to the Uri constructor)? So far I only have the following but for obvious reasons I'd prefer a...
How to specify a local file within html using the file: scheme?
How to specify a local file within html using the file: scheme? I'm loading a html file hosted on the OS X built in Apache server, within that file I am linking to another html file in the same direct...
Base Uri without a trailing slash
Base Uri without a trailing slash If I create a `Uri` using the `UriBuilder` like this: then the `AbsoluteUri` of `rootUrl` always contain a trailing slash like this: What I would like, is to create a...
Changing the port of the System.Uri
Changing the port of the System.Uri I have an `Uri` object which contains an address, something like `http://localhost:1000/blah/blah/blah`. I need to change the port number and leave all other parts ...
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...
- Modified
- 6 Nov at 11:4
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...
Getting the parent name of a URI/URL from absolute name C#
Getting the parent name of a URI/URL from absolute name C# Given an absolute URI/URL, I want to get a URI/URL which doesn't contain the leaf portion. For example: given [http://foo.com/bar/baz.html](h...
Download data URL file
Download data URL file I'm playing with the idea of making a completely JavaScript-based zip/unzip utility that anyone can access from a browser. They can just drag their zip directly into the browser...
- Modified
- 2 Apr at 06:12
what does this mean ? image/png;base64?
what does this mean ? image/png;base64? I don't know what we call this. but i found a image at google 404 ``` url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKsAAADVCAMAAAAfHvCaAAAAGFBMVEVYn%2BH%2...
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...
- Modified
- 21 Sep at 18:14
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...
Is there a right way to build a URL?
Is there a right way to build a URL? In much of the code I work with there is horrible stuff like: or - even worse: Is there a rig
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...
- Modified
- 24 Nov at 09:56
Uri.EscapeDataString() - Invalid URI: The Uri string is too long
Uri.EscapeDataString() - Invalid URI: The Uri string is too long I'm using compact framework/C# on windows mobile. In my application I am uploading data to the server by serializing objects and using ...
- Modified
- 13 Feb at 09:25
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...
- Modified
- 14 Feb at 13:35
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...
- Modified
- 9 Sep at 17:48
Was FxCop wrong to tell me to use the .Net Uri class?
Was FxCop wrong to tell me to use the .Net Uri class? When getting a URL for something in an Amazon S3 bucket it can append a signature to the end to confirm that the user has permission to view the o...
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)...
- Modified
- 21 Sep at 11:57
Android: Getting a file URI from a content URI?
Android: Getting a file URI from a content URI? In my app the user is to select an audio file which the app then handles. The problem is that in order for the app to do what I want it to do with the a...
How to URL encode a string in Ruby
How to URL encode a string in Ruby How do I `URI::encode` a string like: to get it in a format like: as per RFC 1738? Here's what I tried: ``` irb(main):123:0> URI::encode "\x12\x34\x56\x78\x9a\xbc\xd...
- Modified
- 6 Feb at 00:11
MonoTorrent magnet link download does not start
MonoTorrent magnet link download does not start I strongly believe that MonoTorrent library can do this, but it is probably due to the lack of documentation that I haven't been able to get it working....
- Modified
- 23 May at 12:2
How to use "Share image using" sharing Intent to share images in android?
How to use "Share image using" sharing Intent to share images in android? I have an image galley app; in that app I placed all the images into the drawable-hdpi folder. I call images in my activity li...
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...
In WPF, how do I reference a font in a resource library in code behind?
In WPF, how do I reference a font in a resource library in code behind? I have an application that uses a separate library assembly for resources (but not a resource-only assembly with no code), and I...
How to open a packaged file with WinRT
How to open a packaged file with WinRT I am trying to figure out how to port some .Net code that parsed an xml file to WinRT. So far, with the help of [The given System.Uri cannot be converted into a ...
- Modified
- 23 May at 11:58
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...
- Modified
- 29 Nov at 12:21
How to create a Uri instance parsed with GenericUriParserOptions.DontCompressPath
How to create a Uri instance parsed with GenericUriParserOptions.DontCompressPath When the .NET `System.Uri` class parses strings it performs some normalization on the input, such as lower-casing the ...
HttpWebRequest long URI workaround?
HttpWebRequest long URI workaround? I've encountered an issue with HttpWebRequest that if the URI is over 2048 characters long the request fails and returns a 404 error even though the server is perfe...
- Modified
- 19 Oct at 10:41
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: .
- Modified
- 17 Jul at 21:43