.net core ubuntu change port when using service - asp.net-core

I'm trying to test running .net core on a different port when using the service.
However, I keep on getting an error with a status code 140.
This occurs in my two attempts :
1) adding --server.urls=http://0.0.0.0:555 in the service file
ExecStart=/usr/bin/dotnet /dotnetcore/published/TestingWebApi.dll
2) adding UseUrls("http://0.0.0.0:555") in the Program.cs
When I run it manually using the code
dotnet run --server.urls=http:0.0.0.0:555 it works.
Anybody has managed to get it using the service?

use the following
ExecStart=/usr/bin/dotnet /dotnetcore/published/TestingWebApi.dll --urls http://localhost:5002

Related

UMBRACO 10 HTTP Error 500.30 - ASP.NET Core app failed to start

I am trying to deploy my Website with umbraco 10, I always get the following error:
HTTP Error 500.30 - ASP.NET Core app failed to start
The website works correctly locally, however when deploying the app I get the same error...
Details:
DB SQL Server
Azure WebApp .Net6
What i have tried
I have followed the instructions: https://our.umbraco.com/documentation/Fundamentals/Setup/Server-Setup/azure-web-apps
I have created a project from scratch, thinking that the problem was some package, but still the same error.
This is how my umbraco 10 application looks once deployed from VS to an appservice (Azure)
The first thing I would do is check the logs on the the environment where you have deployed the code. That should give you a better idea what is actually going wrong as the error you are getting is very generic and not that helpful.
I have seen issues where the media folder is missing and that is something to check.
When I have issues in Azure, I also look at the files via the Azure Portal and check the connection string and any other configurations files to ensure they look correct. It could be the deployment has screwed up some values.
Have a look at this post which may provide some further details - https://our.umbraco.com/forum/using-umbraco-and-getting-started/108288-getting-http-error-50030-after-successful-publishing-to-azure

issue with running dotnet core webapi project

created sample project using "dotnet new webapi" command, then removed Properties/launchSettings.json(to understand what happens if this file is not present). On running the project using "dotnet run" command, the project runs, but on accessing the url - https://localhost:5001/swagger/index.html, i get HTTP ERROR 404. But if i run the same project in debug mode(hit f5), i get the swagger page. No change in code or settings was done, while running through "dotnet run" or f5, no error received while "dotnet run". Not able to understand the following:
why 2 different behaviors when running the code using above steps
the reason i removed launchsettings.json was to identify, which other setting forces the use of port 5000/5001 and protocol http/https.
Thanks in advance
I'm not getting the behavior you're observing. An ASP.NET Core project created from scratch listens to 5000 and 5001 ports by default even without launchSettings.json.
That said, you have a couple of options to set which addresses an ASP.NET Core app will listen to:
From Andrew Lock's article. Also from docs
UseUrls() Set the URLs to use statically in Program.cs
Environment variables - Set the URLs using DOTNET_URLS or ASPNETCORE_URLS.
Command line arguments - Set the URLs with the --urls parameter when running from the command line.
Using launchSettings.json - Set the URLs using the applicationUrl property.
KestrelServerOptions.Listen() - Configure addresses for Kestrel server manually using Listen().
dotnet run command checks launchSettings.json for configuration, if it doesn't find anything, it tries a couple more things before letting Kestrel use its default ports :5000 and :5001 for http and https respectively.

Why is server-config.wsdd not being created by the eclipse web services wizard?

I am using eclipse (Juno) to develop a web service for Tomcat 7 and Axis2. I have a java bean which I want to use to create the web service. The web service wizard seems to run ok but when the server starts I get this error message:
2012-11-08 13:31:20,059 ERROR [localhost-startStop-1] configuration.EngineConfigurationFactoryServlet (EngineConfigurationFactoryServlet.java:162) getServerEngineConfig
- Unable to find config file.
Creating new servlet engine config file: /WEB-INF/server-config.wsdd
I understand this to mean that server-config.wsdd is missing. How do I create this file? Why isn't it being generated automatically by the wizard?
Update
I recreated the project and the error message does not appear. I guess that I did something wrong. Perhaps Axis1 was being used as Andreas Veithen suggests below.
That is an error message generated by Axis 1.x. If you are developing an Axis2 service, then you shouldn't attempt to deploy it on Axis 1.x.
While generating java beans or wsdl, select start service option in webservices wizard then eclipse will create the server-confid.wsdd file for you. Hope this helps.

How do I use a command line tool to install .net 4 to IIS

I'm trying to deploy my WCF RIA services application to our in-house server for testing. I've been following the instructions and comments from this blog site:
http://timheuer.com/blog/archive/2009/12/10/tips-to-deploy-ria-services-troubleshoot.aspx
At the end someone points to this question:
How to solve a "HTTP Error 404.3 - Not Found" error?
I've been trying to run that same tool with .net 4.0 but it keeps giving me an error:
[Warning]The HTTP namespace reservation already exists.
I am running the version of the exe that I found inside of C:\Windows\Microsoft.NET\Framework\v4.0.21006
There is also C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation that has (what I assume is) the same exe in it, and I can use it just fine. I've tried to un-install the 3.0 version before installing the 4.0 version, but I am still getting the same warning and failure. Has anyone successfully done this with .net 4.0?
I finally managed to get this to work. I followed the instructions found Here and I removed an HTTP namespaces that was referencing Temporary_Listen_Addresses. after I did that I was able to successfully run the ServiceModelReg tool and install the stuff with .NET 4.0
In a nutshell:
netsh http show urlacl
netsh http delete urlacl url=INSERT THE RESERVED URL NAME HERE

Deploying wcf with silverlight application?

I am trying to deploy a Silverlight application on a remote server. I've copied over the files within App.Web which includes the .svc file. I created a virtual directory within IIS 6.0 and am able to successfully host the silverlight portion.
BUT... now I am getting an error:
The type 'ServiceGateway', provided as the Service attribute value in the ServiceHost directive could not be found.
I've tried restarting IIS, verified that the ISAPI mapping for .svc extension is showing in IIS.
It seems to me that the service is not getting started.
Thoughts?
Missing a type sounds like it either wasn't compiled properly or the reference doesn't exist on the server. What version of .NET is installed on the server? It should be at least 3.0.
It looks like the service isn't getting started because you're missing the ServiceGateway type. You may be missing the entire assembly it's meant to be in.