Questions tagged [asp.net-4.5]

Refers to the version 4.5 of the ASP.NET web application framework introduced with the .NET Framework 4.5

Refers to the version 4.5 of the ASP.NET web application framework introduced with the .NET Framework 4.5

609 questions
156
votes
6 answers

IIS_IUSRS and IUSR permissions in IIS8

I've just moved away from IIS6 on Win2003 to IIS8 on Win2012 for hosting ASP.NET applications. Within one particular folder in my application I need to Create & Delete files. After copying the files to the new server, I kept seeing the following…
EvilDr
  • 7,561
  • 10
  • 60
  • 114
150
votes
11 answers

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

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…
nzondlo
  • 4,024
  • 4
  • 16
  • 20
91
votes
2 answers

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

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…
Robert Hegner
  • 8,196
  • 6
  • 51
  • 89
81
votes
6 answers

Build ASP.NET 4.5 without Visual Studio on Build Server

Its been a while since I setup a Build Server so maybe I've forgotten something or maybe .NET 4.5 is different from whatever version I did this with last time, but here is my problem. I'm trying to setup a build server to monitor a source control…
Zack
  • 2,121
  • 2
  • 18
  • 34
79
votes
2 answers

Why is my ClaimsIdentity IsAuthenticated always false (for web api Authorize filter)?

In a Web API project I am overriding the normal authentication process to check tokens instead. The code looks something like this: if ( true ) // validate the token or whatever here { var claims = new List(); claims.Add( new Claim(…
explunit
  • 18,299
  • 5
  • 63
  • 91
63
votes
1 answer

What can I do in C# 5 with .Net 4.5 that I couldn't do in C# 4 with .Net 4?

I have Visual Studio 2012 RC installed on Windows 8 Release Preview and my question is are there any useful new features not related to Metro, or is Metro what seperates .Net 4 and .Net 4.5?
JMK
  • 24,985
  • 50
  • 147
  • 268
57
votes
3 answers

Unable to declare Interface " async Task MyMethod(Object myObj); "

I'm unable to declare interface IMyInterface { async Task MyMethod(Object myObj); } The compiler tells me: The modifier async isn't valid for this item The async modifier can only be used for methods that have a body Is this…
halfbit
  • 54,462
  • 46
  • 195
  • 426
45
votes
14 answers

The "EnsureBindingRedirects" task failed unexpectedly

When I create new ASP.NET 4.5 web forms application from vs2012 and update all nuget packages, I receive this error on build: Error 1 The "EnsureBindingRedirects" task failed unexpectedly. System.NullReferenceException: Object reference not…
Ivan Lewis
  • 720
  • 1
  • 7
  • 18
40
votes
5 answers

Writing to ZipArchive using the HttpContext OutputStream

I've been trying to get the "new" ZipArchive included in .NET 4.5 (System.IO.Compression.ZipArchive) to work in a ASP.NET site. But it seems like it doesn't like writing to the stream of HttpContext.Response.OutputStream. My following code example…
Daniel Sørensen
  • 403
  • 1
  • 5
  • 7
40
votes
1 answer

EntityFramework 5 use dll version 4.4.0.instead 5.0

I have project based on .NET 4.0 but I need to use EntityFramework 5 in my solution. So I install it from the NuGet. After that I change target framework to .NET 4.5 (I'm using VS 2012) and rebuild project. But in reference folder I see that project…
Rroman
  • 656
  • 1
  • 7
  • 11
37
votes
3 answers

Bundling resources via bundle.config vs BundleConfig.cs in ASP.NET 4.5 WebForms

Regarding ASP.NET 4.5's new System.Web.Optimization / Microsoft.AspNet.Web.Optimization: Can anyone explain the difference in the use of bundling resources using the BundleConfig.cs class file as opposed to the bundle.config xml file? I've seen some…
kman
  • 2,033
  • 2
  • 20
  • 37
37
votes
1 answer

Using Claim-Based Authorization

The new ASP.NET 4.5 code has "re-parented" the ASP.NET RoleProvider to a ClaimsProvider. What I'm trying to figure out, is what would a "claims based" example of authorization look like (preferably in MVC4)? How does my Authorize attribute…
Brent Arias
  • 26,187
  • 32
  • 120
  • 209
34
votes
2 answers

How to detect IIS Express version?

I have found that our ASP.NET application runs differently on different machines in IIS Express. All have VS 2012, .Net 4.5 and Integrated mode. But some has VS 2012 Update 1, some not. How do I find IIS Express version?
IT Hit WebDAV
  • 5,041
  • 12
  • 50
  • 88
33
votes
4 answers

Using ASP.NET 4.5 Bundling & a CDN (eg. CloudFront)

ASP.NET 4.5 has a great new bundling feature and appears to have some support for use of CDNs. The example given by Microsoft for use of the bundling feature with a CDN is this public static void RegisterBundles(BundleCollection bundles) { …
Mr. Flibble
  • 25,035
  • 21
  • 67
  • 96
31
votes
4 answers

User.Identity.IsAuthenticated is false after successful login

I need to get the UserId Guid directly after a successful login. The following code doesn't work: if (Membership.ValidateUser(txtUsername.Value, txtPassword.Value)) { FormsAuthentication.SignOut(); …
user982119
  • 2,455
  • 8
  • 45
  • 71
1
2 3
40 41