Visual Studio 2015 Docker Integration wont attach for debuging - visual-studio

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:

Related

Docker Container url not accessible through localhost or ip on windows 10/docker CE/.net Core

This is most simple use case for using docker on windows to deploy dotnet core app.
I used visual studio 2017 to create a dotnet core api with docker support enabled,
the image was created successfully by docker.
Also successfully started new container with this image, but when trying to access api at localhost or ip,then api is not responding.
For more detail steps follow this url
https://github.com/docker/for-win/issues/2230
Windows Version:Windows 10 Enterprise
Docker for Windows 18.03.1-ce-win65 (17513)/Channel:Stable
Steps:
Created Dotnet Core API app in Visual Studio 2017 community.
Selected "Enable Docker Support" checkbox.
Dotnet Core project Created.
Image got created by Docker through dockerfile.
Started new Container with command
Docker run –it –p 8085:80 coreapidemo:dev
API NOT accessible through either localhost or ip
http://172.22.236.61:8085/api/values
http://172.22.236.61/api/values
http://localhost:8085/api/values
Update 1:
Thanks #edwin for your help,using
docker exec -it mycontainer powershell
,i can see that directory c:\app does not contain the neccessary code (aspnetapp.dll) to run app.
Then i downloaded image from https://github.com/dotnet/dotnet-docker/blob/master/samples/aspnetapp/Dockerfile and started container with it.
Then i able to successfully access the app url at http://localhost:8000.
This means that the visual studio tooling for docker is not building the image properly.Anyone can help?

DEP6720: Failed to deploy package 'Native Debugger'

After updating the OS of the Hololens, I got the following error for all applications (built with Unity)
DEP6720 Failed to deploy package 'native Debugger'
DEP6859 Error
removing the file from the remote device DiagnosticsHubMsg.ddl not
found HRESULT exception 0x800700002
I googled and could not find any reference to this problem. I wonder if I have to update visual studio? (the latest seems to be 15.7.5)
EDIT:
I updated visual studio to 15.7.5 hoping to solve the problem. Now it is worse
I got the error but also these other errors
DEP6721 Failed to deploy optional package 'XAML UI Debugger
2'DEP6950: Error transferring the file to the remote device
XamlDiagnostics DEP6721: Failed to deploy optional package 'XAML UI
Debugger Dependency' DEP6950: Error transferring the file to the
remote device: XamlDiagnostics.dll. Remote Device Disconnected'.
DEP6721: Failed to deploy optional package 'Standard Collector
Bridge'DEP6950: Error transferring the file to the remote
device:DiagnosticsHub.StandardCollector.Bridge.dll. Remote Device
Disconnected'. DEP6720: Failed to deploy package 'Windows 10 Remote
Tools' DEP6950: Error transferring the file to the remote
device:TailoredDeploy.exe. Remote Device Disconnected'. DEP6720:
Failed to deploy package 'Core CLR' DEP6950: Error transferring the
file to the remote device: clrcompression.dll. Remote Device
Disconnected'.
I am lost at what to do
I could finally got to deploy on the hololens.
After following different advice that did not work, in the end I repaired my installation of Visual Studio.
After the repair, VS was set again to the language of Windows. The colors of the editor also changed. I could deploy to the hololens there. (it took a lot of time the first time)
However -and for some strange reason- I could not change my settings back to english. If I do that, the same problem reappears. So even though I am more confortable with english, now I have to use visual studio in the same language of the operation system

Jenkins doesn't recognize slave being down and thus does not allow for it to reconnect

We have a Jenkins instance running on Ubuntu that has several slaves in different systems. One of them is a Windows 7 host, having jenkins slave instance configured as a service.
We have a problem that when that machine is rebooted, master Jenkins doesn't realize it's gone. It looks to be just fine in the nodes view. Then, when a build is issued that is supposed to use that slave it gets stuck. If that is stopped, the next build fails immediately
Caused by: java.util.concurrent.TimeoutException: Ping started at 1457016721684 hasn't completed by 1457016961684
... 2 more
[EnvInject] - [ERROR] - SEVERE ERROR occurs: channel is already closed
When the slave has started up and it tries to connect back to master, connection is refused, and in the logs there is an error saying connection with that name already exists:
Server didn't accept the handshake: xxx is already connected to this master. Rejecting this connection.
There is issue JENKINS-5055 which claims a fix was committed allowing the same JNLP slave to reconnect without getting rejected, apparently this commit, and according to changelog, it was introduced in version 1.396 (2011/02/02). We are however using version 1.639 and seeing this. Somebody else seems to be seeing it as well. By looking at current codebase, I see where the error is coming from, but don't see the fix done in Jenkins-5055.
Any ideas on resolving this?
Edit: also asked on jenkins user mailing list, but no responses.
We faced the same issue. Used https://wiki.jenkins-ci.org/display/JENKINS/slave-status as workaround
Reinstalling the slave on a Windows Server 2012 R2 machine shows no signs of this behavior, so it seems that either there was a mistake done during installation steps or this is something caused by using a workstation Windows version.
Regardless, here were the steps to get it working, assuming a brand new installation of Windows, with no network connectivity, and master instance using a self-signed certificate:
Install JRE on the machine. If you have 64-bit operating system, install both 32-bit and 64-bit, otherwise go with 32-bit. Download link here
Install .NET 3.5 on the machine. This is needed by the Jenkins service. You can follow the steps outlined by my other answer for this.
Install Jenkins using Windows installer (.zipped) to C:\Jenkins. It can be downloaded from here.
Check your installation is responding by navigating to http://localhost:8080 . In case of trouble, check for logs in the jenkins folder. If there is a port conflict, edit jenkins.xml and change the httpPort to something else.
From the Windows computer, navigate to your master jenkins and configure a new node there.
Start a slave agent using Java Launch Agent in configure -> node screen (you need to be still using your Windows slave computer)
You should see a visible window opening. From there, select File -> Install as a service. (details and screenshots) If you experience an error without proper explanation, confirm .NET 3.5 is properly installed. If you see "WMI.WmiException: AccessDenied", save the jnlp file locally and start it from administrator prompt or otherwise with elevated privileges (details).
From the Administrative tools -> Services, stop and disable the Jenkins service, and stop Jenkins Slave Agent but leave it on Automatic so it will start up when starting up the computer.
This is only relevant if you're using a self-signed or otherwise problematic certificate:
download the previously mentioned Java Launch Agent file (.jnlp file) again and save it to C:\jenkins
open c:\jenkins\jenkins-slave.xml to your editor
change it to refer to your local .jnlp file by changing jnlp url parameter (file:/C:/jenkins/jenkins-slave.jnlp)
add -noCertificateCheck to parameters
replace the -secret parameter with -auth "user:pass", since otherwise automatic url get parameters will be added which will mess finding the .jnlp file
Start the Jenkins Slave Agent service again
For problems with jenkins slave service, check out jenkins-slave.err.log. For Windows Server 2012 R2, you can get the functionality of tail by using Get-Content .\jenkins-slave.err.log -Wait -Tail 10 in Powershell prompt. For older versions of Powershell, leave out -Tail 10.

System.PlatformNotSupported exception with service stack

I am trying to run a service stack application, it works fine on my dev machine when deployed on another box, I get System.PlatformNotSupported exception.
Stack trace below:
Unhandled Exception: System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Net.HttpListener..ctor()
at ServiceStack.Host.HttpListener.HttpListenerBase.Start(IEnumerable`1 urlBases, WaitCallback listenCallback)
at ServiceStack.Host.HttpListener.HttpListenerBase.Start(String urlBase)
at ExcaliburAppHost.Program.Main(String[] args)
I am trying to build a Restful app with self hosting (with no IIS support on the other box).
var listeningOn = args.Length == 0 ? "http://*:8090/" : args[0];
var appHost = new AppHost()
.Init()
.Start(listeningOn);
error occurs in AppHost().Start() method
If you have any unmanaged .dlls e.g. sqlite3.dll you may need to set the Platform Target of your project as x86.
You can also try running the Console App as Administrator / sudo in-case it's a permissions issue.
To whom facing with exception "System.PlatformNotSupportedException: ServiceController enables manipulating and accessing Windows services and it is not applicable for other operating systems." - in my case I had to add "System.ServiceProcess.ServiceController" NuGet package to my .net 5 Worker Service project and issue is gone.
For me, I was building a .NET 6 worker service in a Docker container on a Linux host, building a Windows service to run on Windows Server 2016. My csproj file has the following properties set, but I was receiving the same PlatformNotSupportedException as the OP:
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<OutputType>Exe</OutputType>
<InvariantGlobalization>true</InvariantGlobalization>
<PublishSingleFile>false</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<PublishReadyToRun>false</PublishReadyToRun>
I was able to resolve this by specifying the runtime option (-r win-x64) directly to the dotnet publish command in my Dockerfile.
Now the application builds from a Docker container running on a Linux host, but the resulting binaries run fine on the Windows Server 2016 platform.

SonarQube installation failing to start service

I'm installing sonarqube on Windows Server 2012.
I have followed the following steps:
Downloaded sonarqube4.4 and extracted to C:\Sonarqube
Downloaded Java JDK 1.7.0_60 and jre 1.7.0_67 as well as jre7
Installed Windows SDK 7 and .NET Framework 4
Navigated to C:\sonar\bin\windows x86-64 and ran StartSonar.bat as an administrator, this ran ok with no output and Ihad to hot ctrl- Z to break
I then ran \windows-x86-64\InstallNTService.bat as an administrator and I am seeing the sonarQube services was launched, but failed to start.
Not sure what the problem is.
I believe you first ran \windows-x86-64\InstallNTService.bat successfully and then StartSonar.bat unsuccessfully (the inverse order of what you describe).
You probably have [this problem]: http://qualilogy.com/fr/wp-content/uploads/sites/2/2013/09/Sonar_ServiceLaunchError2.jpg
Windows could not start the Sonar service on Local Computer.
Error 1067: The process terminated unexpectedly.
In that case, the solution is to change the user/rights to launch the Sonar service: https://qualilogy.com/en/migrate-sonarqube-tomcat-to-windows-service/
Go to the Services window, find the Sonar service, and open the Properties windows to change the user it logs on as to one with sufficient permissions.
I was able to solve this problem by creating a new folder named “Temp” in C:\Windows\System32\config\systemprofile\AppData\Local\
The Log-File will show only
--> Wrapper Started as Service
Cleaning or creating >temp directory C:\Program Files (x86)\SonarQube\sonarqube\temp
<-- Wrapper Stopped
The SonarQube service was launched, but failed to start.
After a long search, I came up to this site http://zen-and-art-of-programming.blogspot.de/2013/03/installing-and-running-sonar-source.html.
Solution:
Navigate to C:\Windows\system32\config\systemprofile\AppData\Local\ and create the directory Temp
2: Set the user rights to full access
3: Run the StartNTService.bat

Resources