Questions tagged as 'asp.net-mvc'

1
answer

Get logged in user id

How do I get the user ID logged into the site, then insert it into another table? Trying to explain better. I have an action called CreatePub, which allows the user to write their publications on the site. In my publications table, you have t...
asked by 03.10.2014 / 04:20
3
answers

Asp.net MVC Session ends

I have an ASP.NET MVC 4.0 application on a KingHost server. In my web.config I do the following: <sessionState timeout="1000"></sessionState> <authentication mode="Forms"> <forms loginUrl="~/Logi...
asked by 10.07.2014 / 03:10
1
answer

Problem with Custom Routes and HttpHandler in ASP.NET MVC

In a project I'm working on, I wrote a HttpHandler to get an image instead of a View , something like this: using System; using System.Web; using System.Web.Routing; using MeuProjeto.Data; using MeuProjeto.Infrastructure; namespace Me...
asked by 16.04.2014 / 17:38
1
answer

How to use multiple classes as User in Identity - Asp.Net Identity

I want to use 2 classes as User in Identity and I could not see this change in the code. Let's assume that I will use the default class "ApplicationUser" which generates an "AspNetUsers" table and I want to use another "Customers" table that...
asked by 09.02.2015 / 20:11
2
answers

VIewModel relationships with EF

I'm developing a project where a user will have multiple data. In order not to extend the class much I thought about separating by categories. Example classes: User Personal Data Family Data Etc. To do this on the site I thought abo...
asked by 06.02.2015 / 17:55
2
answers

Send email using ASP.Net MVC

How can I send email using ASP.Net MVC? Do you have any option to send without specifying SMTP similar to mail() of PHP ?     
asked by 03.09.2015 / 22:20
1
answer

Remove "OR" condition from LINQ query

I have the following method: bool naoUsarNomeCliente = String.IsNullOrWhiteSpace(filtro.NomeCliente); long codigoExterno; bool naoUsarCodigoExterno = !long.TryParse(filtro.CodigoExterno, out codigoExterno); bool naoUsar...
asked by 09.06.2017 / 21:05
3
answers

How to insert an existing record in the Entity Framework?

At some point in the system some records are selected and must be replicated by changing only one value. At this point I'm selecting the records that I need to insert: listaRegistros = listaRegistros .GroupBy(r => r.Id)...
asked by 15.05.2017 / 15:11
2
answers

Application Server

The client does not have a server (Windows Server or Linux) and does not want to host the system in a data center or in clouds for example, and wants to use the system on an intranet. At the moment 3 employees will use the system being deve...
asked by 29.09.2016 / 13:20
1
answer

MVC or SPA application

I have been working with MVC for the past two years, but lately I have been following the growth of the development of SPA applications. After reading several articles on this subject I had a doubt, if I wanted to develop an application to be pu...
asked by 28.05.2016 / 08:30