AspNet.Identity.Samples -Version 2.2.0-alpha1 With Web API2.0 - asp.net-web-api2

When I add Microsoft.AspNet.Identity.Samples -Version 2.2.0-alpha1 to my MVC 5.0/Web API project the Web APi stops responding.
What is the reason to this strange behavior?
Is there any workaround?

After some researches I realized that Microsoft.AspNet.Identity.Samples packages modifies the configuration process that happens in configuration phase in the beginning of Application life cycle.
So adding
GlobalConfiguration.Configure(WebApiConfig.Register) again in Configuration phase of Application life cycle should fix that problem.

Related

How to prevent saving background job calls in logs.txt file

I am working on project that is uses abp (asp net boilerplate) v 6.3.0 and dotnet core v5 with reactjs client.
After run its server with dotnet run, I see some logs on the terminal that is show the background jobs are working and this messages are saving in the logs.txt file.
after some moment the logs.txt file was very huge and find some especial error in it is very hard.
could you help me to disable log the background job worker?
vs code terminal after dotnet run in host
logs.txt file
I was suffering the same issue here, and found a way to do this through log4net (not abp). The trick I used is prevent logging from specific loggers (the ones that keep logging every 5 seconds). Here is the log4net config file, with the added filters
log4net config with

jhipster hot deploy on client side using npm

I am using version 4.5.5 of jhipster.
My OS is Linux Mint.
I am using IntelliJ as my IDE.
Everything is working fine in terms of generating the code, building and running the code.
Client
Unfortunately, when I make changes to the client code (html or ts), the changes are not reflected until I recompile the client code completed. To achieve this I do "mvn -Pdev,webpack". It takes quite a while to restart the client and this is really holding me back.
Hot Deploy
What I expect to happen is that I can run "npm start" and when I save a change to a ts or a html file that it will be picked up and the change immediately visible in the browser.
Questions
Any ideas why the client hot deploy is not working ?
Any ideas how I identify where the issue is ?
For example, how do I know what folders are being watched by the hot deploy ?
Thanks a million for you help.
I am sure others have encountered the same issue and will read the answer gladly.
Kind regards,
Fergal.
PS Need any details, simply ask.
Figured it out.
Somebody else had a similar issue with a globally installed instance of webpack.
I installed a local version and the file updates are being detected and recompiled and the app hot deployed. Now working perfectly.
To install a local version webpack.js.org/guides/installation/#local-installation.

"Failed to Deploy Artefact error" in Eclipse Mule ESB project

I'm trying to run a trivial http echo app against the 3.50 CE runtime and I get the following stack trace(s) when I try to run
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Failed to deploy artifact 'default', see below +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
java.lang.NullPointerException
at org.mule.module.launcher.DefaultArchiveDeployer.guardedDeploy(DefaultArchiveDeployer.java:274)
...
Exception in thread "main" java.lang.NullPointerException
at org.mule.module.launcher.DefaultArchiveDeployer.addZombieApp(DefaultArchiveDeployer.java:325)
Additional context:
I've just started working with Mule (using the Eclipse Plugin). I initially had the trial package which is configured for Enterprise edition and I had that working with some of the trivial examples - hello world and echo.
I then downloaded the community runtimes and changed the targets on the projects, at that point I had been getting No Application Name errors, and I tried rebuilding them as new projects with CE targets from the start.
I also had been running them as mule applications, but this page
https://developer.mulesoft.com/docs/display/current/Studio+in+Eclipse
seems to indicate I must use maven ( I've set that up - although the automatic POM management doesn't seem to be working) but I still get the above failure.
There's no indication of why it's failing, as far as I can tell my projects output is valid.
Any suggestions welcome.
For what it's worth this is working now (fixed it shortly after posting the question even though it's been a blocker since yesterday).
If anyone else runs aground of the same issue..
I wasn't using the latest Community Edition runtime so I upgraded using the eclipse plugin install from (http://studio.mulesoft.org/r4/studio-runtimes).
I think this might have had something to do with it as I had previously been using the r4 plugin (http://studio.mulesoft.org/r4/plugin) with the Eclipse hosted 3.5 CE. Possibly the plugin is not backward compatible with the Runtimes.
basically once I completed the install and restarted I upgraded my project to use the new CE (changing the project setting and the flow xml). It worked first time.
Oddly all my Mule-Maven options have disappeared, but that's a separate question.

How to setup a TeamCity build for a ASP.NET 5 project

I'm trying to setup a CI server for a website that I'm developing, but I can't find any info regarding how to do it with the new ASP.NET 5.
I got you brother. This took me a few days to figure out. This configuration is on TeamCity v10 for a ASP.NET Core 1.0 RC2/preview2 project. As a bonus, I am including the step where it pushes to Octopus Deploy. You will need to install the dotnet teamcity plugin and the newest Octopus Deploy plugin with Push functionality. Here's an overview of the build steps:
First off, don't try to use dotnet restore to restore the packages. It won't work if you have internal nuget packages that are not compiled as .Net Core. This took forever to figure out. I would ignore trying to use dotnet restore until people have converted everything over to .Net Core or Microsoft fixes dotnet.exe to be more flexible.
Some of the stuff I read said to use the newest beta version of NuGet, 3.5. When I tried this, I would get the following error.
[14:30:09][restore] Starting NuGet.exe 3.5.0.1737 from D:\buildAgent\tools\NuGet.CommandLine.3.5.0-rc1\tools\NuGet.exe
[14:30:10][restore] Could not load type 'NuGet.CommandAttribute' from assembly 'NuGet, Version=3.5.0.1737, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
I don't know what that means, and I don't care. Use 3.4.4 for now. Fill in the rest as appropriate.
The dotnet publish step is pretty straightforward. Make sure you provide the output directory because you want to use it in the final step. Also, be sure to specify an absolute path by using the %teamcity.build.workingDir% variable because of this bug. Otherwise it will fail to find your web.config file and not finish publishing the entire site. You'll be missing things like web.config and wwwroot!
Finally we Push to Octopus. This was very tricky for me. Note the part that says
%teamcity.build.workingDir%/published-app/**/* => OrderReviewBoard.1.0.0.zip
IF ANY PART OF THIS IS INVALID, YOUR STEP WILL FAIL WITHOUT EXPLAINING ITSELF!!! By invalid, I mean maybe you put a teamcity environment variable (like the %build.number% they show in all the examples) in that zip name that doesn't properly resolve. Or you specify a non-existent path. Or any number of things, you will see an error that says "[Octopus Deploy] Please specify a package to push". That means that one was never generated because that statement failed. I realize you want to have an auto-incrementing build number there. I'll leave it up to you to figure out how to do that.
Don't get all confused by what is running here. Octopus tries to explain it on their site, but it is hidden here. There is octo pack and octo push. The new version of octo pack is running out of sight, based on whatever statement you put in that "Package paths" box. Don't get sidetracked trying to create a nuspec package, or trying to use dotnet pack. These are dead ends for our purposes. Create a .zip file and move on with your life. Finally, notice the additional command line arguments I added. These help you out a tiny bit. They aren't required. Good luck.
We (the ASP.NET team) use TeamCity as the build server. Each repo has a build.cmd file, similar to this one. TeamCity simply invokes that file.
For Mac/Linux builds, there is a build.sh file.
At the moment you can try to use TeamCity plugin for .NET Core projects:
https://github.com/JetBrains/teamcity-dotnet-plugin
Please check these blog posts;
http://blog.coderinserepeat.com/2015/01/25/building-asp-net-5-projects-in-teamcity/
http://blog.maartenballiauw.be/post/2014/12/19/Building-future-NET-projects-is-quite-pleasant.aspx
Since there has been many changes to the ASP.NET Core world and I got asked about it a few times, I wrote down a step-by-step guide on how to setup a CI/CD environment using TeamCity for .NET Core. I think it is especially helpful for beginners.

Intellij and Apache Tomcat not updating

I have a project going on for a couple of months now using a Spring MVC framework. For developing I am using an Apache Tomcat 8.0.17 with an exploded war file. Everything worked well since yesterday. Now when I change my Java Files the changes are no longer visible. I can even throw runtime exceptions and stuff like that (I always restart the tomcat server). The only way to "update" my code is to rebuild the whole project (Build --> Rebuild Project) which is quite time consuming and very annoying.
I did not change anything in the configuration nor updated Intellij IDEA or the Tomcat Server.
I could fix this by manually deleting all the files in the following folder:
%userdir%/.IntelliJIdea14/system/tomcat
After a full rebuild the updateing process works perfectly again.
Use this is VM Options:
-Dcatalina.home=%tomcat_folder% -Dwtp.deploy=%tomcat_folder%/webapps -Dcatalina.base=%tomcat_folder%