Questions tagged [core]

32831 questions
1

votes
3

answer
712

Views

Animating UVs in SceneKit

I'm looking for a way to animate sprite sheets in SceneKit. After some research I found the Core Animation way to do this, which would be perfect as I need as much control over the animation as possible. I've prepared a simple plane mesh, with its UVs limited to one spritesheet frame's size. That wa...
sam_vh
-1

votes
1

answer
23

Views

Asp.Net Core site doesn't have 4x framework available? [duplicate]

This question already has an answer here: ASP NET Core 2 with Full Framework 1 answer I'm just getting started using .Net Core and at work our servers only have 4.6.2 installed. We will not be able to install Core 2.2+ for at least another 6 months and maybe up to the beginning of next year. To sta...
Caverman
0

votes
1

answer
32

Views

Why is c# Parallel.ForEach not creating too many open connections in my c# app?

I had some problems in my code causing too many open connections which causes them to close and get no http response. I have since refactored into something that looks like this: List { var res = Client.GetAsync(batchItem.Item1).GetAwaiter().GetResult(); var responseBody = res.Content.ReadAsStringAs...
Craig
0

votes
0

answer
8

Views

Model invalid when adding in Post

I have a Razor Page which submits most of the required fields for MyUser, however, some I want created manually before adding to the database. public async Task OnPostAsync() { //Other MyUser attributes set using form MyUser.Date = DateTime.Now; MyUser.Name = User.Identity.Name; MyUser.Details = "S...
Hawke
1

votes
1

answer
754

Views

Can I set custom location in CLLocationManager in iPhone

I am working on a compass app showing true heading (i.e directs towards true north) which uses location as described by apple documentation IMPORTANT This property contains a valid value only if location updates are also enabled for the corresponding location manager object. Because the position of...
JProgrammer
1

votes
0

answer
19

Views

Create an EF Core DbContext at runtime based on request parameters

Background We are building a web application using ASP.Net Core and Entity Framework Core 2.2 We are connecting to legacy databases. The setup is that there are 16 databases, all with the exact same schema, holding different contextual data. We cannot change this. We have a requirement to connect to...
JTech
0

votes
0

answer
10

Views

How do I pass a Controller (controllername) as parameter to another method?

so I'm wondering if it's possible to send a Controller as a parameter to another method. What I'm trying to acomplish is to create a method that acts like a Filepath builder by taking two parameters (controllername and method name). I have a method in a Controller as shown below: public async Task...
K.Oleksiak
4

votes
1

answer
27

Views

How to work with ASP.Net Core Identity with Web API Core and Angular 6

Please do help me out for this. I am using technologies: Asp.Net core 2.1 Web API core 2.1, Entity Framework core 2.1 Angular 6. We wanted to integrate Asp.Net core identity for Authentication and Authorization, Please do help me out for this, Below is the structure of my project,
Sharad
1

votes
2

answer
798

Views

Razor white page when render server side commands(Asp.net 5)?

First of all sorry my bad english. When I try to view the url / for my HomeController and an Index action, all I get is a white page. I'm starting from the empty ASP.NET 5 Web Application template and then I'm adding Controllers\HomeController.cs. Next, I'm adding the Home folder under Views and fin...
Hasan Tuna Oruç
1

votes
1

answer
2.1k

Views

Cannot use table 'AspNetUsers' in schema '' for entity 'AspNetUsers' since it is being used for another entity

We are trying to add Identity 3 to our existing Customers app by extending AspNetUsers public class ApplicationUser : IdentityUser { public string BusinessName { get; set; } public string ContactName { get; set; } public string CountryCode { get; set; } public virtual Countries Country { get; set; }...
Vague
1

votes
3

answer
2k

Views

Running .net core application on a chromebook

I have developed a asp.net 5 web application with only .net core components, how can i run it on a Chromebook as a standalone application.
srivatsa6065
1

votes
1

answer
264

Views

Mvc6 versioned api actions with custom constraints

I'm making a versioned api with mvc6 and to do that I want to be able to specify for an action on which api version it should work. My api route is: /api/{version}/... and so I want at a certain action to inspect the version route value and to see if this action is available for that version. I want...
mrahhal
1

votes
2

answer
1.8k

Views

.NET Core Authorize attribute with external JWT authentication microservice?

So I'm just having a bit of trouble getting my head round the .NET Core [Authorize] attribute. I have an authentication service running (let's say authapi.com) which when provided with valid authentication details will return a JWT. When this JWT is given back to it, it will validate the JWT and re...
SamBC
1

votes
0

answer
37

Views

Early execution of IEnumerable

So I have two methods both performing iteration through IEnumerable collection. public static IEnumerable GetRange(int start, int count) { if (count < 0) throw new ArgumentOutOfRangeException(nameof(count)); var end = start + count; for (int value = start; value < end; value++) { yield return value;...
0

votes
0

answer
24

Views

Why app returns only one supported culture?

I try create language switch on my site. I've add cultures in Startup: IList supportedCultures = new List { new CultureInfo("ru"), new CultureInfo("uk"), }; var localizationOptions = new RequestLocalizationOptions { DefaultRequestCulture = new RequestCulture("uk"), SupportedCultures = supportedCultu...
mykmykpet
4

votes
1

answer
90

Views

Docker build for C# core need the internet connection

I am writing in C# .NET core (VS 2017), using the build for linux containers, using docker-compose. When I build the image (or publish), there is always reference to the internet, because of nuget usage. Last error encountered (which I persume of downtime on the nuget, but no matter - any downtime...
Eitan
0

votes
0

answer
5

Views

Relationship - EF Core

I'm having some trouble to get into EF Core relationship. I didn't know how to search it properly, so I've not found what I need, but I got somewhere. I have these two classes: Expense: public class Expense : Entity { public string Title { get; set; } public string Description { get; set; } publi...
0

votes
0

answer
2

Views

Cannot get Core Motion Updates using watchOS 5: “[Gyro] Manually set gyro-interrupt-calibration to 800”

I am trying to get Core Motion data from an Apple Watch 3 (WatchOS 5.1) but although the DeviceMotion is available (isDeviceMotionAvailable property is true), the handler is never triggered. I get the following message in the console right after parsing super.willActivate(): [Gyro] Manually set gyro...
jiko
0

votes
0

answer
2

Views

Where old release of Windows_10_IoT_Core_for_RPi.msi creates .ffu image?

I try to flash old version of Windows IoT 10 Core to Raspberry Pi 3. I downloaded from here the .iso with .msi installer in. As mentioned here the .ffu need appears in C:\Program Files (x86)\Microsoft IoT\FFU\RaspberryPi2, however there is a new .ffu file, of Latest Windows 10 IoT Core builds. I sea...
1

votes
1

answer
789

Views

Can Entity Framework Core run non-query calls?

Unfortunately my EF application has to call stored procedures I am unable to change. While this is not ideal I can normally get around it. However, I have a stored proc that does return anything. How does EF core deal with this? I know in previous versions you could run ExecuteNonQuery but I haven't...
evenflow58
1

votes
1

answer
173

Views

Combining an animation of an UIImageView with a transition

I am doing a transition of an UIImageView's image and would also like to move the image view at the same time. The results so far is that the image transitions, but not while moving. class ViewController: UIViewController { @IBOutlet weak var imageView: UIImageView! @IBOutlet weak var imageViewTopC...
José
1

votes
2

answer
3.6k

Views

ThenInclude not working for an Entity Framework LINQ query [duplicate]

This question already has an answer here: Can not load related data with Include or ThenInclude or Select/Many with ONE query [duplicate] 1 answer I have a database model like this: public class Customer { public int CustomerId{ get; set; } public int OrderId { get; set; } public ICollection Orders...
Marvin Püthe
1

votes
1

answer
37

Views

Entity framework core can allow to specify two different length for column one for database and other for modal.validation?

Entity framework core can allow to specify two different length of column one for database and other for modal.validation?
chintan310
1

votes
1

answer
864

Views

How to get dependency injection working with IAsyncAuthorizationFilter in ASP.NET Core

I have implemented the IAsyncAuthorizationFilter interface to a class; in addition, that class is derived from Attribute, so that I can mark controller classes and action methods using it. This works so far; the Task OnAuthorizationAsync(AuthorizationFilterContext context) method is called before th...
Matze
0

votes
0

answer
24

Views

Inherit from generic class in C#

I have .net core 2.1 project. And my repository classes like below. But because of MyDbContext constructor has parameter, I'm getting error like below. When I remove JwtHelper parametrer, it is working perfectly. But, I need adding JwtHelper in MyDbContext.cs for logging auditings. How can I achieve...
Hasan Ozdemir
1

votes
3

answer
2.1k

Views

How to MSDeploy an ASP.NET Core app from command line? (csproj not project.json)

Can ASP.NET Core apps be deployed via msdeploy.exe and a .pubxml definition similar to what was possible for pre-.NET Core? This is the command that I've used previously: msbuild myproj.csproj /p:DeployOnBuild=true /p:PublishProfile=. If not, what is the preferred way to deploy an ASP.NET Core ap...
JTW
0

votes
1

answer
52

Views

C# Should Model Class Members be Public or Private [on hold]

Should most C# class members be set to private majority of the time, only in case I want other classes to modify them (then I will make them public)? I see most tutorials make all the class members public. I am beginning to think this may be bad practice. Would like to understand general software...
GregThomas582
0

votes
0

answer
9

Views

Should AutoMapper be used to Map from ViewModel back into Model?

Should AutoMapper be used to take data from ViewModel and save back into a database model? I know the opposite practice is good software practice: to have Automapper to extract database models, and place them in Viewmodels for front end web applications. I was reading this general article here: The...
GregThomas582
1

votes
2

answer
834

Views

listing all blobs in container

I am trying to create a function for all blobs in a container. I took the help How to get hold of all the blobs in a Blob container which has sub directories levels(n levels)?, which seems to use an overload that doesn't exist any more. I had added default values into the additional fields prefix a...
Neville Nazerane
1

votes
1

answer
868

Views

ASP.Net Core MVC UseExceptionHandler results in blank page

Building an ASP.Net Core (V2) MVC Site. We are using API Versions for this. The site has controllers delivering MVC Razor Views as well as API-style Json responses. I am trying to use the UseExceptionHandler() method, as shown below. When i hit an exception in one of my actions, the action gets ex...
Darren
0

votes
2

answer
14

Views

How to implement dependency injection of db context

I'm trying to adapt this tutorial on how to make a shopping cart in asp.net core mvc but I'm having trouble with the db context. I get the following error: Error CS7036 There is no argument given that corresponds to the required formal parameter 'options' of 'StoreContext.StoreContext(DbContextOpt...
mpho
1

votes
2

answer
2.2k

Views

ASP.Net MVC Core 2 - Area Routing

I'm trying to implement an Area for Administrators within my ASP.Net MVC Core 2 application. I have configured the route for the area as follows: // Default route app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); // Admin area route ap...
weblar83
1

votes
1

answer
988

Views

EF core not creating tables on migrate method

Hey I just started using EF core and everything works fine. I call the the context.Database.Migrate() method and it creates a database. But even though my context object has a DBSet, it doesn't create any tables except for the migration history. Can anyone help me with this issue?
Jajan
1

votes
1

answer
277

Views

Disable .AspNetCore.Antiforgery Cookie

Is there any way to prevent the .AspNetCore.Antiforgery Cookie from being created in Asp.Net Core 2? From my understanding services.addmvc internally calls AddAntiforgery and I cannot seem to find any way to prevent this? The reason why this is important is because I cannot set any cookies before th...
Kamelen
1

votes
2

answer
338

Views

ASP.NET Core 2 with EventFlow configuration

EventFlow have avery limited example on how to configure on dotnetcore which is based on dotnet core 1 and things changed a little but in dotnet core 2 Is there a way to use EventFlow configuration without Autofac? There is discussion about here and the last comments are about the same thing I am as...
ppumkin
1

votes
2

answer
779

Views

Antiforgery cookie in ASP.NET Core 2.0

I've been trying to understand exactly how the antiforgery works. What confuses me are the cookies which are created. To my understanding, you include the antiforgery token in your form and then you validate for that token when a request is made. This way if a third party websites posts to your webs...
Bojan
1

votes
2

answer
336

Views

.NET Core: How can I set the connection string?

I am trying to use Blazor's CRUD functions and following some article to do this. In the article, there is a part that I should put my connection in context file, but it doesn't say how to set the connection string. I put this code line in launchSettings.json: { "ConnectionStrings": { "UserDatabase"...
winnervswinner
1

votes
1

answer
603

Views

How to pass an array of int in ASP.NET Core Web API

I have this Web API method: [Route("api/[controller]")] [ApiController] public class SubjectsController : ControllerBase { [HttpGet("children")] public IActionResult GetAllFromChildren([FromQuery]int[] childrenIds) { // omitted for brevity } } I'm trying to call this via Ajax passing in an query str...
g_b
1

votes
1

answer
139

Views

.NET Core with Angular : How do I configure IIS for URL Rewriting in HTML5 mode?

I have built an angular 6 application with .Net core 2.1 and deployed to azure server on IIS web server. The routing is working fine on localhost when refresh, but not working on azure server. I checked angular deployment guideline and added following code in web.config file Now, I got into new prob...
Abhishek
0

votes
0

answer
19

Views

Why is my .net core API cancelling requests?

I have a an aync method that is looped: private Task GetResponseMessage(Region region, DateTime startDate, DateTime endDate) { var longLatString = $"q={region.LongLat.Lat},{region.LongLat.Long}"; var startDateString = $"{startDateQueryParam}={ConvertDateTimeToApixuQueryString(startDate)}"; var endDa...
Craig

View additional questions