.net-4.0

What will be the new features available in ASP.Net 4.0?

纵然是瞬间 提交于 2019-12-17 18:43:45
问题 What will be the new features available in ASP.Net 4.0? 回答1: There's a couple of videos on Mircosoft Channel 9: ASP.NET 4.0 Roadmap by Scott Hunter It seems like someone has made session notes on this talk, as well. New Features of ASP.NET 4.0 by Steven Walther Quoted (partially) from those session notes on the linked blog post: Web Forms Developers can manage control IDs that affect rendered client ID Remove ID bloat, and 'mangling' CSS: Ideally remove the need to use CSS adapters Defer to

How do I create the .docx document with Microsoft.Office.Interop.Word?

£可爱£侵袭症+ 提交于 2019-12-17 18:43:20
问题 How do I create the .docx document with Microsoft.Office.Interop.Word from List? or the best way is to add docx.dll? http://www.c-sharpcorner.com/UploadFile/scottlysle/using-the-docx-dll-to-programmatically-create-word-documents/ Update. May be my first question is a litle incorrect. What is the difference between Microsoft.Office.Interop.Word and DocX.dll? Do I need Microsft Word for creating and opening .docx document in both cases? 回答1: After installing OpenXML SDK you will able to

Backwards Compatibility of .NET Framework 4

不羁岁月 提交于 2019-12-17 18:17:51
问题 We have an WPF Application build on .net framework 3.5. Some testers find if they uninstall .net framework 3.5, but install .net framework 4.0, our APP fails to launch itself. Dose this mean that .net framework 4.0 does not include all 3.5 libs, and users have to install .net 3.5 even though they have 4.0? I see here are some migration issues listed by Microsoft http://msdn.microsoft.com/en-us/library/ee941656.aspx#windows_presentation_foundation_wpf Are they all breaking changes so that the

Why is the new Tuple type in .Net 4.0 a reference type (class) and not a value type (struct)

妖精的绣舞 提交于 2019-12-17 17:32:24
问题 Does anyone know the answer and/or have an opinion about this? Since tuples would normally not be very large, I would assume it would make more sense to use structs than classes for these. What say you? 回答1: Microsoft made all tuple types reference types in the interests of simplicity. I personally think this was a mistake. Tuples with more than 4 fields are very unusual and should be replaced with a more typeful alternative anyway (such as a record type in F#) so only small tuples are of

PerformanceCounters on .NET 4.0 & Windows 7

穿精又带淫゛_ 提交于 2019-12-17 17:29:53
问题 I have a program that works fine on VS2008 and Vista, but I'm trying it on Windows 7 and VS2010 / .NET Framework 4.0 and it's not working. Ultimately the problem is that System.Diagnostics.PerformanceCounterCategory.GetCategories() (and other PerformanceCounterCategory methods) is not working. I'm getting a System.InvalidOperationException with the message "Cannot load Counter Name data because an invalid index '' was read from the registry." I can reproduce this with the very simple program

Why can't I style a control with the Aero theme applied in WPF 4.0?

拟墨画扇 提交于 2019-12-17 17:27:08
问题 I recently converted a project from WPF 3.5 to WPF 4.0. Functionally, everything works, but the DataGrid style I was applying on top of the Aero theme has suddenly stopped working. As you can see from the before/after pictures below, my DataGrids went from having an Aero look plus bold headings, extra padding, and alternating row formats to just looking plain "Aero". Besides removing all references to the WPF Toolkit (since the DataGrid is now native to WPF 4.0), I really didn't change

dotnet Framework 4 missing from visual studio 2010

我的未来我决定 提交于 2019-12-17 16:48:13
问题 I just installed visual studio 2010 but when i create a new project Framework 4 does not appear in the options for target framework. I know framework 4 installed correctly because the new app pools set to v4 were created in IIS. For some reason it's just not showing up in visual studio. I tried repairing dotnet 4 and reinstalling visual studio but still no luck. Anyone else have this problem or know how to fix it? 回答1: Changes which lead to missing .Net4 problem: 1. I changed some registry

How can I resolve the schemaLocation attribute of an .XSD when all of my .XSD's are stored as resources?

橙三吉。 提交于 2019-12-17 16:36:31
问题 I am working on a project where I need to generate XML files based on nested XSD's. e.g. ORDER has a reference to PERSON, PERSON has a reference to ADDRESS, etc. I am creating an `XmlReaderSettings' instance to validate the XSD's, as well as validate the XML after it is generated. I have added the XSD's as Resources to my assembly. I then create an XmlSchema instance for each resource, from lowest to highest, and add it to the XmlReaderSettings.Schemas collection. However, this fails

ValidateCredentials returns true for unknown user?

谁都会走 提交于 2019-12-17 16:21:02
问题 I'm seeing some odd behaviour here using PrincipalContext.ValidateCredentials . The set-up is two Active Directory domains in parent/child setup (so we have primary domain company.com and sub-domain development.company.com ). When I validate credentials against the primary domain, ValidateCredentials behaves as expected, returning true for good user/pass pairs, and false for anything else. However if I validate a user in the sub-domain, ValidateCredentials returns true for both good username

Properly disposing of, and removing references to UserControls, to avoid memory leak

房东的猫 提交于 2019-12-17 15:59:11
问题 I'm developing a Windows Forms application (.NET 4.0) in c# using Visual c# express 2010. I'm having trouble freeing up memory allocated to UserControls I'm no-longer using. The problem: I have a FlowLayoutPanel, where custom UserControls are displayed. The FlowLayoutPanel displays search results and so on, so the collection of UserControls that are displayed must be repeatedly updated. Before every new set of these UserControls are created and displayed, Dispose() is called on all the