asp.net-4.5

WCF and Shared Reference Library Between Client & Service

一笑奈何 提交于 2019-12-01 08:26:59
Visual Studio and SvcUtil can be used to generate proxy code to integrate with a service. In VS 2010 and prior there were issues if you wanted to maintain a cross tier reference library of shared types. This forced several workarounds to address the issue of equivalence in the data contract types and the inability to properly use the local types. URL Reference to Issue: WCF Client Code Generation - Issue with "Reuse types from referenced assemblies" I am using Visual Studio 2012, ASP.NET 4.5, C# code My Question: "Has the reuse of types across assemblies been fixed in VS 2012?" I am porting

WCF and Shared Reference Library Between Client & Service

不羁岁月 提交于 2019-12-01 07:09:33
问题 Visual Studio and SvcUtil can be used to generate proxy code to integrate with a service. In VS 2010 and prior there were issues if you wanted to maintain a cross tier reference library of shared types. This forced several workarounds to address the issue of equivalence in the data contract types and the inability to properly use the local types. URL Reference to Issue: WCF Client Code Generation - Issue with "Reuse types from referenced assemblies" I am using Visual Studio 2012, ASP.NET 4.5,

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

吃可爱长大的小学妹 提交于 2019-12-01 02:02:30
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? 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. 来源: https://stackoverflow.com/questions/11548373/what-can-i-do-in-c-sharp-5-with-net-4-5-that-i-couldnt-do-in-c-sharp-4-with-n

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

折月煮酒 提交于 2019-11-30 22:18:00
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . 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? 回答1: See What's New in the .NET Framework 4.5 and What's New for Visual C# in Visual

typescript for web forms

余生长醉 提交于 2019-11-30 20:06:32
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! 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" in your project, the option "TypeScriptCompile" on the "Build Action" of the file properties is not

async calls using HttpClient on MVC4

天涯浪子 提交于 2019-11-30 14:12:27
I'm playing a little bit with this new technology in .net 4.5, I would like to check the code for this call and how should I control the errors or the response of my async call. The call is working perfectly, I need full control of possible errors returned from my service. this is my code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Newtonsoft.Json; namespace TwitterClientMVC.Controllers { public class Tweets { public Tweet[] results; } public class Tweet { [JsonProperty("from_user")] public string UserName { get; set; } [JsonProperty("text")]

.NET 4.5 MVC RouteCollection.LowercaseUrls breaks when using Area

谁说我不能喝 提交于 2019-11-30 11:13:31
A new property to RouteCollection was added with .NET Framework 4.5: http://msdn.microsoft.com/en-us/library/system.web.routing.routecollection.lowercaseurls.aspx This works great, until you add an Area to your project. All Urls are propercase again. Any ideas why this happens? It's simple to reproduce: Create new MVC 4 Internet Application (.NET 4.5) Start RouteConfig.RegisterRoutes function with: routes.LowercaseUrls = true; Run the project and you'll see all generated Urls are now lowercase. Add an Area to the project. Run the project again and you'll see all Urls are propercase again! It

EntityFramework 5 use dll version 4.4.0.instead 5.0

亡梦爱人 提交于 2019-11-30 04:41:16
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 use EntityFramework.dll version 4.4.0.0. Ho can I use newer version of EntityFramework? in web.config <compilation debug="true" targetFramework="4.5"> <assemblies> <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> </assemblies> </compilation> Newer version (the real EF5) is dependent on .NET 4

async calls using HttpClient on MVC4

两盒软妹~` 提交于 2019-11-29 20:51:17
问题 I'm playing a little bit with this new technology in .net 4.5, I would like to check the code for this call and how should I control the errors or the response of my async call. The call is working perfectly, I need full control of possible errors returned from my service. this is my code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Newtonsoft.Json; namespace TwitterClientMVC.Controllers { public class Tweets { public Tweet[] results; } public

Using Claim-Based Authorization

半城伤御伤魂 提交于 2019-11-29 19:37:28
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 interact, or not, with this capability? The WebSecurity and Roles API havn't changed; there is no "DoesUserHaveClaim()" signature. Similarly, it is not clear how the Authorize attribute interacts with claims. Was this "claims authorization" feature intended primarily for OAuth? If so, how are claims forwarded to my application? A cookie? Or was this claims