asp.net-4.5

await/async Microsoft Practices Enterprise Library Data

 ̄綄美尐妖づ 提交于 2020-01-02 02:46:07
问题 I have an older application that I wrote where I used Microsoft.Practices.EnterpriseLibrary.Data to get data from the DB. I have recently upgraded to .NET 4.5 and wanted to advantage of await/async . I do not see any methods ending in "Async" as per the naming standard, even in the most recent version of the package. Is it possible to use await/async with this ADO .NET library without manually making it asynchronous? 回答1: I'm using an older version of the EL that offers Begin* / End* methods,

typescript for web forms

我只是一个虾纸丫 提交于 2019-12-30 06:21:08
问题 Is typescript supported on web forms? I have an existing asp.net 4.5 web forms project where typescript does not seem to be working. I cannot create a new file, but even if I rename an existing to .ts it does not seem to be working. No build, no intellisense, nothing! 回答1: Found the answers to my problems: I was trying to find "Typescript file" in Web folder of the "Add New Item" dialog, although it is in the "Visual C#" folder ..... Why? Unless you have a .ts file created with "Add New Item"

ManagedPipelineHandler for an AJAX POST crashes if an IE9 user navigates away from a page while that call was in progress

北城余情 提交于 2019-12-29 04:23:27
问题 Scenario: User is using IE9 (IE8/10 not affected). User has an active session. Page starts an AJAX POST (GET not affected) request to a controller with the SessionState(SessionStateBehavior.Required) attribute ( ReadOnly not affected). Something keeps this request from being immediately processed (such as another request in progress that has the session locked). While that AJAX POST is in progress, the user navigates away from the page (GET or POST - doesn't matter) Result: AJAX POST

asp.net 4.5 Web Forms Unobtrusive Validation jQuery Issue

前提是你 提交于 2019-12-28 13:56:49
问题 I've been checking out some of the new features for Web Forms in 4.5, and I have run into a road block with unobtrusive validation. Unobtrusive validation in Web Forms 4.5 is dependent on jQuery, and when it is enabled will result in a jQuery script reference inside of the server form in the page body. This sounds great, and I love the concept. It works great in the demos I have looked at, and the reduction/cleanup in code is a beautiful thing. I run into issues, however, when I enable this

GlobalConfiguration.Configure() not present after Web API 2 and .NET 4.5.1 migration

ε祈祈猫儿з 提交于 2019-12-28 03:23:10
问题 I recently started following this guide to migrate my project to .NET 4.5.1 and Web Api 2. The very first thing MS developer Rick Anderson asks you to do is change: WebApiConfig.Register(GlobalConfiguration.Configuration); to GlobalConfiguration.Configure(WebApiConfig.Register); in the global.asax file. Yet this is giving me an error when I try to build: Error 1 'System.Web.Http.GlobalConfiguration' does not contain a definition for 'Configure' My project is currently on MVC 5 and Web Api 2

Using Grunt, Bower, Gulp, NPM with Visual Studio 2015 for a ASP.NET 4.5 Project

雨燕双飞 提交于 2019-12-28 03:15:16
问题 Visual Studio 2015 comes with built in support for tools like Grunt, Bower, Gulp and NPM for ASP.NET 5 projects. However when I create a ASP.NET 4.5.2 project using Visual Studio 2015 it doesn't use these tools. I'd like to use bower instead of nuget to manage client side packages. I can find information about using these tools with Visual Studio 2013 (see this question for example). But I guess the procedure is different for Visual Studio 2015 since it has built in support for these tools.

Web forms model binding child collection

℡╲_俬逩灬. 提交于 2019-12-24 15:36:52
问题 I can't figure out how to use model binding to update a child collection like I can in MVC. All the collection-type controls seem to assume some server-side storage mechanism using an edit/update lifecycle, which doesn't fit if this is supposed to be an insert form where I want to store the child collection in the form itself. public class BarViewModel { public string Name {get;set;} } public class FooViewModel { public string Description {get;set;} public List<BarViewModel> Bars {get;set;} }

asp.net 4.5 mixing forms and windows authentication

浪子不回头ぞ 提交于 2019-12-24 06:38:15
问题 I'm starting a new ASP.NET 4.5 web forms application and one of the requirements is that there is the user to login with windows authentication if available or login using forms authentication if the user is not a member of the domain. Additionally, there are 2 scenarios, above is the first one for if the user is on the internal network the other is if the user is accessing the application externally (https). In that case a prompt for user name and password should be able to authenticate

Add a reference to the System.IdentityModel.Tokens DLL

淺唱寂寞╮ 提交于 2019-12-23 13:22:47
问题 How do I add a reference to the System.IdentityModel.Tokens dll? It does not seem to come up in the Nuget Package Manager. Do I need to download the DLL? I have .Net 4.5 installed. The following code will not compile without the reference: SessionSecurityToken sst = e.SessionToken; 回答1: It does exist on NuGet, and was last published 2013-02-08, so I don't understand why you couldn't find it. Try searching for System.IdentityModel.Tokens.ValidatingIssuerNameRegistry . The best way is to

.net 4.5 Asp Mvc -> Error 403.14- IIS 7 - Windows Server 2008 R2

妖精的绣舞 提交于 2019-12-23 07:02:24
问题 When I want to deploy an MVC 4 (.net 4.5) application to my iis i got the 403.14 calling me that the content ist not browseable. This also occurs when i deploy the unchanged mvc 4 template. when using the mvc 4 template with .net 4.0 everything works. I checked the other posts but can't figure out the solution. ist set i ran aspnet_regiss -i which completed without any errors. the only strange thing is that .net 4.5 is installed in the .net 4.0 directory %windows%/microsoft.net/Framework64/ 4