Nuget push Cannot prompt for input in non-interactive mode - nuget

I am running this command
nuget push Package.1.0.0.0.nupkg -s http://mysource.com/ xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -ConfigFile ..\..\.nuget\nuget.config
I receive this error
UserName: Cannot prompt for input in non-interactive mode.
I have specified the nuget.config file which has the username and cleartextpassword like this
<packageSources>
<add key="NuGet official package source" value="http://www.nuget.org/api/v2" />
<add key="https://www.nuget.org/api/v2/" value="https://www.nuget.org/api/v2/" />
<add key="PackageName" value="http://mysource.com/nuget" />
</packageSources>
....
<packageSourceCredentials>
<PackageName>
<add key="Username" value="<username>" />
<add key="ClearTextPassword" value="<clearpassword>" />
</PackageName>
</packageSourceCredentials>
Why doesn't this work? I am running the batch file from within VS2013 the nuget version I am using is, NuGet Version: 2.8.50926.602

The only way I could make this work right now was based on this post from Robin Osborne.
I took the source URL (http://mysource.com/nuget) and visited it directly using iexplore
Windows asked me for authentication credentials, I entered them manually and asked Windows to save the password (this will store them in the user's Window Credentials store).
I then rerun the PS1 script that did the nuget push operation and it didn't complain at all.
Of course, this is not how it's intended to work, but at least it unblocked me from the same situation you were experiencing. Treat it as a workaround.

Don't know if this will help but. I had the same error when trying to push to our private Klondike server. We fixed this by using a valid ApiKey rather than modifying the config.

This is not for using the nuget.config file but I had the same problem just running the command line PUSH...
Go to your VSTS website and click the Package link. If you have a feed, click the Connect to feed link. If not, the same link/button will be present on the screen. Click Generate NuGet credentials. Copy the command and paste it into VS PM Console window. Then follow instruction #3 on the page and it works inside VS.

Another possible fix ( which worked in my case ) is that the Personal Access Token ( PAS ) of your Visual Studio Team Services account that you use to authenticate has expired. The default is 90 days, but you can also choose for 180 days or 1 year.
In case you don't know where you do this:
Log in to your visual studio team services
Hover on your profile icon at the right top of the screen
Click on 'Security'
On the left menu click on 'Personal Access Tokens'
You can click on the description of the expired PAS to view its properties
On the detail screen change the "Expires in" value & then click 'Save' at the bottom of the screen.

Related

dotnet new --install is looking at wrong NuGet server

Running:
dotnet new --install Microsoft.AspNetCore.SpaTemplates::*
Generates the below error:
C:\Program Files (x86)\dotnet\sdk\1.0.4\Nuget.targets(97,5): error : Unable to laod the service index for source https://MYNugetFeed.pkgs.visualstudio.com/_packaging/Project/nuget/v3/index.json. \r [C:\Users\me\.templateengine\dotnetcli\v1.0.4\scratch\restore.csproj]
C:\Program Files (x86)\dotnet\sdk\1.0.4\NuGet.targets(97,5): error : Response status code does not indicate success: 401 (Unauthorized).
So my questions is why is it looking at that NuGet feed and not the standard (assuming that's where these templates are) and how do I change the configuration for dotnet cli? I know this is environment related in some way.
Cause
When you set up NuGet servers in Visual Studio (and perhaps other tools), they are saved on a per-user basis in NuGet.config. Dotnet new -install tries to make use of them. Unfortunately, one of my nuget servers (Telerik) requires authentication, and it failed so hard that it stopped all the other sources from even being tried.
Solution
On both Windows 10 and 8.*, you can find NuGet.Config here:
Go to C:\Users\[User Name]\AppData\Roaming\NuGet\NuGet.Config
Under <packageSources>, there will be a list of servers, like this:
<packageSources>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
<add key="REDACTED" value="http://REDACTED:8080/guestAuth/app/nuget/v1/FeedService.svc/" />
<add key="REDACTED" value="http://REDACTED/nuget" />
<add key="Telerik (Kendo)" value="https://nuget.telerik.com/nuget" />
</packageSources>
To make this work, I reduced that down to the core nuget.org server:
<packageSources>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
</packageSources>
...And then template installation started working.
It sounds like your computer has a global nuget configuration that points to that feed. You can change that behaviour for a specific directory and it's children by creating a new nuget.config file.
You can find out how the local files override global ones on the Configuring Nuget Behavior page of the Nuget documentation.
I had, presumably, the same problem Brian MacKay encountered with Telerik. However, I am actively working a project that needed the Telerik source, so I wasn't keen to remove everything from my Nuget.Config
However, by specifying the specific nuget source in the command, I was able to install the desired templates - in my case IdentityServer4 templates. So this command worked:
dotnet new -i IdentityServer4.Templates --nuget-source https://api.nuget.org/v3/index.json
Assuming that the OP is correct and the templates mentioned are in the standard Nuget registry, I imagine a similar call would work there.

Not able to get MongoDB.driver nuget for Webapi project

I am new to MongoDB and is trying to get this new Database connected with my Web api application ..But i am not able to add MongoDB.driver nuget for my Webapi project.Please refer screen shot.
My search is struck on this window for like forever.,have even restarted my project for a couple of times now.
I also tried installing this package through
PM>Install-Package MongoDB.Driver
But then this is shown
Am I doing something wrong ..?
i tried opening this url"api.nuget.org/v3/index.json"...but it says this site cant be reached..what does that mean?
Since the you could not open the url in browser directly, there should be some internet limitations in your internet environment. If you are work in the company, I suggest you contact your office IT to confirm whether they add any limitations and whether used any proxy. If they are using some proxy, you need to set the proxy settings in NuGet.Config file which store in C:\Users\user name\AppData\Roaming\NuGet as below settings. Detailed information please refer to the Proxy settings part in Nuget Config Section & Nuget Proxy Settings.
<add key="http_proxy" value="host" />
<add key="http_proxy.user" value="username" />
<add key="http_proxy.password" value="encrypted_password" />
Besides, you can chech the proxy in your machine: Open "System Properties" > Advanced > Environment Variables. Find the http_proxy var (in System variables), select and delete it.

How to uninstall Umbraco 7

I installed Umbraco 7.2.2. from the latest nuget package. However, annoyingly I just clicked install from the initial install wizard, as shown below.
Unknowingly it wouldnt ask me for the DB connections. So my question is. Is there a clean way to revert the installation and start again. Or am I just best to delete the project and install the NuGet package again?
Im aware of earlier versions that I could just remove the appsetting value below and it would start the installer again.
<add key="umbracoConfigurationStatus" value="7.2.2" />
EDIT:
This is no longer the case. Removing the value from the above app settings only looks to upgrade the installation.
However I dont want to be left with a bloated Umbraco install with redundant files, like the .sdf DB etc. Or is it the case that the normal install doesnt actually include many additional files than the custom install? And its just the SDF?
The more I write this the more it makes sense to just start again with a fresh project. :)
Keen to hear an opinion regardless.
Start with the current site as it is installed now and go to the backoffice (http://yoursite.local/umbraco). Go to the developer section > Packages > Installed Packages > Fanoe. Go to the Uninstall Package tab and confirm the uninstall.
In your web.config set umbracoConfigurationStatus to an empty string:
<add key="umbracoConfigurationStatus" value="" />
And set the connection string to the default empty values:
<remove name="umbracoDbDSN" />
<add name="umbracoDbDSN" connectionString="" providerName="" />
After saving this file, your application pool will recycle and you can delete the umbraco.sdf file from the App_Data folder. In fact you can delete everything in App_Data.
As you said, it would be much easier to delete the current site and just start over, choosing "Customize" during the next install.

How to make changes in management concole regarding WSO2 Identity Server v5.0.0

I have download all patches (upto patch008), by using TortiseSVN svn checkout the following //svn.wso2.org/repos/wso2/carbon/kernel/branches/4.2.0/ and //svn.wso2.org/repos/wso2/carbon/platform/tags/turing-chunk11/
Then exported above folder to another location D:\platform, D:\productssource and build them with Build successful message !.
Now I want to makes changes in Management Console of WSO2IS v5.0 Under Entitlement Sub menu such as PAP, PDP and MyOwnCreatedPAP, which look like this 1.
To achieve above mentioned requirement, what steps should I followed in Eclipse IDE to makes changes in source code, plz mentioned them in step by step, as I am newbie.
For this you have to write a custom Carbon component UI bundle. You need to include a component.xml file in src/main/resources/META-INF/ folder of your component with content similar to below to add a menu item.
<component xmlns="http://products.wso2.org/carbon">
<menus>
<menu>
<id>studentmgt_menu</id>
<i18n-key>student.menu</i18n-key>
<i18n-bundle>org.wso2.carbon.student.mgt.ui.i18n.Resources</i18n-bundle>
<parent-menu>manage_menu</parent-menu>
<link>../student-mgt/index.jsp</link>
<region>region1</region>
<order>50</order>
<style-class>manage</style-class>
<icon>../student-mgt/images/students.gif</icon>
<require-permission>/permission/protected/manage</require-permission>
</menu>
</menus>
</component>
Follow this guide for a complete tutoriol on how to write a custom Carbon component and create a UI bundle.

Crystal Reports images not visible in web viewer

I have some Crystal Reports (V10) in an application (.NET 1.1) I inherited that is deployed in four "identical" environments. In three of the environments, they are working fine. In the fourth, the chart graphics are not visible in the web viewer. They are visible if you export the reports.
The IT guys swear everything is exactly the same in all four environments and have kicked the problem back to me to solve. I'm not sure how I'm going to do that since I can't get to the servers to check anything for myself. But I don't see how this can NOT be an environment issue.
It seems to me that Crystal has the necessary permissions to write the file and to retrieve it to render the export versions of the report, but the ASP WP can't access the graphic file when the page is rendered.
Thanks for any suggestions you might have to help me!
RESOLUTION
From the IT guys: "We had to change the “Execute Permissions” on the CrystalReportsViewer10 folder within IIS from “Scripts only” to “Scripts and executables”. All of the other sites have only “Scripts Only” and they’re fine."
I could resolve this issue in dev enviroment adding next keys (handlers) to web.config:
<system.webServer>
<handlers>
<add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" preCondition="integratedMode"/>
</handlers>
</system.webServer>
<system.web>
<httpHandlers>
<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</httpHandlers>
</system.web>
There needs to be an IIS virtual directory called something like "CrystalReportViewers115". I think that the exact name changes between versions. This needs to be visible to your ASP.NET user. Start looking at the environments that work and see if they have this virtual directory installed, and compare it to the one on the failing environment. As another check, you should be able to enter in the URL for the images into a browser and see them. To find out the URL, right click on the picture and select "Properties". For example:
http://localhost/crystalreportviewers/images/toolbar/export.gif
You should see the picture when you browse directly to the URL.
Go to Start->Programs->Microsoft Visualstudio 2008->Visual Studio Tools->Visual Studio 2008 Command Prompt
and type
aspnet_regiis -c
This will automatically copied the corresponding files...
Add the aspnet_client folder in the source folder of the site. Example:
C:\inetpub\wwwroot\myapplication\aspnet_client\system_web\4_0_30319\CrystalReportWebFormViewer4
I recently experienced this very issue: although my resolution was a little different:
I tried setting the handler in the web.config but that didn't fix it.
I tried setting scripts & executables in IIS but that didn't fix it.
Once I went into the C:\Program Files\Common Files\Crystal Decisions\2.5\crystalreportviewers10 folder and turned off custom errors I could see the error was coming from an access denied issue on C:\Windows\Temp\
The solution was then to not and handlers or alter IIS to run scripts and executables, it was to allow the Network Service to read permission on C:\Windows\Temp\
EDIT:
Think I've found another solution which doesn't require permission changes... just set a virtual directory for aspnet_client; the level at which you select this will very much depend on your IIS layout.