Questions tagged [asp.net]

233363 questions
1

votes
0

answer
263

Views

hosting MVC core Apllication without publishing

we started to work in a MVC core application. I have seen many web site about hosting Core application after publishing. can we host a MVC core web app without publishing,that is copy all files from local to server machine using ftp as we do in asp.net project.Since it is in development stage there...
rajin
1

votes
0

answer
249

Views

HTTP Error 502.5 - Process Failure in .Net core 1.1

It was not possible to find any compatible framework version The specified framework 'Microsoft.NETCore.App', version '1.1.2' was not found. Check application dependencies and target a framework version installed at: Alternatively, install the framework version '1.1.2'. I installed Windows (Server H...
Shah Niral
1

votes
1

answer
433

Views

ASP.Net Core 2 - How can I get Visual Studio Code to detect Razor Pages?

In Asp.net core 2, they introduced razor pages. Using visual studio code if I create a 'Pages' folder in the root of the solution and then add a new item 'Greeting.cshtml', then add an @page directive at the top followed by the content I want to display, I don't see anything when I navigate to http:...
User123
1

votes
1

answer
199

Views

Package 'Faker.Net 1.0.3' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0'

I'm new to .NET core tools and just ran into an issue while running the following command; I can see that it's just a warning but it's not creating the 'publish' folder even with 'sudo dotnet publish -o /publish' dotnet publish -o /publish As you can see there's no publish folders /home/joel/worksp...
pelican
1

votes
1

answer
1.4k

Views

.NET Core 2.0 API with EF6 and .edmx file?

I want to build a API using .NET Core 2.0 that targets the full .NET framework so I can work with Entity Framework 6 and an .edmx file. Is this possible? How do I inject the DbContext generated by the .edmx file? I want to do this because my project works with a lot of stored procedures and I don't...
genzop
1

votes
1

answer
258

Views

jQuery UI Autocomplete in MVC modal window

I'm trying to implement the autocomplete jQuery UI function in a Bootstrap modal window, but it does not work. screenshot module console debug Take the steps of not returning a partial view, also already implement jQuery CSS styles, the truth works for me in full views, but why when calling a modal...
Fytito Ambiado
1

votes
0

answer
482

Views

MVC Ajax, Post to Controller base64 string

In my project I send post json data object. One item of this object is base64 string. When base63 string is too long, my request doesnt reach to controller. In my opinion , due to length of parameter,it doesnt work. I couldnt find any solition. [HttpPost] [ValidateInput(false)] public ActionRe...
Çağrı Taçyıldız
1

votes
0

answer
475

Views

How to make Push Notification in Asp.Net Web App with Angular?

I need to make Push Notification for every user, when product's price is changed. Just like this: The thing is that I have a job, that runs in the background and checks all the prices and sends emails to everyone informing on changes. I want to add these desktop notifications, so javascript and html...
Nikas Žalias
1

votes
1

answer
223

Views

Where does ASP.NET Identity store information about external authentication provider?

In my ASP.NET MVC application, I have enabled authentication using Microsoft and Google accounts. They both are working fine. i.e., I am able to login to my application using my hotmail and gmail both accounts. Once logged in (say, using Microsoft account), I am able to see following screen as well...
Nirman
1

votes
0

answer
88

Views

SignalR setup when separating out data access layer

Current setup has a single webapi with controllers, services, SignalR Hubs/server, data entity models and view models (say Project.Main). The thought is to create a separate project (Project.Data - webapi) for Data entity model, view models and services. Project.Main would reference Project.Data to...
Shyamal Parikh
1

votes
0

answer
26

Views

gruntfile taskrunner compilation error in angular js 2 project

I am working on asp.net project using angular js 2 in VS 2015. I am using webpack and gruntfile. I have a task in task runner which is giving error like this: Running 'ts:base' (ts) task Compiling... Using tsc v2.0.6 >> Compilation failed Warning: Task 'ts:base' failed. Use --force to continue. Abor...
Asif Hameed
1

votes
1

answer
259

Views

What's the best way to implement roles in a multi-tenant .net project?

My application is .NET 4.7 Web Api with Entity Framework 6. This is for a software as a service tool I am building. In my application there is a many to many relationship between AspNetUser and Company. A user can have many companies, and a company can have many users. A user needs to have a diffe...
Suren
1

votes
0

answer
61

Views

Roslyn compiler causes recycling of application pool during compilation

I have a fairly large ASP.NET website with Roslyn compiler installed. I have also app pool recycling enabled for 'private memory usage' (IIS 10, limit set to 4GB). I was wondering why my website recycles with event log message ID 5117 A worker process serving application pool 'pool_name' has reques...
mivra
1

votes
0

answer
55

Views

Finding device uniqueness using Canvas Fingerprinting

Currently I am using Canvas Fingerprinting and other device parameters to find the unique device. But in recent post i came to hear that Canvas Fingerprinting is going to be blocked by Firefox browser. So i need alternate solution for identifying devices effectively. Can anyone suggest me a effectiv...
Pravin Pravin
1

votes
1

answer
53

Views

html.beingform not generating appropriate url

I am using html.beingform to generate the url to post @using (Html.BeginForm('action', 'ctrl', new { id = 5, name = 'a' })) the url getting generated is but it should be generated as what is wrong with the syntax I am using?? EDIT I tried below syntax as per comments @using (Html.BeginForm('action',...
hr-tis
1

votes
0

answer
787

Views

How to use dependency injection in ActionFilter Web API?

I am trying to get work with dependency injection into the action filter, but it seems not working I've registered the type in UnityConfig public static void RegisterComponents(IUnityContainer container) { GlobalConfiguration.Configuration.DependencyResolver = new UnityDependencyResolver(container)...
M005
1

votes
0

answer
189

Views

Getting a 403 Forbidden Error while uploading a document using SharePoint 2013 REST API

I am working on a task to generate an on demand spreadsheet/document and upload the generated document to SharePoint 2013 (on-prem) from .net core 2.0 application. I am using Epplus.core libraries to generate the spreadsheet. Using CSOM is not an option for me as I didn't find any nuget libraries wh...
Naveen
1

votes
1

answer
726

Views

How to convert byte array to SKBitmap in SkiaSharp?

KBitmap.Bytes is read only, any suggestion on how to Marshal.Copy a byte array to the SKBitmap? I am using using below code snippet but it not working. Code snippet: SKBitmap bitmap = new SKBitmap((int)Width, (int)Height); bitmap.LockPixels(); byte[] array = new byte[bitmap.RowBytes * bitmap.Height]...
Parthi
1

votes
0

answer
175

Views

CORS issue with Okta - AngularJS controller call to .NET Core Controller

I currently have a .NET Core 2 web app which serves up data to the frontend via AngularJS 1.6.6 calls to the backend API. When users enter the first page of the site (index.html), an AngularJS controller does an HTTP Get to grab some data from the database to serve up in a table. I'm trying to inte...
thunder chunky
1

votes
0

answer
32

Views

Authorize attribute on a controller inside an area

I have an Area with a few controllers inside it, decorated with the [Authorize] attribute. I also have a few controllers outside the area. To default to the controller inside the area, I have updated my routes, to look like: routes.MapRoute( name: 'Default', url: '{controller}/{action}/{id}', defaul...
Sameer Anand
1

votes
0

answer
39

Views

Unsure how to list all records using MVC [duplicate]

This question already has an answer here: The model item passed into the dictionary is of type 'ViewModels.SiteModel', 1 answer The model item passed into the dictionary is of type .. but this dictionary requires a model item of type 3 answers I am still very new to MVC. I am trying to display al...
DForck42
1

votes
1

answer
29

Views

Update table from webpage

I'm using a stored procedure to update a table when the user clicks approve however I get message that it was approved successfully but the table wasn't updated. Update I'm now only able to update one item; even I select more than one item it is only updating one. Stored Procedure Update Requisitio...
1

votes
0

answer
698

Views

ASP.NET MVC Razor Sections and Partials

I'm relatively new to ASP.NET MVC and Razor. We've been modifying and developing based on existing code. Thus, there is a lot of duplication (ugh!). So I started looking at Partial pages and learning about Sections. I followed these tutorials but I'm still a bit confused. ASP.NET MVC 3: Layouts...
Patricia
1

votes
0

answer
45

Views

How to get table data from HTTPSConnection using python

I would like you to help me in getting the data from Httpsconnection since the webpage is ASP.Net and the data can not be retrieved from beautiful soup directory, I implement the code below: import http.client import requests from urllib.request import urlopen from bs4 import BeautifulSoup conn = h...
Hannah
1

votes
0

answer
113

Views

shared CSS and JS multiples projects Asp.net Core

I have a project which will have a framework for several projects, these projects will be done in asp.net core, several CSS files and JavaScripts will be shared between the projects, I would not like to copy and paste these files in each project, I would like to know how to share these CSS and JavaS...
Gabriel Fernando
1

votes
1

answer
92

Views

Working with google charts (want to get the value of column when click on the column)

I am working with Google charts. I want to get the value of column which is clicked. column name is showing in alert but I want get the percentage value also var chart = new google.visualization.ColumnChart(document.getElementById('divAgingReport')); chart.draw(data2, options); google.visualization...
1

votes
1

answer
169

Views

How to set the scheme for Authorize attribute from a .txt file?

My controller is protected with Authorize attribute. What I want to do is to tell the Authorize attribute to use Windows schema or no schema at all. How would I accomplish that? [Authorize(AuthenticationSchemes = AuthSchemes)] Case: AuthSchemes = 'Windows' Case: AuthSchemes = '' I want to change t...
TreeZ
1

votes
1

answer
507

Views

Combine ASP.NET MVC and Web API projects using identity

I am new to ASP.NET and I have to create an ASP.NET MVC project using the identity framework for authentication and authorization, but the access to the database (SQL Server) must be done in an independent web service project so I created a Web API project with also identity containing all services...
sam
1

votes
0

answer
100

Views

what is the Best way UrlRewriting in umbraco?

I want to change this http://localhost:65438/vehicle?id=12345 into http://localhost:65438/Make/Model/?id=12345 For this i am using following code for urlrewriting in umbracoUrlRewriting.config But the problem is that it is hitting the page load action of vehicle view continuously after a period of...
Plz Help
1

votes
1

answer
334

Views

ADFS openid-connect from web application without OWIN

I have an existing web application that have a custom made authentication and login module. I would like to add login for some users via ADFS openid-connect but all examples I see is based on OWIN which I cannot use. My plan is to let some external users login via Azure AD and once they are authenti...
Johan
1

votes
1

answer
55

Views

Switch between secure and non-secure DirectoryServices.AccountManagement.PrincipalContext

I am struggling with the following, this is what I have now and it is working but. public PrincipalContext getPrincipalContext(bool secured) { PrincipalContext oPrincipalContext = new PrincipalContext(ContextType.Domain, secured ? DomainName + ':636' : DomainName, Container, secured ? ContextOption...
Charl Janga
1

votes
0

answer
25

Views

Docker - run deployed asp.net application

How to run this: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c2cafa3cb28b voiconshop:dev 'tail -f /dev/null' 8 minutes ago Up 8 minutes 5000/tcp, 0.0.0.0:32769->80/tcp...
Nguyễn Minh Vương
1

votes
0

answer
40

Views

Code freezes when trying to set new user password in Active Directory in ASP.NET MVC 5

var NewUserPC= new PrincipalContext(ContextType.Domain, Server, OU, ServiceUserName, ServiceUserPassword); var user = new UserPrincipal(NewUserPC); user.GivenName = firstName; user.Surname = lastName; user.Name = firstName + ' ' + lastName; user.UserPrincipalName = FILN + '@domain.com'; user.SamAcco...
rStackSharper
1

votes
1

answer
62

Views

How to maintain view state when navigating between screens in ASP.NET

In an ASP.NET application, I would like the screen state to be preserved when navigating between screens. So if on a screen A I search for something and the data is presented on screen, I then click 'Next' to navigate to screen B, then click 'Back' to navigate back to screen A, the search parameters...
user1340582
1

votes
0

answer
65

Views

ASP.net web application deployed to elastic beanstalk giving 500 error

I have ASP.net web application running good in localhost. Then I published that application to AWS Elastic Bean Stalk. When I opened that URL, it shows 500 Internal Server Error. Please help me.
Rajiv Krishnaa
1

votes
1

answer
99

Views

Why is my post data all null when posting with HttpClient?

I am trying to post an object from a client web app to a CRUD API for said client. I am using the following code to make the post request: var respP = await _client.PostAsync('api/Persons', new StringContent(JsonConvert.SerializeObject(person), Encoding.UTF8, 'application/json')); And the API action...
ProfK
1

votes
1

answer
195

Views

how to make formatted excel columns autofit with c#

I am exporting gridview to excel and this is my code- HttpContext.Current.Response.Clear(); HttpContext.Current.Response.Buffer = true; HttpContext.Current.Response.AddHeader('content-disposition', string.Format('attachment; filename={0}', fileName)); HttpContext.Current.Response.Cache.SetCacheabili...
MUIED AHMAD
1

votes
1

answer
37

Views

Value from previous page not transferring

I have the following code, in which I am trying to transfer some text in a previous page's textbox control (located in the master page) to the same master page textbox control. However it is not working. Please let me know if you can spot the error. protected void Page_Load(object sender, EventArgs...
czolbe
1

votes
0

answer
129

Views

How to perform a LINQ join on IQueryable<T> in odata controller

I have a WebAPI method which uses the OData Query Options to return data to the client. The entity has cityid and I want cityname from another entity using joins. I have tried using below Api method, which is incomplete. Entity1:- public partial class UU_DeliveryCharges { public int DeliveryChargeId...
Sunil Chaudhary
1

votes
1

answer
37

Views

Java Script Function Not Returning Value

I have a java script function that return a string value, when i call this function on button click it return nothing. Here is my function code: function PlotMap(StartLat, StartLog, EndLat, EndLog) { var map; var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var llL...
Shaunak Srivastava

View additional questions