I tried to Push a nupkg to Artifacts in Azure DevOps Server, but it fails with the following error:
---> (Inner Exception #0) NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source http://<DomainName>/nuget/v3/index.json ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
I suspect that the problem might be the corporate's proxy that interferes with Azure DevOps Server.
Proxy's configuration looks like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<config>
<add key="http_proxy" value="http://ep.threatpulse.net:80" />
</config>
</configuration>
Also, I tried to configure the proxy settings and it still didn't work.
Does anybody have any idea about what could be wrong or how can I fix this?
Version Dev17.M153.5
Proxy interfering with Azure Server/ NuGet Push Error404
Yes, that error is indeed caused by proxy and what you did is also correct.
Just make sure you have add proxy settings into Nuget.Config file, which located in following path:
%appdata%\NuGet\NuGet.config
NuGet.config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="http_proxy" value="http://ep.threatpulse.net:80" />
<add key="https_proxy" value="http://ep.threatpulse.net:80" />
</config>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
You could check this thread for some more details.
If it still not work for you, I suggest you contact your office IT to confirm proxy setting.
Hope this helps.
Related
we want to keep the Nugets we use in our feed in case nuget.org will be down.
Under NuGet.Config we did:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="Nugets" value="https://pkgs.dev.azure.com/<ourOrganization>/<ourProject>/_packaging/Nugets/nuget/v3/index.json" />
</packageSources>
<packageRestore>
<!-- The 'enabled' key is True when the "Allow NuGet to download missing packages" checkbox is set.
Clearing the box sets this to False, disabling command-line, automatic, and MSBuild-integrated restore. -->
<add key="enabled" value="True" />
</packageRestore>
</configuration>
Now if I go to the artifacts -> Nugets I can see some of the package, appear as NugetGallery, but not all of them.
For example Newtonsoft.Json is missing.
Also when I look at the source - why are all of them under Nugetgalley, and not 'this feed'?
Thank you for your help.
My solution builds perfectly on my local machine and it uses Microsoft.Data.Sqlclient and Azure.Core nuget packages, but the solution does NOT build on our Azure Devops server because there is no internet access there. The error is "Error NETSDK1064: Package Azure.Core, version 1.20.0 was not found."
I put these packages in a .packages subfolder and created a Nuget.config file that I believe references this sub-folder, but no luck.
How can I tell our DevOps server to use find the Nuget packages in the .packages subfolder?
I finally got this to work through the NuGet Restore task placed before the build. I chose "custom" as the NuGet Restore command type, and the actual command was:
restore CoreBZ2.sln -PackagesDirectory ..\packages
with ALL of the needed packages (all .nupkg files) in the "packages" subfolder of my solution. (CoreBZ2.sln is the name of my project/solution.)
I also had a NuGet.config file placed in the same folder as the solution and it looked like this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value=".\packages" />
<add key="Azure.Core" value=".\packages" />
</packageSources>
<config>
<add key="globalPackagesFolder" value=".\packages" />
<add key="defaultPushSource" value=".\packages" />
</config>
<activePackageSource>
<add key="All" value=".\packages" />
</activePackageSource>
<config>
<add key="repositoryPath" value="$\..\packages" />
</config>
</configuration>
There is probably a better way to do this, but this did finally result in a successful build on the offline DevOps server.
I've deployed ASP.NET Core 1.1.1 app in IIS-10 on Windows 10 following this tutorial. But when I try to open Modules in IIS, I get the following error [For clear view you can click on the image to zoom in]:
Note:
It's a development machine and already has installed as shown below:
The app pool for the app is as follows:
And the Web.config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
-->
<system.webServer>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>
</handlers>
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/>
</system.webServer>
</configuration>
UPDATE: Issue may have been related to this post
It turns out that ASP.NET Core Module is installed separately from the SDK and I needed to install ASP.NET Core Module for the above issue to be resolved as explained in this post. Thanks to #natemcmaster for helping me resolve the issue.
I recently added grial nuget packages to a xamarin solution.
It works fine locally but the build fails on mobile.azure.com.
I have used the nuget command line to add the new package source, including the credentials as a username / encrypted password.
It still breaks the build though, but this time with the error
"Data unprotection failed."
Has anyone come across this before, and do you have any possible solution?
thanks
You need to consider adding a nuget.config file. Below is an example that we used to include our Proget Feed.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageRestore>
<add key="enabled" value="true" />
<add key="automatic" value="true" />
</packageRestore>
<packageSources>
<add key="NRTH Proget" value="http://proget.nrth.com/nuget/nuget" />
</packageSources>
</configuration>
Just drop this file in the same folder as your solution (.sln) file.
I have a site/application I would like to load in IIS. The root of the folders contains a web.config and index.asp. The sub folders are asp, scripts, styles, images.
I add Add Web site in IIS, define the physical path to the location of the index.asp, assign the IP address for host name I tried local host, IP, and leaving it blank. When I click on Browse Website I receive a HTTP 500 Internal Server Error. IIS is running and the Web Site is started in the Manage Website menu.
If I write a short index.html hello world page and set it as default document it displays ok. When I change default document back to index.asp I get the 500 error again.
Could someone give me a tip on how to proceed?
Here is my web.config:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<identity impersonate="true" />
</system.web>
<system.webServer>
<defaultDocument>
<files>
<add value="index.asp" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
This is going to be a guess at best, since a 500 can mean anything without a sub-status code. It probably is due to configuration inheritance. index.asp is already in the default list of default documents at the server level. By adding index.asp, it may be causing a unique hey violation when the configuration inheritance is flattened into the effective configuration.
Suggestion:
Add a <clear /> element right above the <add value="index.asp" /> and try again. Otherwise, we will need to go get the sub status code of that 500 to get more information. The IIS log usually contains the sub status in the sc-substatus.
Resulting Configuration
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<identity impersonate="true" />
</system.web>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.asp" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
If this works, then the reason it originally works with index.html because index.html is not in the default files list.
Additional Note
The other thing I can think of is that impersonation being enabled. If you are running the application pool in Integrated Pipeline mode, you'll need to turn off integrated mode configuration validation. More information can be found here: Integrated Pipeline mode configuration validation.
New Resulting Configuration
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<identity impersonate="true" />
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="False" />
<defaultDocument>
<files>
<clear />
<add value="index.asp" />
</files>
</defaultDocument>
</system.webServer>
</configuration>