Deploy web application and console application on azure - c#

I'm new on azure so please help me, i have next question:
I have asp .core web application and few simple console applications(not core) that I'm use as services via json rpc.
when I'm hosted on iis i don't have a problem my services was placed on my web app server and recived queries from my web app trough local IP address as 127.0.0.1:port
now I need to move this scheme on azure , how can I deploy my console application services so I can connect them with my web app that will be deployed on azure to ?
Thank you!

Deploy the web application on Azure App Service. Do a bit of rewriting and make use of Azure Queues to talk to your Console Applications. Deploy them as WebJobs with a Queue trigger.
Keep it simple, place a message in a queue, have the WebJob (Console App) read from that queue and do the work. Place the result on disk (d:\home\site on App Service) or Blob Storage and signal with a queue message (or place the result straight into the queue message if it's just a few KB in size).
Alternatively, you may want to look at Azure Functions as Console Application vNext.

Related

Deploying an Web API2.0 with angular application on azure

We've create the Project Using Web API 2.0 and Angular 9 as front end.
Now we want to deploy this application on azure VM using iis service on Which we dnt have much experience.
Any help can be appreciated.
Thank you in advance
Follow these steps to publish your Web API and UI to Azure:
Create an Azure account Step
You should have a subscription to your Azure account
Add app service to be deployed to your API
Create a web app for your UI to be published
If you have DB connectivity in your API you need to add Azure SQL DB
In Step 3 and Step 4 you will get the Separate Publish URL
Deploying asp.net web application from visual studio to Azure
In the solution explorer, right-click on the web application project and click Publish
Select Azure and click Next
Select Azure App Service and click Next
Click on the + sign
Provide a Name for the App Service. This is the name that will be used to access the web application
Select your Subscription and Resource Group
Finally select your hosting plan. If you wish to use a free hosting plan. Click on
the New link
Provide a name, location and the size for the Hosting Plan. It is the size that determines what you pay and what features you get. I have selected the Free pricing tier for illustration
Remember, to host a web application in Azure we need App Service and an App Service Plan
Now we are creating them (App Service and App Service Plan) from within visual studio instead of going through the azure portal.
Click OK and the finish.
In a few minutes your app will be deployed to Azure and you can access it using the URL

Deploy a self-hosted SignalR backend to Azure

I made a web application with the following architecture :
A React.js frontend (only client-side javascript, no Node.js server)
A SignalR self-hosted backend in a C# console app
I would like to deploy my setup to Azure but I am a complete newbie with Azure.
I should be fine deploying the front-end by following a tutorial like this one
but I can't find any resource about deploying a SignalR self-hosted backend.
I found some resources discussing about a ASP.NET MVC SignalR web application hosted in IIS on Azure, but not about a self-hosted one.
Should I be using an App Service for my backend? Any caveats?
Thank you for enlighting me
You can but it is not best performance wise, to host your SignlarR on IIS.
Reasons for not hosting in IIS include:
Environments where IIS is not available or desirable, such as an
existing server farm without IIS. The performance overhead of IIS
needs to be avoided. SignalR functionality is to be added to an
exising application that runs in a Windows Service, Azure worker role,
or other process.
In Azure you can run it as for example:
App Service (read more).
Windows Service (example and read more).
Worker role (read more)

Best Approach to communicate between a Windows forms application written in C# and Native Android App

so our company wrote an accounting app,in windows,using c# for a certain company that ordered an accounting application.
after a while,they requested an android app that can communicate with the server and request or send data from or to the database that the windows form application uses,which uses SQLExpress 2014.
note that : the application that runs on the android platform may need run on more than one client at any given time.
AND
the android app will be native.
my main question is this : whats the best technology to use?
do i HAVE to use web services ?
well to do that i have to install IIS on the windows client which is
all im trying to avoid,because i have a setup and the program has been
mass produced within the city so i cant just take back every
customer's product and add iis setup procedures to the setup...if u
know what i mean
Not true. Since WCF days, there's an in-process option called XXX self-host which is a tiny web server written in C# and started along with your process using code.
Currently your best web should be developing your Web services using OWIN/Katana self-host and implement your RESTful service running on a Windows service (did you know about TopShelf?).
Check this interesting MSDN article to learn more about self-hosting a Web API into a Windows Service using Topshelf.
TL;DR
Your best bet here would be creating a Windows service which might be installed along with the Windows application or in some customer's server machine and host this way your RESTful Web service using ASP.NET Web API.
This is easy to deploy and distribute, and your customer won't require an IIS installed to host web services.

How to deploy a web application with WCF as a cloud service using Windows Azure Pack?

We want to develop a web application as a cloud service on windows Azure. The application has the following architecture:
This application was a simple line of business winforms application, where any customer could purchase and use it. Now our company decided to redesign it as a web application where many customers can work on it in the same time. The core application will stay the same, just some simple customizations, it does some simple tasks in the database and sending emails and other things.
Now, Our company decided that we need to use windows Azure to publish the web application as a could service. We don't need to use any of the Azure storage nor SQL Azure database services, instead we will use our datacenter's storages and database. We just need to deploy the application as a cloud service, and we don't know where to start. I couldn't understand how to use windows Azure cloud services in this application. So my questions are:
Is this architecture valid with windows Azure? And where would be the role of Windows Azure and its cloud services in this archticture?
We don't need to host the application on Microsoft datacenters, instead we need to use it in our datacenter, when I searched I found the Windows Azure Pack for Windows Server, so can we use it so that we can host it in our datacenter? Does we need any extra cost consideration to use it? Where to start to use in our application?
I found some posts and tutorials (like this one here in SO) saying that I just have to create a new Window Azure Project and add a WCF Service Web Role, copy the application files from the old Web Service then host the same as a web application. Is that true? Is windows Azure just involved in the deployment and it doesn't has any effects in the internal architecture of the application?
You can deploy both your UI and Service back-end to Azure Web Roles. If you have any remaining WinForms application, they still can connect to the Service back-end. I would recommend that you also deploy your database to Azure if possible to improve performance and reduce latency. You can either use Azure SQL Database or you can create a SQL Server VM.
There are various interesting options to deploy layered applications to Windows Azure. You can read more about it here. http://serena-yeoh.blogspot.com/2014/01/layered-applications-and-windows-azure.html
You can also checkout a simple sample here
http://cloudsample.codeplex.com

iPhone, WMI, iis service

I am thinking about writing an application that will monitor IIS Service with iPhone, and send notification, perform resets if an IIS goes down.
I dont want to create a web service to do that but rather connect to a machine, specifying credentials and then get data from the IIS Service state.
Is it even possible?
Is it possible with iPhone?
I need to make this app generic enough for people to use with their hosted web sites and monitor their health and being able to reset it and/or recycle AppPools. I cant implement a service for any hosted environment. I need to be able to give the iPhone users an ability to connect to their host and once you are connected to the machine and authenticated to perform WMIs the phone users can mess with the iis. Is it possible?
I see your point not wanting to use web service because you want to monitor and reset IIS service, while web service is based on IIS. How about RestFul service? I have created RestFul service based on OWIN (Open Web Interface for .Net) and Kayak. Kayak may have some examples there.
The cool thing about those tools or lib is that the framework is very simple and does not rely on IIS. You can provide two URLs, one for get and one for post. The former is to get status of IIS server and post is to reset IIS. Those services can be just XML of JSON based objects and it will be up to the the OWIN service to do the job on the back end. Another great feature of this is that you can even create the service in a console app or any other ways (Windows service or Window Form in system tray) on WindowsXP or Home version. The app will provide RestFul service based on HTTP with specific port.
RestFul service is available for variety of platforms, including iPhone.
Although IIS supports remote administration I doubt there's a way to implement it on the iPhone easily.
You could write an actual Windows Server (not a web service) you could connect to with a socket which can do all the monitoring instead though.

Categories

Resources