owin Identity in visual studio 2013 - identity

var authenticationManager = HttpContext.Current.GetOwinContext().Authentication;
im using vs2013 and this line of code isnt working
it says
Error 1 'System.Security.Principal.IPrincipal' does not contain a definition for 'GetOwinContext' and no extension method 'GetOwinContext' accepting a first argument of type 'System.Security.Principal.IPrincipal' could be found (are you missing a using directive or an assembly reference?)
The AuthenticationManager class resolves to System.Net namespace

I just created an entire tutorial on adding this from Visual Studio 2012 at httpJunkie.com But yes, You need Microsoft.Owin.Host.SystemWeb and it can be found at NuGet.Org
https://www.nuget.org/packages/Microsoft.Owin.Host.SystemWeb/2.0.2
Or installed via package Manager Console:
PM> Install-Package Microsoft.Owin.Host.SystemWeb

Related

'Autodesk.Forge' package with Net 6.0

When adding package 'Autodesk.Forge into my VSCode project I get the below error.
error: There are no versions available for the package 'Autodesk.Forge'.
I'm following this tutorial with .NET 6 & VSCode.
https://tutorials.autodesk.io/tutorials/hubs-browser/setup
using Autodesk.Forge;
The type or namespace name 'Autodesk' could not be found (are you missing a using directive or an assembly reference?)

Upgade app from 'EntityFramework, Version=4.6.1.0 to Version 6.3.1 or greater

I have existing app that uses MySQL Server. Some errors I was getting when trying to add a new feature led me to upgrading to 'MySql.Data.EntityFramework 8.0.11'.
error I am getting when on:
public CitiesContext() : base("name=CitiesContext"):
An error occurred creating the configuration section handler for entityFramework: Could not load file or assembly 'EntityFramework, Version=4.6.1.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Under my properties, my target framework is still version 4.6.1.
Is there a 'how to document' somewhere on how to upgrade the EntityFrame work? I know several of the other installed packages were installed while targeting v 4.6.1, so lots of other types of errors using (like hay this was compiled with v 4.6) when trying to compile with a web.congf using
I have installed
PM> Install-Package EntityFramework -Version 6.4.4
Package 'EntityFramework.6.4.4' already exists in project 'Lat34North'
Time Elapsed: 00:00:00.0186347
Please note. This is a hobby for me, not a profession. The app is written using asp.net mvs an first issued in 2018. Do I just need to change the target in the properties and upgrade all the other packages??
Thank you for any help.

Error Implementing lib module dependency by creating .aar file in build-gradle (app) file

I am facing the following issue whenever I try to implement the .aar file instead of the direct lib module dependency.
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugCompileClasspath'.
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find :xxxlib-release:.
N:B: I have configured the library project for jitpack also with the publishing config. A few days back, there was no issue but now I am getting errors for both the .aar and jitpack versions of my library which I guess is related. Additionally, I have upgraded to Android Studio Bumblebee and using targetSdkVersion 29 or 30; kotlin = 1.6.0 and classpath 'com.android.tools.build:gradle:7.0.3'
I can't find out what am I missing here. Any help will be appriciated, thanks.

Add date picker for WP8 in Cordova

I'm trying to call the native WP8 datepicker in a Cordova project.
Do I need a plugin for that?
The plugin should be only for WP8, for IOS and Android I want to use the native input.
I tried this one 'https://github.com/hypermurea/phonegap-wp8-datepicker-plugin' but it fails on compilation with the following error:
(Plugins\com.hypermurea.phonegap.wp8-datetimepicker-plugin\DateTimePickerTask.cs(83,17): error CS0246: The type or namespace name 'NavigationInTransition' could not be found (are you missing a using directive or an assembly reference?) [C:\Projectos\VS\NoesisWrapper\NoesisWrapper\bld\Debug\platforms\wp8\NoesisWrapper.csproj]
1>Plugins\com.hypermurea.phonegap.wp8-datetimepicker-plugin\DateTimePickerTask.cs(84,17): error CS0246: The type or namespace name 'NavigationOutTransition' could not be found (are you missing a using directive or an assembly reference?) [C:\Projectos\VS\NoesisWrapper\NoesisWrapper\bld\Debug\platforms\wp8\NoesisWrapper.csproj]
1>Plugins\com.hypermurea.phonegap.wp8-datetimepicker-plugin\DateTimePickerTask.cs(85,17): error CS0246: The type or namespace name 'IDateTimePickerPage' could not be found (are you missing a using directive or an assembly reference?) [C:\Projectos\VS\NoesisWrapper\NoesisWrapper\bld\Debug\platforms\wp8\NoesisWrapper.csproj])
I'm using VS2015 v14.0.22609.0, and added the WPToolkit to the project via NuGet.
You need to install windows phone toolkit. Please install it as mentioned in below link:
https://www.nuget.org/packages/WPtoolkit

Can Entity Framework Reverse Engineer Code First be used with MySql?

I'm working with MS Visual Studio 2012 Update 1 on Win 7 Ultimate SP1 and EF Power Tools.
I am trying to use the Reverse Engineer Code First functionality of entity framework on a MySql DB. I can successfully connect to the DB, but when it tries to complete the code gen I get the following errors:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.DbContextPackage.Extensions.ProjectExtensions.InstallPackage(Project project, String packageId)
at Microsoft.DbContextPackage.Handlers.ReverseEngineerCodeFirstHandler.ReverseEngineerCodeFirst(Project project)
One or more errors occurred while processing template 'Entity.tt'.
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.CS.ttinclude(1,4) : error : A processor named 'T4VSHost' could not be found for the directive named 'CleanupBehavior'. The transformation will not be run. The following Exception was thrown:
System.InvalidOperationException: Cannot find processor for directive 'T4VSHost'.
at Microsoft.DbContextPackage.Utilities.EfTextTemplateHost.Microsoft.VisualStudio.TextTemplating.ITextTemplatingEngineHost.ResolveDirectiveProcessor(String processorName)
at Microsoft.VisualStudio.TextTemplating.Engine.ProcessCustomDirectives(ITextTemplatingEngineHost host, TemplateProcessingSession session, IEnumerable`1 directivesToBeProcessed)
I have been unable to find any information using my google foo.
This is currently an Active bug with entity framework. The bug details can be seen here.
There are currently 2 work-arounds and the one that I used is below.
Open the File for C#:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.CS.ttinclude
or for VB.net:
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF.Utility.VB.ttinclude
And Remove the First Line:
<## CleanupBehavior Processor="T4VSHost" CleanupAfterProcessingTemplate="true" #>