I'm trying to build and deploy a web application using MSBuild and TeamCity. I've read multiple SO posts and finally decided on using these parameters
/p:Configuration=Debug
/p:OutputPath=bin
/p:DeployOnBuild=True
/p:DeployTarget=MSDeployPublish
/p:username=BuildUser
/p:password=Password1
/p:AllowUntrustedCertificate=True
/p:DeployIisAppPath=<siteName>
/p:MSDeployPublishMethod=WMSVC
/p:MsDeployServiceUrl=http://<servername>
However, I get the following error:
Could not complete the request to remote agent URL .(Could not
complete the request to remote agent URL
'https://10.10.10.42/MSDEPLOYAGENTSERVICE:8172/msdeploy.axd?site=CFS.Services.Hosting'.)
For some reason either teamcity or msbuild assumes that I want to deploy via https which I don't. If I set the p:MsDeployServiceUrl = http:// like I do in Visual Studio
I get the following error:
Could not complete the request to remote agent URL
'https://http//10.10.10.42:8172/msdeploy.axd?site=CFS.Services.Hosting'.
Any help would be greatly appreciated.
Have you tried using MSDeployPublishMethod=RemoteAgent? Based on the value for MSDeployServiceURL (i.e. a URL using http instead of https) I'm guessing that you are using the remote agent service instead of calling MSDeploy via the Web Management Service. If that's not right let me know and I can try and dig into this a bit more.
Related
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.
I have exported my mule application from any point studio and placed it in stand alone mule run time /apps folder . when i start the run time using mule .bat my apps got deployed success fully but when i try to access the api's it gives 503, which is service unavailable .
But the same project if i deploy it through any point studio it got deployed successful and i was able to access the api's through post man and i am getting success response too .
any body can help me to fix this issue ?
It probably is the gatekeeper not being able to unlock the API because the standalone Mule Runtime has not the right credentials. See https://support.mulesoft.com/s/article/API-returns-503-Service-Unavailable-error-to-clients for details.
I have a taken a windows hosting that can run web core 2 applications. I have published first the application to a folder on my pc and then moved the files to a folder on the hosted web site. When I access the folder via http I get the following error message:
HTTP Error 502.5 - Process Failure
Common causes of this issue:
The application process failed to start
The application process started but then stopped
The application process started but failed to listen on the configured port
Troubleshooting steps:
Check the system event log for error messages
Enable logging the application process' stdout messages
Attach a debugger to the application process and inspect
This is a basic application without database, it's the "Hello World" empty Template of Visual Studio. I did this for a test.
The web provider says it does not depend from them. I have no way to know what is going wrong. Any idea?
You can read this blog http://dotnet4hosting.asphostportal.com/post/How-to-Publish-ASPNET-Core-2.aspx. It seems that you havent published your application properly.
Based on my experience, to resolve above error, you need to publish the website/project as a self-contained application. In order to publish it as a self-contained application, please add this to the csproj folder.
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
<PreserveCompilationContext>true</PreserveCompilationContext>
<RuntimeIdentifiers>win7-x64;win7-x86;ubuntu.16.04-x64;</RuntimeIdentifiers>
<SuppressDockerTargets>True</SuppressDockerTargets>
</PropertyGroup>
Hope this help!
I am attempting to run the default ASP.NET Core Web Application (Web Application Template in VS 2015) via IIS.
I have followed the instructions from the docs here eg setting up a 'No Managed Code' application pool and pointing the Physical Path at the location of the web.config file.
When I attempt to browse to the website root, http://localhost I am getting this error:
HTTP Error 502.3 - Bad Gateway There was a connection error while trying to route the request.
Most likely causes: The CGI application did not return a valid set of
HTTP errors. A server acting as a proxy or gateway was unable to
process the request due to an error in a parent gateway.
The event viewer states:
Failed to start process with commandline 'dotnet ./bin/Debug/netcoreapp1.0/WebApplication2.dll', Error Code = '0x80004005'.
This error shows I have replaced the placeholders
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%"
in web.config with the required values
<aspNetCore processPath="dotnet" arguments="./bin/Debug/netcoreapp1.0/WebApplication2.dll"
(update: these placeholders are replaced when you publish)
As per the troubleshooting instructions I have installed .NET Core Windows Server Hosting Bundle and restarted the server.
Running from the command line via dotnet works
Wondering what to try now.
Ok I figured my issue out. I am pointing the physical path in IIS to the unpublished Visual Studio project root directory. This works in previous versions of .net (ie non dotnet core aspnet projects) but doesnt now.
If you really want this to work then you have to publish your app to a temporary folder and copy the Microsoft.AspNetCore.* binaries back into the bin\Debug\ folder along with the refs and runtimes folders
This is a generic error for when IIS can't find the specified .NET Core components ,and doesn't know where to forward requests. In addition to following the official IIS publishing guide, make sure you have:
Installed the correct versions from the download page for latest .NET Core releases
Specified the correct library versions (explicitly or with wildcards) in your project.json
Included a web.config file (preferably using the publish-iis tool), and that the <aspNetCore> key values have been replaced with local values (source, with examples)
I ran into this while setting up a Core 1.0.0 (final) website on a new Windows 2008 Server. Turns out I had mixed up some of the installers from my dev machine with newer versions, and had mismatched library versions (RC2 vs final). Reinstalling the Server Hosting package fixed the problem.
The key to troubleshooting was to get into the console and use the dotnet commands (and resulting error messages) to iterate until I had my site running from the console, since the IIS error page in the browser was useless. I also found some benefit in a few entries in the system Error logs, but not much.
i am trying to develop an SSIS package with web service task, i have specified the service url
http://localhost/myservice.asmx?wsdl in the connection manager and configured the location of wsdl using expressions
but when i deploy the package to a prod environment, SSIS package will be on a DB server and web service will be hosted on a different server, which means i need to change the service url in the dtsConfig file.
but the problem i am facing is when i change the connection string url in dtsConfif file it will not update the wsdl file, and it points to old url and package fails with 404 error
If I understand, you are changing a value in the dtsConfig, but your SSIS package is not picking up on the new value. Are you sure it is looking at the updated dtsConfig file when it runs?
You should have, for example, a SQL Server Agent Job that is executing your SSSI package, and it should be pointing to the updated configuration file; or else, the Job should override the configured values. You can try different ways to set the url string to the desired destination.