155
questions
0
votes
1
answer
115
views
How do I get started with ExtJS and WebSharper?
I'm struggling to use ExtJs with WebSharper. I'd like to run the code sample (pasted at end) here as a starting point:
https://try.websharper.com/snippet/0000XW
I used the Nuget package WebSharper....
0
votes
1
answer
75
views
External JS library not applied to tag generated by Websharper
According to this post:
External JS library with WebSharper in F#
And integrate the implementation here:
Tag input and type ahead with Bootstrap-taginput and typeahead.js in WebSharper.
I create an ...
1
vote
1
answer
35
views
WebSharper.UI.Next missing
open WebSharper.UI.Next.Client
open WebSharper.UI.Next.Html
open WebSharper.UI.Next
Don't know why after update the Nuget package WebSharper.UI.Next from 4.6 to 4.7, these namespaces are not ...
2
votes
1
answer
425
views
F# : Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead
While executing the POST or PUSH requests in Postman for the following repository (https://github.com/websharper-samples/PeopleAPI),
I am getting this error :
System.InvalidOperationException: ...
1
vote
2
answers
1k
views
Creating a DatePicker from CDN with React API
I am importing some React modules from CDN (that's not a requirement, I've also tried with a local build, more in the final question about it):
<script crossorigin src="https://unpkg.com/react-...
1
vote
2
answers
717
views
Project doesn't compile after upgrading from Visual Studio 2017 to 2019
I can't understand the warnings and errors from Visual Studio 2019. It seems that all the references to the packages of the project are no longer working after the upgrade from Visual Studio 2017.
...
2
votes
1
answer
128
views
Using WebSharper to render SVGs server-side
I'm trying to generate SVGs server-side, passing them in to a client using WebSharper's RPC mechanism. I'm basing this off the websharper-web template, using dotnet core.
For the sake of ...
2
votes
1
answer
569
views
How to use results of FSharp.Compiler.Services
I'm trying to build a system that is similar to FsBolero (TryWebassembly), Fable Repl and many more that uses Fsharp.Compiler.Services.
So I expect it is feasible to achieve my goals but I ...
1
vote
1
answer
68
views
Can't get WebSharper Javascript Client to run hosted on Suave
I am trying out the example snippet titled "Adding client-side functionality" from the following page :
https://developers.websharper.com/docs/v4.x/fs/overview
It looks a bit outdated and doesn't ...
1
vote
1
answer
132
views
Linking to endpoints from the client-side in WebSharper
In sitelets it's rather easy to create links to other endpoints with parameters. For example ctx.Link(EndPoint.ShowUser user.id)) creates a link to the ShowUser endpoint with a specific ID.
Now I'm ...
1
vote
1
answer
101
views
Unable to properly proxy a C# type to client code in an F# WebSharper application
I am experiencing issues when consuming a certain C# type in an F# web application.
The following C# type is present in a library I refer to in my F# app:
public static class OuterType
{
public ...
1
vote
1
answer
556
views
`Page not found (404)` in POST endpoint with JSON data
I'm trying to use a POST endpoint that accepts JSON data from a HTML form, but only get 404 - Page not found as a result, unless I add another endpoint without the payload.
So I can create a demo ...
1
vote
1
answer
84
views
How to convert View<doc> or Async<doc> to Doc in webSharper?
Please, I am new to WebSharper does anyone know how I can convert View (doc) or Async (doc) to Doc in webSharper? I have tried to open "WebSharper.UI.Next.Client" but does not seem to be compatible ...
1
vote
1
answer
193
views
WebSharper - How to expose dynamically mapped strategy-pattern objects on the server to the client?
I am at the process of learning WebSharper, and I am struggling with making some of my logic work on the client-side.
I have a few server-side objects with inheritance hierarchy, which I need to ...
1
vote
1
answer
283
views
How to encapsulate logic within children like component frameworks?
I'm trying to understand how to create reusable components using the Elmish architecture within F# Bolero by WebSharper (e.g. a reusable validated form input). From all of the examples I've seen, the ...
0
votes
0
answers
82
views
WebSharper: Rpc-returned object are unusuable on the client or cause error
I have a few server-side objects with inheritrence hierarchy, like this:
[<JavaScriptExport>]
type [<AbstractClass>] A() = ...
[<JavaScriptExport>]
type [<AbstractClass>] B() ...
0
votes
1
answer
66
views
Unable to embed document fragment into a WebSharper page trough a `Var<Doc>`
I am quite new to using WebSharper and I might be doing things the wrong way.
My goal is to be able to update the contents of my page as a result of user actions by updating a Var<Doc> variable ...
2
votes
0
answers
4k
views
com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E: Uncaught service() exception root cause
I am using RAD and i am facing one problems while i am trying to run application on websphere 9.0v. I'm not able to understand this issue.
errors:
[1/1/19 5:56:05:918 UTC] 00000083 ServletWrappe E ...
0
votes
0
answers
110
views
What is the best way to handle Websharper Remoting Singletons while using Simpleinjector with potentially Scoped Dependencies?
I'm trying to Convert an application I have working under a Basic Websharper Setup into an ASP.NET Core Application, Using Simple Injector for DI, but Cannot get the Configuration quite right. I think ...
1
vote
1
answer
111
views
Can I fill a websharper template's hole without knowing its name at compile time
I am new using WebSharper and I am stuck in the current situation with WebSharper 4:
I have the following html template (some-template.html) :
<div class="container">
<div ws-replace="...
3
votes
1
answer
126
views
websharper F# endpoints - catch all page handler and page redirect
sorry this is such a long post
I am using F# and WebSharper (I am new to both technologies)
I have some endpoints defined (I have working code until I add the NotFound endpoint)
type EndPoint =
...
3
votes
1
answer
141
views
websharper - using html template with two way binding
I am using WebSharper 4.3.9 and am using WebSharper.UI to try to get two way binding of variables in a web page.
I can get things working when I create the HTML elements in the f# code.
let Main () ...
1
vote
1
answer
549
views
IE11 does not set x-cfrtoken HTTP header, unless with an InPrivate window, this causes server to respond with HTTP 403 Access Denied
I've been baffled by this for two days now. The situation:
Simple website, running in Websharper, login screen, single view, through XHR with application/json responses
The site is run from within an ...
2
votes
0
answers
169
views
Cannot build basic websharper app on dotnet core and ubuntu
I'm playing with websharper with the basic project template (websharper-web) on dotnet core 2.2 on ubuntu 16.04.
I've just used the basic template to create the project:
dotnet new websharper-web -...
2
votes
2
answers
123
views
How to use Database by opening File to send and receive data from Server to Client?
I want to receive data (simply as a string) from the client-web side to update the database, but it's a bit lock for me now, so first write the data to a file in the drive with using System.IO.File....
3
votes
1
answer
143
views
ws-replace is similar to ws-hole , isn't?
ws-replace
The attribute ws-replace creates a Doc or seq hole. The element on which this attribute is set will be replaced with the provided Doc(s). The name of the hole is the value of the ws-...
0
votes
0
answers
48
views
Fsharp - Websharper Create some Types which are the same and include some buttons
I have a Type of "Person" :
Button A : Name
Button B : Age
Button C : Adres
And a button "ADD"
I want to create some "Person" when clicking to button "ADD" .
But I don't know .
I'm using ...
1
vote
1
answer
66
views
Sending SSO cookies when doing an ajax call in websharper
I've created a website using WebSharper and has stumbled into a problem. I wish to integrate the site with VSTS REST API. To do that (seemlessly) I need to forward a session cookie. How do I do that ...
1
vote
0
answers
50
views
Websharper - resources order
I have a Websharper application. The problem I have is that I am using bootstrap but jQuery is always put after it in the generated page.
Resources module
//Resources.fs
module NCF.BPP.Resources
...
2
votes
1
answer
186
views
Trying to embed a PowerBI report in a WebSharper Client Server F# application
I started from the downloaded PowerBIEmbedded_AppOwnsData C# razor demo, which works as expected. Then I tried to do the same starting with a WebSharper project, but didn't have success so far. The ...
3
votes
0
answers
112
views
Websharper doing async call returns server error 500
I'm trying to do async db query using SQLProvider and sqlite as db. The server side function looks like this
[Rpc]
let dbAsyncCall () =
async {
return! query {
// ...
}...
2
votes
1
answer
188
views
Slowing performance in Websharper application, possible memory leak
The sample code below in a single page Websharper application exhibits the issue encountered in my project.
Over time, there is some action that progressively takes longer. It occurs every few ...
1
vote
1
answer
62
views
Websharper project in Visual Studio sometimes doesn't get updated in browser
Take my apologies if the question is dumb.
I'm working on my Websharper project using 3 different computers. Sometimes when I pull a new code to any machine and hit 'build and run' (Ctrl+F5) my ...
1
vote
1
answer
125
views
Zafir.UI.Next not working with IE11
Beginning with Zafir.UI.Next Version 4.0.128.30.beta6 there is an
jQuery.Deferred exception with IE11:
jQuery.Deferred exception: Die Eigenschaft "insertBefore" eines undefinierten oder ...
2
votes
0
answers
111
views
Client-serv. app run: System.ArgumentException: An item with the same key has already been added
Have an issue after deploying and running WebSharper client-server app to the remote server: I get System.ArgumentException: An item with the same key has already been added. Here is a gist with stack ...
1
vote
0
answers
105
views
Compiling F# quotation to JS with WebSharper
I need to compile a quotation into JS string (my main goal is to write MongoDB MapReduce job in F#). I found an example code:
open Microsoft.FSharp.Quotations
open WebSharper
type AR = IntelliFactory....
7
votes
0
answers
346
views
Cookie authentication in websharper + suave + OWIN
As part of an evaluation process for a commercial project I'm searching for any full fledged example of authentication/authorization using the websharper stack. I'd like to use OWIN, since it seems to ...
-1
votes
1
answer
381
views
The task was unsuccessful: The deployment was unsuccessful due to unknown reason
Error Description:
The BAR File contains .msgflow files and this broker does not support them. To deploy this BAR file to the target broker save the BAR file selecting the 'Compile and in-line ...
0
votes
1
answer
36
views
Possibly Bug in Websharper Zafir-Libraries (Beta)
I'm trying to create a Sitelet with SiteletBuilder in C#:
return WebSharper.Sitelets.Content.Page(...)
However, the class Websharper.Sitelet contains Content both as Struct and Class.
So, this does ...
3
votes
2
answers
168
views
Failure running WebSharper 4.0 tutorial
I am learning how to use WebSharper. Actually, I am failing to learn how to use WebSharper.
I wanted to learn how to build a simple SPA so I followed this tutorial from the WebSharper page. I am ...
0
votes
1
answer
152
views
websharper access to rpc from another site (SPA)
I've got a client-server (with transpiled js and rpc calls to server) application with websharper, and it runs perfectly fine.
Now I need a single javascript file for another site (a WordPress app) ...
5
votes
1
answer
245
views
F# ionide websharperserverclient - how to run
I have a problem with running websharperserverclient template app from ionide project generator, and cannot find any information on the web how to do it - the closest thing i got was this question - ...
1
vote
1
answer
90
views
Making a Chrome extension using WebSharper
Is it possible to use WebSharper's F# to JavaScript compiler to build a Google Chrome extension?
My research tells me the Single-Page App template should be enough to write extension code. However, I ...
6
votes
1
answer
134
views
WebSharper - Is there a simple way to catch "not found" routes?
Is there a simple way of using Sitelets and Application.MultiPage to generate a kind of "default" route (to catch "not found" routes, for example)?
Example
type EndPoint =
| [<EndPoint "/">...
3
votes
1
answer
417
views
WebSharper F# - How to run a template project created with VS Code and Ionide?
I have never worked with .NET before and I would like to know how to run a WebSharper F# project without any IDE.
Context
I'm running Linux with Mono 4.4.2
The project was created with VS Code and ...
8
votes
1
answer
1k
views
What's the difference between Behavior and Event in FRP?
I'm currently reading the documentation of WebSharper. In the section about FRP, it states:
Functional Reactive Programming (FRP) typically provides an Event type for event streams and a Behavior ...
2
votes
0
answers
73
views
Where is <option> tag in websharper?
I see here that the tag for <option> is marked as "colliding" which I assume has something to do with why when I have
open WebSharper.Html.Client
and am looking through the list of tags at ...
0
votes
1
answer
116
views
WebSharper - JQuery and HTTPS reference
After deploying w# client page to the github pages, I got the following error:
Mixed Content: The page at 'https://aph5nt.github.io/websharper.amplifyjs/' was loaded over HTTPS, but requested an ...
4
votes
1
answer
118
views
JavaScript function signatures in WebSharper
I am creating an ampify.js binding for the WebSharper. (https://github.com/aph5nt/websharper.amplifyjs). While testing my extension I found one issue with publish / subscribe implementation.
I ...
1
vote
1
answer
268
views
How can I handle onchange for a select option in WebSharper UI.Next
I am trying to display a different SPA view based on the option selected from Doc.Select.
I would like to handle onchange events using WebSharper UI.Next. I have searched around for some information ...