I think here the issue is that act is a value and not a function, so it can't be called as an RPC. You need to declare it as a function taking unit as argument:

1
2
3
4
5
    [<Remote>]
    let act() =
        async{
            sample.main()
        }

and call it the same way.

Note that you should also change sample.main to take a unit argument, otherwise it will only be run once on startup, instead of every time you call act().

This is definitely something that should get a clearer error message though!

By on 2/23/2018 12:51 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper