asp.net-4.5
User.Identity.IsAuthenticated is false after successful login
I had the same problem too. I forgot to set the web.config configuration. Maybe you missed too. <system.web> <authentication mode=”Forms”> <forms loginUrl=”~/user/login” timeout=”1000″ name=”__Auth” /> </authentication> </system.web>
Using Claim-Based Authorization
Claims-based security helps decouple your security model from your application domain. A claim can be anything you want to attach to the identity of the user, such as an email, phone number, or flag indicating whether the user is a super user. This gives you the ultimate flexibility on how you want to setup your … Read more
How to detect IIS Express version?
Browse to “C:\Program Files\IIS Express”, select the file iisexpress.exe, press Alt+Enter to open the properties dialog, click on the Details tab and read the product version.
Bundling resources via bundle.config vs BundleConfig.cs in ASP.NET 4.5 WebForms
As far as I can tell, the accepted answer doesn’t actually answer the question at all. It discusses the benefits of the bundling framework, but not how using the BundleConfig.cs is different than using the bundle.config file. A lot of it comes down to whether you prefer working in code or in markup, but each … Read more
EntityFramework 5 use dll version 4.4.0.instead 5.0
Newer version (the real EF5) is dependent on .NET 4.5. If you have added EF5 when your project was based on .NET 4.0 you will have only EF 4.4 (EF5 version without features dependent on .NET 4.5). After upgrading to EF 5.0 you need to update EntityFramework package. You can try to use Update-Package command. … Read more
Unable to declare Interface ” async Task MyMethod(Object myObj); ” [duplicate]
Whether a method is implemented using async/await or not is an implementation detail. How the method should behave is a contract detail, which should be specified in the normal way. Note that if you make the method return a Task or a Task<T>, it’s more obvious that it’s meant to be asynchronous, and will probably … Read more
Writing to ZipArchive using the HttpContext OutputStream
Note: This has been fixed in .Net Core 2.0. I’m not sure what is the status of the fix for .Net Framework. Calbertoferreira’s answer has some useful information, but the conclusion is mostly wrong. To create an archive, you don’t need seek, but you do need to be able to read the Position. According to … Read more
The “EnsureBindingRedirects” task failed unexpectedly
It’s a bug in Microsoft.Bcl.Build and to solve it you have to put culture info in the assemblyIdentity-part of web.config or app.config. For example if you have: <dependentAssembly> <assemblyIdentity name=”System.Web.Helpers” publicKeyToken=”31bf3856ad364e35″ /> <bindingRedirect oldVersion=”1.0.0.0-2.0.0.0″ newVersion=”2.0.0.0″ /> </dependentAssembly> change it to: <dependentAssembly> <assemblyIdentity name=”System.Web.Helpers” publicKeyToken=”31bf3856ad364e35″ culture=”neutral” /> <bindingRedirect oldVersion=”1.0.0.0-2.0.0.0″ newVersion=”2.0.0.0″ /> </dependentAssembly>
What can I do in C# 5 with .Net 4.5 that I couldn’t do in C# 4 with .Net 4? [closed]
See What’s New in the .NET Framework 4.5 and What’s New for Visual C# in Visual Studio 2012. The biggest new feature of C# 5.0 is better support for asynchronous operations, using the new await keyword.