Create Android App using Apache Cordova and web service - asp.net

i am really new on this so i need some suggestions.
Using Visual Studio, i want to create an android application and i want to have flexibility so i will use Apache Cordove. It allows you to use standard web technologies - HTML5, CSS3, and JavaScript for cross-platform development.
This is my client-side part and this part will communicate with the server-side ASP.NET Web Service and provide datasources through HTPP Ajax requests.
In this scenario, how can publish my app for testing and maybe after that for publish to outworld?
If i host my Web Service to azure and create the apk file will be work?

Creating a Android app using apache cordova requires a Android SDK.You need to install packages required to create and run the apache cordova using visual studio, There is another alternative for this which I found easy one use ubuntu linux with eclipse and Android SDk latest version which can be configured to create a apache cordova project.
Your another concern is regarding the calling of a webservice hosted on azure environment is as easy and same as calling a webservice's webmethods from javascript you just need to provide the appropriate url of the webservice in ajax call.

Related

Web API as a windows service

So I'm creating a new .Net Framework 4.8 Web API in Visual Studio 2019 and I'm wanting to know how to create the API as a windows service? I can't seem to find any examples or online resources to do so. I can run the API locally in VS and it opens Chrome and shows the responses under the local IIS Server it spins up. How do I take this same project and compile it as a windows service while still using HTTPS?
Web API is fully capable of being self hosted on top of OWIN, and does not require IIS to run.
Web API self hosted is basically just a console app. So the techniques for turning a Web API console app into a Windows Service are the same as for any other .NET console app. You can use a service manager such as NSSM, or create a Windows service project directly (by inheriting from the appropriate classes, pretty messy) or use a library like TopShelf.
Note that it's generally not a good idea to directly expose this self hosted app directly to the public. IIS provides a lot of security benefits out of the box designed to protect against malicious requests. If you're planning to publicly expose it, make sure you stick a proxy in front of it that will fulfill those security needs.

How do I put an ASP.Net Framework API made in C# onto Pivotal Cloud Foundry?

I created a RestAPI in ASP.Net and need to put it on Cloud Foundry. This is not .NET Core, it is .NET Native. If someone could point me in the right direction that would be great!
Pivotal Cloud Foundry has now came up with windows native tile for PCF Runtime for Window. Your PCF operator needs to add this tile and then you can host .net native api on to PCF.
After above setup, developers simply “cf push” their app to Windows Server or Linux and PCF does the routing to ensure their code runs in a container, on the right OS. For .NET developers this means full PCF support pushing full, native .NET applications onto Windows
For more info please follow this
Apart from that you can simply use Hosted Web Core Buildpack to run your core .net app.

How to integrate .NET web application project (API) with Apache Cordova Project?

So this is the issue:
I have a .NET project that includes 5 Web Application Layers.
One of them is API.
I Recently added a Cordova project as well and I'd like it to communicate with the API Layer.
Is there anyone who knows what to do?
P.S.:
I use visual studio 2013.
You can use normal jQuery Ajax calls to make requests to the API. http://api.jquery.com/jquery.ajax/ or just normal JavaScript ajax https://stackoverflow.com/a/8567149/487940.
I hope that answers your question.
If you're talking about calling into Web API web services from a Cordova app, you may find the Breeze.JS framework useful to help you. You can either just used the client library or use some server side code in addition to client code to help get you up and running and exposing new web services as well.
Otherwise it is simply a matter of making web service calls to the server from your JavaScript code but the specifics will depend on exactly what you're trying to do and what client UI/utility framework you are using.

Deploy Web-Api, Asp.net project and a Windows service in one msi project

Is it possible to deploy ;
1- a web-api project
2- a website written in Asp.net
3- a WCF service as windows service
in one msi file using/in Windows Web Installer Project (preferably) or in Wix ?
Yes, it is possible using WiX. I maintain an open source project called IsWiX that even makes it somewhat easy. See:
Create and Package a Windows Service using IsWiX
IsWiX Web Site Demo
The concept behind IsWiX is project templates (scaffolding) and graphical designers that give you a project structure and most heavy lifting for your WiX MSI project. The template already contains examples of IIS configuration that merely need to be uncommented out. If you need a Web API and a Web Site you'll have to clone that part of the code and make a few adjustments. For example a static website typically won't be a web application where a web-api will be. Then you'll use the services designer to define the windows service. The fact that the service hosts a WCF endpoint really doesn't matter.
For that matter, one of the really cool things about WCF is it's possible to eliminate your dependencies on IIS. I've seen solutions using this with no dependency on IIS and this really makes creating installers a lot simpler.

Using SocketScan SDK with C# Web Service

What I am trying to do is to call a web service using jquery (ajax json call) and use this SocketScan sdk in the web service (C# based web service).
As, my Mobile App uses only Jquery so I have to make use of this Socketscan sdk in the web service only.
I want to build a sample app for the same. How can I achieve this?
I have added the dll reference to my web service and can see all the methods used in dll but I am not able to understand the flow of dll.
Regards
Aman
Telerik AppBuilder is based on Cordova, so you can't call native code directly and the ScanAPI SDK doesn't support javascript. You will need a plugin which wraps the native SDK (C#, Java or Objective-C, depending on your target platform) and exposes the functionality you need to your app. You may have to develop a Cordova plugin, if there isn't already a plugin released under a suitable license for your app.

Resources