asp.net-mvc-5

Rotativa ActionAsPdf() Very Slow

时光毁灭记忆、已成空白 提交于 2020-01-02 07:02:41
问题 Using Rotativa 1.6.4 from NuGet and have noticed the following issue using the code below. ActionAsPdf hangs randomly for indeterminate amount of time. Code below that is hanging: var pdfResult = new ActionAsPdf("Report", new {id = Request.Params["id"]}) { Cookies = cookieCollection, FormsAuthenticationCookieName = FormsAuthentication.FormsCookieName, CustomSwitches = "--load-error-handling ignore" }; Background info that may help: The customSwitches is in use to ignore a documented issue

Run a .Net MVC5 application on Mono

给你一囗甜甜゛ 提交于 2020-01-02 06:43:10
问题 I am developing an .Net 4.5.1 MVC5 application in Visual Studio 2013 on Windows. Now I want to know, if it is possible to run this application on Linux ( Ubuntu 12.04 )? Would it be possible to use OWIN? 回答1: Owin can be run self hosted which means no IIS which is a start see here Use OWIN to Self-Host ASP.NET Web API Then to also help see this post about deploying to a mono instance on heroku Running OWIN/Katana apps on Heroku 来源: https://stackoverflow.com/questions/21455600/run-a-net-mvc5

Why does my site redirect back to the Login screen when I click an external provider button?

社会主义新天地 提交于 2020-01-02 05:03:11
问题 I'm upgrading an ASP.Net MVC4 site to MVC5, and implementing the new OWIN Authentication methods in the process. I've copied over the action methods from the Account controller on a blank MVC5 project. The problem is, when I click an external provider button (e.g. Google) I just get redirected back to the login page again. The second time I click it, I do get taken to the Google account page, but then the browser gets redirected to the Account/External login page. What's going on? 回答1: Check

Where is the class ManageUserViewModel?

五迷三道 提交于 2020-01-02 03:27:11
问题 I have created a project using ASP.Net MVC 5, EF 6 and .Net 4.5.1 At some point I needed to change the namespace that the project is in, from "MyTestProject" to "MyRealProject". After making those changes throughout the web site I now get several errors in a couple of my views. _ChangePasswordPartial.cshtml can't find "@model Microsoft.AspNet.Identity.ManageUserViewModel" any longer and _SetPasswordPartial.cshtml can't find "MyRealProject.ManageUserViewModel" No where in the project can I

entity type ApplicationUser is not part of the model for the current context

做~自己de王妃 提交于 2020-01-02 02:35:12
问题 I have an web application in Asp.net with Entity Framework 6 and database first. I'm having issue when it come for the user to connect.Here's my code: Web.config <connectionStrings> <add name="DefaultConnection" connectionString="data source=MyServer\MyDataBase;initial catalog=Cliniciel_WebRV_Master;User Id=XXX;Password=XXXX" providerName="System.Data.SqlClient" /> <add name="Cliniciel_WebRV_MasterEntities" connectionString="metadata=res://*/Models.Entities.Cliniciel_WebRV_Master.csdl|res://*

ASP.NET Vnext Tag Helpers for Areas

北城以北 提交于 2020-01-02 00:32:40
问题 I may use <a href='/Area/Controller/action'> </a> in asp.net vnext but just want to know whether we can use tag helpers like <a asp-controller="ControllerName" asp-action="ActionName" asp-area="AreaName"> to redirect to the specific file in the area. Will any one guide me how to redirect to a file in area using tag helpers.? 回答1: Finally I got the answer from the following link which works well. <a asp-route-area="AreaName" asp-controller="ControllerName" asp-action="ActionName"> </a> github

MVC (5) Populate a dropdown based on another [duplicate]

两盒软妹~` 提交于 2020-01-01 15:55:55
问题 This question already has answers here : better way to load 2 dropdown in mvc (5 answers) Closed 2 years ago . I know I can make a dropdown with a list of SelectedListItem> and @Html.DropDownList("someID") and os on.. My question is , what if you had 2 dropdowns, and the second dropdown depended on the selected item from the first dropdown? How do you populate it? With JS? How would you go about it? Would you change the populate with another list, change the whole dropdown or maybe have a

DynamoDB consistent reads for Global Secondary Index

点点圈 提交于 2020-01-01 09:41:51
问题 Why cant I get consistent reads for global-secondary-indexes? I have the following setup: The table: tblUsers (id as hash) Global Secondary Index: tblUsersEmailIndex (email as hash, id as attribute) Global Secondary Index: tblUsersUsernameIndex (username as hash, id as attribute) I query the indexes to check if a given email or username is present, so I dont create a duplicate user. Now, the problem is I cant do consistent reads for queries on the indexes. But why not? This is one of the few

DynamoDB consistent reads for Global Secondary Index

a 夏天 提交于 2020-01-01 09:41:40
问题 Why cant I get consistent reads for global-secondary-indexes? I have the following setup: The table: tblUsers (id as hash) Global Secondary Index: tblUsersEmailIndex (email as hash, id as attribute) Global Secondary Index: tblUsersUsernameIndex (username as hash, id as attribute) I query the indexes to check if a given email or username is present, so I dont create a duplicate user. Now, the problem is I cant do consistent reads for queries on the indexes. But why not? This is one of the few

How can I use Bootstrap button addons in my MVC view

我是研究僧i 提交于 2020-01-01 09:17:34
问题 I'm having difficulty getting Bootstrap's button addons to work in my MVC view. I'm using the latest NuGet version of ASP.NET MVC (5.1 rc1) and Bootstrap (3.03). I have the following in my view (now that I've pared it back to just hand-coded HTML rather than using Html.EditorFor() , in an attempt to getting it to work): @using (Html.BeginForm()) { @Html.AntiForgeryToken() <div class="form-horizontal"> @Html.ValidationSummary(true) <div class="row"> <div class="col-lg-6"> <div class="input