I have designed a desktop application in c# and web application in php. my desktop application requests data by calling php file and some portion of desktop application showing web forms using web browser control. both process takes too much time. is there any other method speed up this two processes
I would write your PHP app so that it has a RESTful API available that the C# application can connect to. In this way, you can use a technology like WCF to communicate to your web-based API and use C# in your desktop app to present and work with the data being managed in the PHP app.
You're looking at going back about 15 years to the client-server architectures... not a bad thing, but all of the lessons we learned then are going to be applicable to you now.
You might could implement something with Adobe AIR.
Adobe Air
Related
Hi i have a C# WinForms app. I wrote essential methods on C#. But I need a login form and its not safe since apps like dotpeek can inspect the source code and hack it. Can i communicate with another application that is written in another language (java,c,python etc). I need to send input data from WinForms C# to another app then it should connect to database and check if login succesfull then return a value back to C# WinForms app. Is that possible, how can i implement that? I dont want to write all application in another language since C# has good methods to process images/pixels and gui support with very small memory usage.
I got the point you are trying to make.
One thing to admit is that you can't completely avoid decompiling of apps. C# or C++, no matter anything can be reverse engineered.
If you still need it, a comparatively safer approach is to not put the checking app at the client's machine. Create an API and host the database on a server.
Then initiate just an Http Request to the server from your Windows Forms app.
Then you have the full control of Login API and database. Many applications use OAuth similar to this. Another examples are apps verify it's license using an online API.
You can get a LightSail Windows server in around $10 a month if you want to setup. Try exploring
Your concern is not baseless. C#, or for that matter, any .net language running on the CLR, will be easier to inspect than a language like C or C++.
Having said that, no app will be completely secure, and communicating between apps has its own problems. How does one app verify the other? etc. You can create a web service that would communicate with the database (and communicate with the web service using HTTP or WCF) which would mean your app wouldn't have direct access to the database, but that would only protect the database from your app, it would still allow someone to inspect your app and use the web service, impersonating your app. Also, you would need to host the web service on some web hosting service, and then you would have to trust that service to not inspect your app...
You can reduce the problem by storing the password etc. as byte arrays, but regardless of what you do, I don't know of a way to completely safeguard your app. If a malicious app/actor is on your computer they can inspect your app.
As for your question itself - look into WCF or named pipes (includes a simple example).
I don't know where to start, so let's start by saying what I want.
An application on my Phone which would control/send commands to my PC
I am not asking how to code it, I want to get a brief idea on what I need in order to do it. I had thought of using ASP .NET Core Web Application, but I am not sure if that's what I need, I need a server to be running on the PC, so that the phone will connect to and send commands to the PC Client from the Mobile Client.
Also, It needs to be C# since its the only language I am fluent in.
Which library should I use on the PC and the Mobile?
You can use ASP.NET Core to create a web service that is hosted on your PC. The application on your phone could send commands by sending HTTP requests to the web service.
For example, the web service could react to a request like:
POST http://localhost:8080/do-stuff
But the web service method is not the most performant one. If you put a priority on performance, you should rather work with sockets. You can use the .NET classes like in this example or use a library.
If you want to develop everything with C#, I would recommend using Xamarin for developing the mobile app.
There are some C# console applications that started by Windows scheduler.
How can I gather work progress from any of them (using internal data available only in concrete console application)?
In other words, I want to show some data from running console application on my asp.net webforms website. How can i do this?
Host a http server inside the console app that the website can communicate with. I already kind of do this using self host signal r inside a tray application and it works a treat.
https://github.com/SignalR/SignalR/wiki/Self-host
I would preferred old good .NET Remouting for this (check out simple example for it). But you can use WCF with NetNamedPipesBinding or NetTcpBinding binding.
I have this project where i have a django server which is running on a machine, which is used to communicate with other machines on the network.
Now i also have another application written in c# on the same machine which is used to monitor state of certain hardware.
I want to know if there is a way to write a http request/response system in the c# application where i can interface it with the django server such that when django makes a request to the c# application it reads certain values and returns a response to Django.
Can someone please tell me how to write this http server on the c# application or give me resources where i can look this up.
Thanks
I have to make an application that make pc-phone and pc - pc call with asp.net. However examples I see on the web are generally made as windows application.
Can anyone give me refference, examples, documents about voip and asp.net?
You can't make a VoIP call with a pure ASP.NET application. The problem is HTTP is a stateless protocol that drops connections as soon as data transfer has occurred. VoIP is a real time application where you need to have a constant connection between the various parties (client-pbx-destination, usually).
As a result, you would need to extend your ASP.NET application with either a ClickOnce .NET Windows Forms Application or other component that runs a local application on the user's machine.