asp.net-mvc

TFS:The “Microsoft.Reporting.RdlCompile” task could not be loaded from the assembly Microsoft.ReportViewer.WebForms, Version=11.0.0.0

社会主义新天地 提交于 2021-02-07 14:21:09
问题 I have a mvc5 web application in TFS server 2013. When I build the solution locally, its working fine. I created a Build definition in TFS and tried to Build, it returned below compiler error. "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\ReportingServices\Microsoft.ReportingServices.targets (24): The "Microsoft.Reporting.RdlCompile" task could not be loaded from the assembly Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91.

Asp .Net Core 2 + SignalR (1.0.0-alpha2-27025) + /signalr/negotiate 404 Error

陌路散爱 提交于 2021-02-07 14:15:40
问题 I add SignalR to ASP .Net Core 2 app packages "Microsoft.AspNetCore.All" Version="2.0.0" "Microsoft.AspNetCore.SignalR" Version="1.0.0-alpha2-27025" "Microsoft.AspNetCore.SignalR.Client" Version="1.0.0-alpha2-27025" "Microsoft.AspNetCore.SignalR.Client.Core" Version="1.0.0-alpha2-27025" "Microsoft.AspNetCore.SignalR.Common" Version="1.0.0-alpha2-27025" "Microsoft.AspNetCore.SignalR.Core" Version="1.0.0-alpha2-27025" public IServiceProvider ConfigureServices(IServiceCollection services) {

Entity Framework ToListAsync() with Select()

 ̄綄美尐妖づ 提交于 2021-02-07 13:46:58
问题 I have the following ActionResult in my controller public async Task<ActionResult> NewTickets() { // Show tickets for all divisions a agent is in var user = "abcdefg"; var company = "company1"; var tickets = (from a in db2.Ticket join c in db2.Division on a.DivisionId equals c.DivisionId join dp in db2.DivisionParticipator on c.DivisionId equals dp.DivisionId where c.CompanyId == company.CompanyId && a.Status == "New" && dp.ApplicationUserId == user.Id select new { Id = a.Id, DivisionId = a

Rotativa - ViewAspdf does not work on server

六眼飞鱼酱① 提交于 2021-02-07 13:23:37
问题 I know that this topic has been discuss on several articles, but none of the solution help me. I have this action: public ActionResult DownloadViewPDF(string userId) { var model = db.MyCvs.FirstOrDefault(u => u.UserId == userId); if (model != null) return new Rotativa.ViewAsPdf("ViewUserCv", model) { FileName = model.FirstName + model.LastName + "_CV.pdf" }; return Content("there is no Cv to download"); } Using the above action I am downloading a view as pdf, and everything is working as

400 bad request when access ASP.net web api via computer name on IISExpress

醉酒当歌 提交于 2021-02-07 13:21:44
问题 I'm getting a 400 bad request error message when accessing an ASP.net web api via a url that uses the computer name. When I use localhost it works fine. I'm using the iisExpress for visual studio 2012. Any help is appreciated! Thanks in advance! 回答1: I found the answer to this from another post on here. I had to update my IISExpress' applicationhost.config file and add a binding with my computer name on it. The link to the other post is here: Configure IIS Express for external access to

Migrate existing Microsoft.AspNet.Identity DB (EF 6) to Microsoft.AspNetCore.Identity (EF Core)

丶灬走出姿态 提交于 2021-02-07 13:20:17
问题 I am working on an application (APS.net MVC) which uses Microsoft.AspNet.Identity . Now I want to revamp my application to APS.net Core which uses Microsoft.AspNetCore.Identity . But those two has some differences in each model. Is there any direct way to generate initial migration for Microsoft.AspNetCore.Identit y related changes in-order to connect existing DB with Asp.net Core identity? 回答1: I was able to migrate existing DBs using the following steps. Create a new ASP.net Core project

400 bad request when access ASP.net web api via computer name on IISExpress

情到浓时终转凉″ 提交于 2021-02-07 13:18:23
问题 I'm getting a 400 bad request error message when accessing an ASP.net web api via a url that uses the computer name. When I use localhost it works fine. I'm using the iisExpress for visual studio 2012. Any help is appreciated! Thanks in advance! 回答1: I found the answer to this from another post on here. I had to update my IISExpress' applicationhost.config file and add a binding with my computer name on it. The link to the other post is here: Configure IIS Express for external access to

Why are changes to my WebJob not being picked up when publishing the Web App?

二次信任 提交于 2021-02-07 13:00:46
问题 I have an ASP.NET MVC Web App which is deployed to Azure. The solution within VS 2013 Pro has 3 projects: the Web App project a Webjob project a Common project which stores code which is common to both the App and the Webjob. The Webjob project was added to the main App project via the Add --> New Azure Webjob Project context menu, which actually adds a new project within the same solution, which is fine. When I initially published the app to Azure, the Webjob was deployed too and all is

How to call MVC ChildActionOnly Controller Action using jQuery

三世轮回 提交于 2021-02-07 12:44:11
问题 I have a DropDownListFor that is in a Partial View. On change it fires a jQuery script, but Fiddler shows an HTTP 500 Error: The action 'LanguageListPartial' is accessible only by a child request. The calling script: <script type="text/javascript"> $(function () { $('#SelectedLanguage').on('change', function () { var culture = $(this).val(); $('#test').load("/Account/LanguageListPartial/" + culture, function () { location.reload(true); }); }); }); </script> I wouldn't want that Controller

How to Change ConnectionStrings at Runtime for a Web API

試著忘記壹切 提交于 2021-02-07 12:27:34
问题 I hope this is a simple question: How can you change 2 connection strings at runtime in the Global.asax under Application_Start() Web.config <connectionStrings> <add connectionString="DB1" value=""/> <add connectionString="DB2" value=""/> </connectionStrings> Global.asax protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable