Error when running XUnit Tests on .net core app

addictedsoulsmusic's Avatar


12 Sep, 2018 07:24 AM


Im new to AppVeyor. I'm using the attached yml config file for a .net core app to do ci and cd.
it builds fine but gives the following error when running the tests project:

No connection could be made because the target machine actively refused it

I also added a Powershell script to check if the site deployed and it looks like it didnt.
IIS only has the following default site:

Name ID State Physical Path Bindings
---- -- ----- ------------- --------
Default Web Site 1 Started %SystemDrive%\inetpub\wwwroot http *:80:
                                                                net.tcp 808:*
                                                                net.msmq localhost
                                                                msmq.formatname localhost
                                                                net.pipe *

Is there something I am missing, maybe another step?

  1. Support Staff 1 Posted by Owen McDonnell on 12 Sep, 2018 10:58 PM

    Owen McDonnell's Avatar

    First of all, if you have build: section in appveyor.yml then build_script: section will be ignored. The presence of the build: section means that the project builds in "Auto" mode with commands supplied by AppVeyor. build_script: section is used when you want to use custom commands to build your project.
    But perhaps this is not really the root of the error you received.

    Secondly, without knowing what is in your CheckWebsiteStatus.ps1, I'm guessing that you probably have not done sufficient configuration of IIS for it to serve your website in the way you intend. For example, you mention that you only see the default web site in IIS, but from what i can see you don't create one anywhere. I only see that you are copying content to the default site's folder.

    Rather than the xcopy approach you are currently taking to deploy local website, you should switch to agent deployment approach. This will require you to create a deployment environment.

  2. 2 Posted by addictedsoulsmu... on 13 Sep, 2018 08:59 AM

    addictedsoulsmusic's Avatar

    This has been resolved.. Thanks for the help! We had to add some variables to configure our appsettings.json on our yml file.

  3. Owen McDonnell closed this discussion on 13 Sep, 2018 04:04 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac