tag:support.appharbor.com,2010-11-23:/discussions/problems/83485-error-cs1562AppHarbor: Discussion 2016-07-08T02:00:14Ztag:support.appharbor.com,2010-11-23:Comment/402430192016-07-02T13:24:05Z2016-07-02T13:24:05ZError CS1562<div><p>Hi,</p>
<p>You can likely ignore those errors as they're just related to
how the <a href="https://support.appharbor.com/kb/getting-started/background-workers#execution-model">
background worker runs executables</a> -- in short, background
worker will try and run all executables in a compiled build
artifact. Since you're using the new Roslyn compiler, which
includes executables such as the <code>csc.exe</code> those will be
built too.</p>
<p>That being said you won't currently be able to run a website in
a background worker as no HTTP traffic is routed to those. The app
would need to be able to run in IIS -- note that support for the
new .NET Core type projects is on the way, so you might want to
hold off fixing this for the time being.</p>
<p>If you're not using .NET Core (but only Roslyn, C# 6.0 etc) you
can run the app on AppHarbor already. You'll likely need to make a
couple of changes to make sure that the Roslyn compiler platform is
used and included in the compiled build artifact for running the
application on the worker servers, and that the web project is
configured as a web project (rather than being self-hosted). Take a
look <a href="https://support.appharbor.com/discussions/problems/78832-c-6-code-does-not-compile">
at this thread</a> (and perhaps the thread I link to in the first
comment) for a couple of tips and tricks.</p>
<p>Best,<br>
Rune</p></div>runetag:support.appharbor.com,2010-11-23:Comment/402430192016-07-02T18:46:51Z2016-07-02T18:46:51ZError CS1562<div><p>Hello,</p>
<p>Thanks for the reply, I've used your sample to try the WebAPI to
work, but it didn't, so I'm guessing the problem might be somewhere
else.</p>
<p>I created a .ASP NET project with empty template, and I'm using
Owin Hosting. When I use it locally, with Visual Studio, the Web
API works without any problem...but when I deploy to AppHarbor, it
doesn't work, and I get the nginx page.<br>
I don't know if I'm doing something wrong, or if it's just a lack
of proper configuration.</p>
<p>I'm using the following code:<br>
<a href="https://github.com/tmag84/DAW-API">https://github.com/tmag84/DAW-API</a></p>
<p>If you can give it a look, I'd appreciate it...otherwise, I
guess I'll just create a MVC template and work from there.</p></div>tmag84tag:support.appharbor.com,2010-11-23:Comment/402430192016-07-05T03:41:16Z2016-07-05T03:41:16ZError CS1562<div><p>Hi,</p>
<p>Ok I'm not sure I understand the first part fully -- did you try
and deploy the <a href="https://github.com/runesoerensen/roslyn-sample">Roslyn sample
app</a> where it didn't work? If yes it'd be great if you could
point me to a build where this didn't work as it should work "out
of the box" (unlike a new MVC template app which will require the
modifications outlined in the discussion I linked to earlier).</p>
<p>Best,<br>
Rune</p></div>runetag:support.appharbor.com,2010-11-23:Comment/402430192016-07-06T15:34:22Z2016-07-06T15:34:22ZError CS1562<div><p>I'll divide the issue in two parts:</p>
<p>1 - Regarding the Roslyn Sample, I used it as base for my
WebAPI. However, even though there's no error now, when I try to
access the application through the hostname, I get the ngix page
error. Even if I use the Rosyln Sample without any change, I still
get that page error.</p>
<p>2 - Regarding my actual code, my group created a web-api
self-hosted with OWIN, so we could run it locally for build and
tests, and we built it from an Empty Template. Everything worked
fine on VS.<br>
When we tried to deploy it to AppHarbor, we did all the changes
that are required, we set up assembly startup, created default
routes, etc...and we got that error that I linked in the first
thread, and also ngix error.</p></div>tmag84tag:support.appharbor.com,2010-11-23:Comment/402430192016-07-08T02:00:12Z2016-07-08T02:00:12ZError CS1562<div><p>Ok is this issue related to the <a href="https://appharbor.com/applications/daw-api">DAWApi application</a>
by any change? That application was allocated a background worker
rather than a web worker when it was initially deployed, so that
would explain why you'd see the logs referenced earlier. You can
change this simply by <a href="https://appharbor.com/applications/daw-api/subscription">changing
the subscription</a> to have 1 web worker and 0 background workers
instead.</p>
<p>Best,<br>
Rune</p></div>rune