Host Selenium C# project on Azure - c#

I have a selenium C# project build using Chrome driver that scrapes 5 different websites for prices and adds the data into SQL. They project works pretty fine on local machine. I want to deploy it on Azure server.
Which Azure service to be used for this?
Is there any code sample availabe?

Host Selenium C# project on Azure
This SO thread discussed "Running Selenium on Azure Web App", and we can find Selenium project seems can not run in the sandbox that Azure Web Apps run under.
Azure Virtual Machines is another hosting option, if possible, you can create a Azure Virtual Machine and migrate your project to that VM.

Related

Unable to open selenium chrome driver from azure vm machine to my client machine? is that even possible?

i have a angular project which triggers selenium Chrome-driver to open with help of c# API, it is working fine on my local machine. Now i have to deploy it on azure so my client can use in the same way too.
I tried and found out chrome-driver will only work on through azure VM-machine as it has some limitations. I purchased one azure VM and deployed my project there with chrome driver. it is working as a headless chrome-driver, i can see chrome driver is running in task manager but i cannot see the browser. Any help from anyone?
IWebDriver driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
driver.Url = "https://www.youtube.com";

How to run DB migrations in console application in team services deploy task?

I'm looking to move an ASP.NET Core application into Visual Studio Team Services for continuous integration and continuous deploy. My application is currently built and deployed "manually":
Build by "publishing" to Web Deploy package in Visual Studio.
Apply DB-migrations (implemented using Simple.Migrations) by running a console application (built along with te web app in step 1) on the target server.
Deploy the built web app using Web Deploy on target server.
And now I would like to automate this process using Visual Studio Team Services. Building the web app (step 1) and deploying it to an Azure App Service (step 3)seems pretty straight forward. But I'm not sure how to apply my Simple.Migrations database migrations (step 2). Is it possible to run a console application (built along side the web app during the build phase) in the deploy phase? A task for running command line scripts certainly exists but I'm not sure what you can actually do with it.
Note that I would like to use the hosted agent (if that makes any difference).
There is a built-in task called: Deploy: PowerShell on Target Machines. This task uses Windows Remote Management (WinRM) to access on-premises physical computers or virtual computers that are domain-joined or workgroup-joined. This task can run both PowerShell scripts and PowerShell-DSC scripts.
Not sure if you could put your console application code in a ps script or directly Run a C# .cs file from a Powershell Script . Another way is using PowerShell run DB migrations. A sample for your reference: Use PowerShell to Migrate SQL Server Instances (db, logins, jobs, etc)

Publishing a web application remotely

i have a piece of C# code and I need to publish that so that I can get an URL which will be passed to another team for integration.
My problem is I have no access to Inetmgr due to some admin access issue.
how can I publish my web app remotely(on to my peer system )?
Using WebDeploy.
It's an IIS add-on which opens a Web service to publish a Web site remotely.
Visual Studio and TFS Build can publish sites using WebDeploy, and you can also deploy using the command-line interface.

Mvc3 application to windowazure

I want to convert my MVC - 3 project to WindowAzure project. I downloaded SDK for VWD express 2010. Can anybody please guide to do this?
This should help you: Migrating an Existing ASP.NET App to run on Windows Azure
This TechEd 2010 Presentation on Using Microsoft Visual Studio 2010 to Build Applications That Run on Windows Azure by Jim Nakashima should get you going
To start with, you don't need to make any changes in your MVC application to move to Windows Azure. Once you have Azure SDK (June 2012) Installed, you will have an option with your Solution properties as "Add Windows Azure Cloud Service Project" to move your MVCx application to Windows Azure. There will not be any change to your main application, but this way your application will be part of Windows Azure Application and run as a Web Role there.
Now if your Azure Application is set as Startup project and if you run your application, this will launch your application in Windows Azure Emulator so you can test your MVCx application in Windows Azure Emulator.
Finally you would need to make necessary code changes (i.e. Database connection etc) to successfully run your application as Windows Azure Cloud Service in cloud. This is all depend on what kind of your application is and how you would want to run your application in cloud.

How to deploy an asp.net website in windows azure

I have a asp.net website that's in asp.net 2.0. How to deploye in azure?
You question is very vague due to the fact that now there are three way you can deploy your ASP.NET website to Windows Azure. :
Windows Azure Web Sites:
This is in preview phase and released very recently. You can create a free website by signing up to Windows Azure Preview and create upto 10 free shared websites using the information provided below:
Deploying an ASP.NET Web Application to a Windows Azure Web Site and SQL Database
Windows Azure Virtual Machine:
In this method you create your own Virtual Machine with IIS and then deploy your ASP.NET application directly to it. The Virtual Machine is persisted so anything you will deploy to your virtual machine will persist.
Create a Virtual Machine Running Windows Server 2008 R2
Windows Azure Web Role
This is the PaaS based Windows Azure Cloud service where you can deploy to your application directly to Windows Azure cloud using Windows Azure SDK as described below:
Deploying an ASP.NET Web Application to a Windows Azure Cloud Service and SQL Database
As there is lot of information above and you might be overwhelm, I would suggest just stick with the option #1. Signup for Windows Azure Preview and create your "Windows Azure Website" and start from there.

Categories