How do I export my project on AppDrag? - amazon-web-services

I have used the AWS hosting of AppDrag for my client's project, but he now wants to take it to his own hosting service. Is there a way to export the site like in a zipped folder so I can send it to him?

Yes. From the AppDrag Dashboard, you open the code editor, where you will find the folders of your site. Right click the root folder and you should see the download as zip option.

Related

How to download files onto personal computer from EC2 without knowing file name?

I want to use selenium to log into a private database and download some files. I can already do this via a python script that will launch a new chrome window (via selenium) and automatically download the files I need locally.
My python script uses selenium. Once the python script is run, it launches a google chrome window, which selenium then does some automatic clicking on to download files.
Now, I want to deploy my code to a web application so that I have a website online for others to use. I have my script on an Amazon EC2 instance and I call/invoke my script whenever a user on my website clicks a button. However, the files are downloaded onto the EC2 instance. I need these files to be downloaded on the person's personal computer after he clicks my button on my website.
Is there a way to achieve this, either by re-directing downloads? The file names are not known at runtime.
In summary, I have a script (which downloads files) on EC2 that is invoked when my button on my website is clicked. But I need the downloaded files to go onto the user's computer, not the EC2 instance/terminal.
Thank you in advance!
However, the files are downloaded onto the EC2 instance. I need these files to be downloaded on the person's personal computer
No there is no way to redirect downloads from an EC2 instance in the same way that you can't redirect downloads normally outside of AWS anyway.
When you download a file, you download it to the machine that requests the download.
Perhaps try returning the download URL in some way back to the UI and trigger the download yourself on the machine (if the URL does not need credentials). Or download the file, reupload to S3 and create a pre-signed URL that you can return to the UI.

Transferring files to VMs via SSH web browser upload button

I was wondering where the location of the files are once they are uploaded to VM instances.
I cannot find it very easily.
I am using the below menu to upload available in ssh web browser window.
UPDATES
I managed to find the upload path of the file uploaded(see my answer below).
But I am now having problems with downloading files. I provide the full path but was unable to download it. Is there any trick to this?
I am using Safari Version 10.0.2 (11602.3.12.0.1)
Finally found the location.
Once the upload is done and you see the success message, the file will be in the users home directory.
The username that you have logged in via ssh web browser to upload the file.

404 On existing .svc file

I have an IIS site on a Windows 2012 R2 server. The site has an Application inside it:
The URL for this site is setup on our Active Directive servers as it is only accessible internally from our company. The URL follows the following structure:
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local
The service for this site is placed in an internal folder:
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/InternalFolder/Service.svc
I have placed a number of test files both at the root level and in the internal folder:
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/HelloWorld.html
http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/InternalFolder/HelloWorld.html
I can browse these files without any problems. However, I cannot browse the service at http://NAMEoftheSERVICE.myCompanyServices.myCompany.local/InternalFolder/Service.svc
The browser returns
However the file is there, and I have made sure there are no typos in the URL I put in the browser.
I have looked at similar questions but there seems not to be anything like the problem I am experiencing. The only question that looked promising was:
WCF service file not visible
But the answer for that post does not apply to my issue as I already have the configuration mentioned in that post setup as it is suggested.
I have checked the IIS-level config files for any exclusion regarding .svc files or anything similar, but could not find anyhting.
Have you got any suggestions on where to look at to solve this issue?
Solution: Install HTTP Activation feature
After running some more testing on other sites on the same server, I actually realised that the issue was specific to .svc files. I therefore made another search on Google and found that the server was missing the "HTTP Activation" feature (part of the WCF Services).
So, if you are having the same issue on .svc files follow the following steps to make sure you have the right components installed on the server:
Open Server Manager
In Server Manager, click the Manage menu, and then click Add Roles
and Features
In the Add Roles and Features wizard, click Next. Select the
installation type and click Next. Select the destination server and
click Next.
Skip the Server Roles page.
On the Select features page, expand ".Net Framework 4.5 Features",
expand "WCF Services" and select "HTTP Activation". Click Next.
On the Confirm installation selections page, click Install.
On the Results page, click Close.
The same can be achieved by running the following Powershell command:
Install-WindowsFeature -Name NET-WCF-HTTP-Activation45
This did the trick for me. I hope it can be of help to someone.

Deploy asp.net core 1.0 website on aws

My website is using asp.net core 1.0 and angular 2. And I have account on amazon aws where i have a running ec2 instance (windows). Now I want to deploy this website to that instance.
my project struction is like
website
.
...src
.
..Bussinesslayer
..DataAccesslayer
..webapp <------startup project
.
..wwwroot
How to deploy this site on aws
I Found a way to publish to aws
Steps
1. Select your startup project
2. Goto Buid > Publish < Selected Startup project >
3. Create a profile and provide location to local drive ( C:/ or d:/)
4. After publish is successfull just copy the entire content of the folder and paste in aws wwwroot folder
your website is live now :)
Copy your files to your server using Remote Desktop (Note firewall may need to be opened for this)
You will need to create a web site in IIS
https://support.microsoft.com/en-ca/kb/323972
During creating a new site, it will ask you what folder you put your code/files in.

Update (re-deploy) existing azure webjob

I created an on-demand webjob. In the management portal there is no option to upload a new zip, to update it.
I can delete the existing webjob and create a new one, but I would like to keep my logs.
Is there any way to re-deploy it, overriding the old version, maintaining the logs?
You can connect to the website where the webjob is at via FTP and update the necessary files without erasing your log files.
You can get the credentials to connect via FTP from the Publish Profile.
UPDATE
Added screenshot to find credentiales easier per Erik's comment
You can also use your website's debug console at: https://yoursitename.scm.azurewebsites.net/DebugConsole
There you get a file explorer in your browser where you can drag/drop files (even zips that will be extracted into your website).
In the file browser go to d:\home\site\wwwroot\App_Data\jobs\triggered\jobname
Some more info about this at: http://blog.amitapple.com/post/74215124623/deploy-azure-webjobs/