Azure Webapp Startup Command is reset after deploy (Visual Studio -> Publish) - visual-studio

I have a Azure Linux Web App with a custom Startup Command "sh /home/custom_startup.sh". Whenever I re-deploy the app via Visual Studio the Start Command is changed to something like "dotnet App.dll". I don't want this behaviour since at the moment I need to after every deploy change the Startup Command manually and restart the application.
Any ideas?

Related

Best Method for Debugging CluedIn Integration Locally

I've been working on multiple integrations with CluedIn. They are installed in a local Docker instance but I'm having a hard time understanding how to setup the debugging process in Visual Studio Code.
I've loaded the package .dll and .pdb files into the /app/ServerComponents folder on the cluedin_default_server_1 container.
How do I attach a debugger to the CluedIn integrations for debugging?
This may require extra steps to debug with Visual Studio Code, but with Visual Studio this should be simple.
Assuming that you are using the default environment:
Install procps into cluedin_default_server_1 container.
You have to attach as a root. To do so, either change the docker-compose.server.yaml and add user: root after server: like this:
server:
user: root
Or you can just attach from the command line as a root:
docker exec -it --user root cluedin_default_server_1 /bin/sh
When you are in the container's shell, please, run: apk add procps.
Copy the DLLs and PDBs
Build your solution and copy the DLLs and PDBs under \Home\env\default\components\ServerComponent (the default is the name of your environment).
Restart or recreate the container
docker container restart cluedin_default_server_1
If this will not work, please, try to delete the container and run .\cluedin.ps1 up - it will create a new container for you.
Attach to the process from Visual Studio
In Visual Studio, hit Ctrl+Alt+P or go to Debug -> Attach to Process...
Select the Docker connection type and the container you want to debug, and then the dotnet process. The process must be dotnet exec ... --Name ServerComponent.
Click Attach and check the Managed checkbox:
Now you should be able to debug your code.

How to write a script to publish my .NET Core Web App to Docker Hub?

What is Working:
Presently I'm using Visual Studio to successfully publish my ASP.NET Core web apps to Docker hub.
What I have tried that is NOT Working: The "dotnet publish" command is not doing the same job -- probably because I'm not specifying my docker hub account... After looking at the documentation, I don't see how I can specify my docker hub account. 
What I want: How can I write a script that does what the "publish" button does in visual studio (and publish to docker hub)?
You can use docker login -u YourDockerHubName command login.

Visual Studio 2015 Docker Integration wont attach for debuging

I created a Default .net Core RC2 MVC app using VS 2015. I added Docker Support so I could run and debug it in docker.
When I run the project it builds the docker container and starts it. Running the command "docker ps" shows the container running with the correct ports mapped. However I get the following error:
The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use NETStandard [version ...] or newer. This might be expected if the target process did not run.
Also trying to access the web page returns the following error:
[Fiddler] The connection to '10.0.75.2' failed.
Error: ConnectionRefused (0x274d).
System.Net.Sockets.SocketException No connection could be made because the target machine actively refused it 10.0.75.2:80
Turns out the problem is related to the docker for windows beta I am running. By default it does not let you map volumes.
To enable open the docker for window settings:
And select Manage shared drives.
Select the C drive or drive you have the .Net code stored on and rebuild and deploy the project:

ASP5 deploy to windows 7 server

I'm developing web api in .NET 4.5.1. It is build on TeamCity CI server, but I would like to deploy it to the Windows 7 machine in the local network after every successful build.
I wanted to use dnu publish command, but I have no idea how to use it in this case and how to prepare Windows 7 machine to be ready to receive new, just builded application.
This issue is realy poorly described in case of new ASP.
You need to run:
dnu publish --runtime <name of runtime or "active">
Optionally, you can also pass --no-source.
Once you do that, the bin/output folder will have the application, its dependencies and the runtime. Then, all you have to do is copy that folder to your Win 7 machine.
Here's a script that does something similar for the MusicStore sample. We use it to deploy MusicStore on Nano Server

TeamCity says success but the msi doesn't load

I'm running TeamCity agent(not as a service).I'm using command line to launch an application.if i save the command line in a *.cmd file and double click it the application is loading properly but if i copy ans paste the code from the cmd file to TeamCity and run... TeamCity says success but the application is not loading.if i run TeamCity as a service and click the run... it is loading the application but,along with it it is loading an "Interactive Services Detection"(http://blogs.msdn.com/b/patricka/archive/2010/04/27/what-is-interactive-services-detection-and-why-is-it-blinking-at-me.aspx)and that as i understood is not good so,i need to run it using the agent.bat file which is what i'm doing.
what can be the solution for this problem?
thanks
I got the agent service running by:
opening Services (cmd => services.msc)
right clicking on agent service (default is TeamCity Build Agent Service)
Selecting the Log On tab
Disabling 'Allow service to interact with desktop'

Resources