I am new to Google App Engine. What i really need to go is host my web service which is written in ASP.net & C# on google app engine.
My web service gets a string and translate that string from already stored translated values in the database which is SQL server 2008 R2. This translated string is in the form of spans. i then return the string.
thanks
The Google App Engine currently supports applications written in Python, Java and Go and won't run ASP.net applications unless some heavy magic (such as compiling it to Java bytecode) is involved and I'm not aware of anything that can do that specific trick.
Maybe you should consider Microsoft's Azure. It's kind of an equivalent PaaS solution, but will play with Microsoft's stack.
Note: Google has since added PHP support.
Note: Now Google has the "custom runtime" that allows you to host pretty much anything you can run on a Linux machine.
It should now be possible to host ASP.NET applications on App Engine. Use the custom runtime feature on App Engine and Microsoft's ASP.NET Docker image with your application. Also, you need to create a route for /_ah/health and respond with HTTP status code 200 and a blank message body (see lifecycle events).
You can not host C# applications.
Google App Engine is focused in supporting three application environments only: Java, Python and Go.
Additionally App Engine applications can also be written in any JVM-compatible language (e.g. JRuby, Groovy, Scala, etc.) and run in a Java 6 runtime environment.
Related
I'm using CefSharp as a webbrowser framework in a Visual Studio C# Form application project.
I read in the CefSharp documentation that I can communicate from the .NET to my website using CefSharp Javascript Injection.
chromeBrowser.ExecuteScriptAsync("document.body.style.background = 'red';");
This line of code will change the background of my document to red.
I'm pretty sure this is not a proper way to establish a communication from the .NET to the website. (I would want for example to send data that the .NET project has to the website so the website can update the MySql database and this seems like a very fragile way to do it)
So I continued to google and I stumbled upon this. It says it
allows for communication between JavaScript and .Net.
Fair enough. I tried to read and understand what's going on but it's quite complex.
My question is: Is this the proper way to establish a communication from my website to the .NET project and from the .NET project to my website? Is there a simpler way?
The thing you've shown is just a communication between JavaScript and .NET
To actually communicate with the website you should use:
Web Sockets: Real-time communication between your server and client.
HTTP: You can use usual HTTP requests in C# to send requests and receive responses.
JavaScript: Run the JavaScript code that will request stuff with CefSharp tools.
I'm confused between native apps and web apps in the mobile context. I don't know if I go with native mobile development then do I need to know HTML, CSS, and JavaScript. If not then how can I make that app connect to database online for example?
If I want to build an application for chatting on mobiles. Something like WhatsApp! Will knowing a programming language (e.g. Java on Android and C# on Windows Phone) will be enough to build something like that? or what other components are necessary to add?
Native apps tend to be more recommended for android apps as they are faster as it is running what it was intended i.e. java code, html web apps tend to be slower.
For what you want to do, a chat app, then a native android app, (using java code) will probably work best then trying to do it as a web app.
You would need to learn about Http connections for your chat application. If you are accessing a database, such as MySQL, then you would need to have PHP code running on a web service where the Android app can access the database.
As an example, if your application, need to query the database, then you would tell the Android app to post to the web server running the PHP code. The PHP code would run the query on the MySQL database, and the result set should be json encoded and echo'd out, that way, Android will receive the json encoded content. Then you would need to decode the json to process what was returned in some way.
Hope this helps.
For android you will need to learn Java and XML, and if you want to make a chatting application for all or either platforms you must learn SQL, (including php).
i have a running webserver with ubuntu. (on ec2 instance)
i also have an asmx webservice i created with c#.
i want use this setup to connect between the webserver and couchbase. (but its not very important for the question itself)
is it possible (im guessing yes) to load that asmx(lets call it a file) to run on ubuntu?
what are the best tools/frameworks to deploy asmx webservice on ubuntu?
is there a reason why i should not do that, and deploy it on a windows based server instead?
(like performance, ease of use etc)
Thanks for your help!
1) is it possible (im guessing yes) to load that asmx(lets call it a file) to run on ubuntu?
Yes, you could use Mono.
2) what are the best tools/frameworks to deploy asmx webservice on ubuntu?
Hard to talk about best tools or frameworks. But you could run ASP.NET application on Apache.
3) is there a reason why i should not do that, and deploy it on a windows based server instead? (like performance, ease of use etc)
Yes, the native home of .NET applications is Windows. Mono can only follow the evolution and new features that get introduced in the .NET framework on Windows.
I have a code written in C# I would like to use as the back-end of a site I'm building.
I would prefer not to build the site front-end in ASP.NET (which integrates nicely with C#), and to use PHP or Python instead.
Is that reasonable? Should I re-consider using ASP.NET?
How can I achieve that?
Just use asp.net mvc framework for the frontend instead of plain asp.net. It's easy to learn. And if you know php it will be easy to you undestand asp.net mvc.
I don't see the reasons if you are using c# backend use php frontend. For sure you can create service layer on c# and communicate with php through it, but it does not make sence for me.
You can do whatever you like. Personally i wouldnt use php because i dont know very much php.
But you can do it, you could expose a soap web service and there are libraries that will let php talk to it.
No one here will be able to tell you what you haven't already told us. Asp.Net will probably be easier because of how everything integrates and you can share classes etc - but that does not mean you HAVE to use it.
Both of them are fairly passive server side technologies that present html to browsers though. why do you need 2 servers?
You have to ask why you are doing it .. if you are playing and want to learn then of course you can do it just to see how it all works. But if you are on a commercial project then id suggest that you dont need both a php and a c# server ... or if you do perhaps you want to go asp.net for your web server and if you need another layer of services behind then use WCF if you want to go a microsoft route. Howver it is usually possible to host all services in the same IIs instance.
You can do this i have done this for a web site my self use a database server or files,
http://dtpgroup.co.uk/
Your C# application can connection to your store save the info it needs to then php can read them if it file just use a formatted file E.G
if your using Database php can connect to MySQL or MSSQL so your C# application can use MySQL if you know what your doing in C# if not and your more comfortable in php then use MSSQL (also php have the superior documentation )
I work in both frequently
Ugh, in normal instances, reading data with C# writing it to files and loading up with PHP sound slow, inefficient and down wright crazy. I believe these terms are being used wrongly.
Client Server - user machine - database great for private networks where you connect to the DB without going over the internet
vs n-Tier
Client - Browser programming html, css, javascript connects to middleware over the internet
Middleware - inside your firewall, connects browser to database could be called part of backend - php and C# are middleware languages
Database final (generally 3rd) tier
With php and c# you are creating multiple middleware layers
why why why would you do this for a web app pick one
now if you have a web app with PHP and sneakerware in house client server apps that are controlled ie shipping, accounting that are not exposed - maybe but you have added complexity that you would not need (generally)
Gary
I would like to embed a light weight web server in a Windows application developed in .NET. The web server has to support PHP.
I have looked at Cassini, but it seems it is ASP.NET only.
The .net class HttpListener exposes the underlying http.sys upon which IIS is built. All machines since Windows XP2 have http.sys installed by default.
Here are some links to get you started.
XML-RPC SERVER USING HTTPLISTENER
HttpListener For Dummies
As for the PHP support, I don't know how you would enable this, but there is no technical reason you couldn't build it in.
I would look at the likes of XAMPP Lite which you could easily start up and shutdown with your application.
There is also AppWeb which claims to be exactly what you are looking for.
You can always use PHP as a CGI application. CGI is well documented, and AFAIK pretty easy to implement. Use Darrel Millers suggestion, and couple it with some CGI magick, and you should be cooking with gas.
Mongoose embedded webserver
https://code.google.com/p/mongoose/
You can build it with VS2012/10/08 as EXE and you can use PHP and also websockets to push data to the client app. Also you can build a DLL you can do this with make or bring the code into a VS DLL project and build out a _DLLMain, DEF file, etc. Then use it direct from C# - see the mongoose.cs and example.cs files.