Comments (7)
Looks like {{{System.Uri}}} handling in Mono is inconsistent with .NET. I attempted to work around this, which made your particular program run. There might be more issues, please report if you encounter any. Thanks.
Original comment by: Anton Tayanovskyy
from core.
Fix #13.
→ <<cset 047e284b6218>>
Original comment by: Anton Tayanovskyy
from core.
Just ran into the same issue using XSP4 rather than Apache
Original comment by: perfectshuffle
from core.
Fixed with 1 line change. See patch below:
#!diff
# HG changeset patch
# User James Freiwirth
# Date 1370820182 -3600
Fix URL generation for Ctx.Link on MONO
See also: https://bitbucket.org/IntelliFactory/websharper/issue/13/url-resolving-functions-misbehaving-on
diff --git a/IntelliFactory.WebSharper.Sitelets/Router.fs b/IntelliFactory.WebSharper.Sitelets/Router.fs
--- a/IntelliFactory.WebSharper.Sitelets/Router.fs
+++ b/IntelliFactory.WebSharper.Sitelets/Router.fs
@@ -47,7 +47,7 @@
/// Creates an absolute or relative URI from a string.
let makeUri uri =
- Uri(uri, UriKind.RelativeOrAbsolute)
+ Uri(uri, UriKind.Relative)
let isAbsoluteUri uri =
(makeUri uri).IsAbsoluteUri
Original comment by: perfectshuffle
from core.
Sorry for the awful delay, I am just hitting this same issue again with Mono 3.2.3 and WebSharper 2.5 alpha. Your fix seems to work, as does the following (I know, absolute URIs may not be very likely but still)..
let makeUri str =
let mutable res = null
if System.Uri.TryCreate(str, System.UriKind.Relative, &res) then res else
System.Uri(str, System.UriKind.Absolute)
The TryCreate methods may only work with latest frameworks (such as .NET 4x) but this is what we are targeting anyway for WebSharper 2.5. Will commit soon.
Original comment by: Anton Tayanovskyy
from core.
→ <<cset 8fdd3e14601d>>
Original comment by: Anton Tayanovskyy
from core.
Looks like System.Uri handling in Mono is inconsistent with .NET.
Did you report the bug in Xamarin's bugzilla?
Original comment by: knocte
from core.
Related Issues (20)
- Add support for `StringBuilder`
- Add support for `System.Convert`
- Class with a base class with inlines only
- Add ImportFile helper
- Import attribute handling HOT 1
- Incorrect JS translation in case of invalid characters in name
- Question about .NET Framework HOT 2
- Allow name collision on interfaces with Stub HOT 1
- Treat interfaces as AbstractClasses when interface is marked as Stub HOT 1
- Optional parameter handling in Stub annotated interfaces. HOT 1
- Struct copy handling issues
- Correct capitalization in the HTML5 namespace
- ParamArray overload resolution in WIG
- System.Exception loses message
- Allow sitelets to return SPAs HOT 4
- Allow `wsconfig.json` to define overrides for Debug/Release configurations
- Add missing Style property for HTMLElement
- 'Bitwise not' operation is broken
- Sitelet debug with npm packages STEP 3
- Add redirection helper for vite HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.