calling a hosted Filemaker Application from a .net program - c#

In my c# application, I am trying to generically open a filemaker application that is hosted on the filemaker server assuming my c# application executes from the server that hosts the filemaker server. Currently it seems the only way I can do this is to open a generic fmp12 file that contains an External Data Source with the name "Open", type Filemaker, Details "fmnet:/fmserv/Open" where "fmserv" is the filemaker server hardcoded, along with a script trigger to Open File ["Open"]
First, is there any better way to do this programmatically in c# other than just opening this shell filemaker program? I may need to do this for over 20 different locations.

I would use the fmp:// URL protocol. You can just call it as if it were a web URL, but FileMaker Pro registers to handle all fmp:// calls. You would use it in the format fmp://server.ip.address.or.dns.name/filemakerDatabaseName.
You can even use it to call scripts and send parameters/variables to your database. See http://www.filemaker.com/help/12/fmp/html/sharing_data.16.7.html for more information.

Related

Socket.IO & Express alternative for C#?

I'm looking to see if it's possible to create an application using C# that creates a local web server and allows me to pass information from the server, to the client website.
I've been using Node.js with Express to create a local web server and then using Socket.io to pass information through to the client, to display in realtime with Javascript. Only issue is I'm more comfortable with C# and I'd like to distribute this application, with Node Modules and Electron the app is clocking in at around 150MB, it's also many files and folders as opposed to just a .exe
Details of Application:
Reads data from log files
Decodes Json inside files
Sends specific data to website
Client receives data and displays
I've managed to get halfway there by using HttpListener, but from what I understand I cant send data to it? So I figured I could edit the html before I sent it and have yet to setup the FindDivByID method
TLDR; Is there a way to create a Local Web Server (Application) that is able to send data to the Client Website.
EDIT: Thanks for the suggestion, though I'm hoping to keep it all down to one distributable application, that reads the data from the local PC, creates the web server and sends to the clients
Well, if you wanna go full C#, I'd recommend SignalR, very solid
https://www.asp.net/signalr
Alternatively, you could keep your Socket.IO server in Node.JS and use this Socket.IO C# client library to interface with it (although I never really did tried)
https://github.com/Quobject/SocketIoClientDotNet

Passing data from a javascript function in my remote website to a c# application on my desktop application

I have a dynamic program. These are the steps that the program follows.
i) I have a windows form application and I have divided the window into two parts. One part contains a ChromiumWebBrowser where it loads a remote website (like www.abc.com). The other part does normal operations of fetching data from a wampserver MYSQL DATABASE installed on the local computer and gives output on the same window division.
ii) Now I use the Chromium web browser to import data from the remote website and send it to a local php file in the local wampserver and then inside the php file I send the data to appropriate local database tables.
iii) When the remote website loads, there is a button "Import data" and then this importation is processed via an AJAX call and now it is in the ajax success: function(){ } that I send the data to my local php file. (I have control over both remote and local wampservers)
iv) NOW MY QUESTION IS how do I pass the data from the external javascript ajax to my c# application so that I don't need to have the local php file i.e. The received data will be sent to database directly from c#
v) And are there any security threats in the process?
I hope I'm was clear, Any suggestions are welcome
Easiest option is to implement a custom scheme. So for example you would make your requests to custom://ajax/uploadToDatabase. You can then parse the request, update the database and respond accordingly.
http://rawgit.com/cefsharp/CefSharp/master/CefSharp.Example/Resources/Home.html#features-custom-schemes
https://github.com/cefsharp/CefSharp/blob/cefsharp/45/CefSharp.Example/CefSharpSchemeHandler.cs#L51
The CefSharp.WinForms.Example and CefSharp.Wpf.Example projects both provide a working implementation. They're available on GitHub
https://github.com/cefsharp/CefSharp

How to communicate between php and my application on windows server

So basically i want to make a website that upload a file (an executable one .exe)from a user, when it finish upload i have to open this file on the same server (windows server) since my application run on windows
The file will be encrypted by my C# application and i want to be returned to the user by link to they can download it.
My question are:
How to communicate? between them
My application have to be a command line ?
Have you to use API?
Any useful link or some similar source to learn more are very welcome
Thank you a lot community SO.
BV1,
Ideally you should create a web service which could be consumed using your PHP application. This service could be a WCF Service exposing some methods. Look at below code:
ConsumeWCF service from PHP

Read from Filemaker Pro file in C#

I have a Filemaker Pro 7 database (.fp7) and am looking for a way to read it from a C# application.
Seems as though I need to use and ODBC driver for this but I can't seem to create a connection to a filemaker file rather than a database.
Anybody had any luck with this?
You're going to need at least FileMaker client or server to make this happen unless you want to manually navigate the binary format that FileMaker stores its data in.
If you only have the file then this seems like it would be a one-time operation. Get the trial version of FileMaker, export the data to your preferred format, and read it from that.
If the file is being actively used then it's being used with either FileMaker Server or FileMaker Pro (or both) and, depending on the which one and which version, you have a number of options (ODBC, XML, HTTP) for communicating with the database live and retrieving current data.
Personally, if this the problem is what I think it is (you are creating a solution for a client who is actively changing the data in some way), the easiest route would be to place the ODBC driver on the server or single machine if it's running in FileMaker Pro and access through that, but you could also:
Use Custom Web Publishing and access it via HTTP using the XML interface
Use a FileMaker script to periodically export the data
Move the tables from FileMaker to MySQL or something similar and use shadow tables within FileMaker and access the data directly on the SQL server

C# connections to mySQL || Retrieving Data From A C# Program Via A Browser

I am building a C# program for a company that eventually will store information about newspaper articles in a data structure. The key here is that they want to be able to query this data structure via a browser remotely, so the obvious choice I suppose therefore would be using something like SQL. So I have two questions:
If I use SQL how could I store results from the C# program as it runs to the SQL database? Would this involve opening up a connection inside the program akin to the mySQL command line console?
Is there an alternate way, i.e. where I could store the data inside the C# program solely that is running on the server, and query this for results via a web browser just as I would if I were using SQL?
Many thanks for your advice
you can communicate with an SQL server with C# ... It's pretty easy, lots of examples out there.
It would be better to use an SQL server. Using an internal database will mean you will have to implement a database mechanism that will be robust against crashes. SQL already is.
You can implement it easily by using ASP.Net (For accessing with a web browser).
Or look into WCF or web services if you want to implement your own browser. WCF or web services will give you tools to create a simple-to-use API that acts as a server.

Categories