Search Results

Search found 97 results on 4 pages for 'net3 5'.

Page 1/4 | 1 2 3 4  | Next Page >

  • Callback Contract in WCF

    Callback contracts are a very powerful concept that is easily implemented in WCF. Using this, it is very easy to achieve event-like behavior between a service and client (duplex operations).

    Read the article

  • Complex sorting of XML subnodes in .Net3.5 onwards

    - by MicMit
    XML structure expressed in Xpath kind of Records/Record/Actions/Action/ActionDate the other node on the same level Records/Record/Actions/Action/CTCDate Is there easy or not easy way to sort it on "order by ActionDate,CTCDate" ( in SQL notation ), but per Actions for each selected Record when we iterate somehow ( not per XML file ). File around 50M

    Read the article

  • install asp.net3

    - by Praveena
    When I install ASP.NET 3 I get the following error: "use the role management tool". I enabled .NET 3.0 through the role management tool, and am still getting the error so am not able to proceed with the install. Can anyone help?

    Read the article

  • LINQ: Single vs. First

    - by Paulo Morgado
    I’ve witnessed and been involved in several discussions around the correctness or usefulness of the Single method in the LINQ API. The most common argument is that you are querying for the first element on the result set and an exception will be thrown if there’s more than one element. The First method should be used instead, because it doesn’t throw if the result set has more than one item. Although the documentation for Single states that it returns a single, specific element of a sequence of values, it actually returns THE single, specific element of a sequence of ONE value. One you use the Single method in your code you are asserting that your query will result in a scalar result instead of a result set of arbitrary length. On the other hand, the documentation for First states that it returns the first element of a sequence of arbitrary length. Imagine you want to catch a taxi. You go the the taxi line and catch the FIRST one, no matter how many are there. On the other hand, if you go the the parking lot to get your car, you want the SINGLE one specific car that’s yours. If your “query” “returns” more than one car, it’s an exception. Either because it “returned” not only your car or you happen to have more than one car in that parking lot. In either case, you can only drive one car at once and you’ll need to refine your “query”.

    Read the article

  • LINQ: Enhancing Distinct With The PredicateEqualityComparer

    - by Paulo Morgado
    Today I was writing a LINQ query and I needed to select distinct values based on a comparison criteria. Fortunately, LINQ’s Distinct method allows an equality comparer to be supplied, but, unfortunately, sometimes, this means having to write custom equality comparer. Because I was going to need more than one equality comparer for this set of tools I was building, I decided to build a generic equality comparer that would just take a custom predicate. Something like this: public class PredicateEqualityComparer<T> : EqualityComparer<T> { private Func<T, T, bool> predicate; public PredicateEqualityComparer(Func<T, T, bool> predicate) : base() { this.predicate = predicate; } public override bool Equals(T x, T y) { if (x != null) { return ((y != null) && this.predicate(x, y)); } if (y != null) { return false; } return true; } public override int GetHashCode(T obj) { if (obj == null) { return 0; } return obj.GetHashCode(); } } Now I can write code like this: .Distinct(new PredicateEqualityComparer<Item>((x, y) => x.Field == y.Field)) But I felt that I’d lost all conciseness and expressiveness of LINQ and it doesn’t support anonymous types. So I came up with another Distinct extension method: public static IEnumerable<TSource> Distinct<TSource>(this IEnumerable<TSource> source, Func<TSource, TSource, bool> predicate) { return source.Distinct(new PredicateEqualityComparer<TSource>(predicate)); } And the query is now written like this: .Distinct((x, y) => x.Field == y.Field) Looks a lot better, doesn’t it?

    Read the article

  • LINQ: Single vs. SingleOrDefault

    - by Paulo Morgado
    Like all other LINQ API methods that extract a scalar value from a sequence, Single has a companion SingleOrDefault. The documentation of SingleOrDefault states that it returns a single, specific element of a sequence of values, or a default value if no such element is found, although, in my opinion, it should state that it returns a single, specific element of a sequence of values, or a default value if no such element is found. Nevertheless, what this method does is return the default value of the source type if the sequence is empty or, like Single, throws an exception if the sequence has more than one element. I received several comments to my last post saying that SingleOrDefault could be used to avoid an exception. Well, it only “solves” half of the “problem”. If the sequence has more than one element, an exception will be thrown anyway. In the end, it all comes down to semantics and intent. If it is expected that the sequence may have none or one element, than SingleOrDefault should be used. If it’s not expect that the sequence is empty and the sequence is empty, than it’s an exceptional situation and an exception should be thrown right there. And, in that case, why not use Single instead? In my opinion, when a failure occurs, it’s best to fail fast and early than slow and late. Other methods in the LINQ API that use the same companion pattern are: ElementAt/ElementAtOrDefault, First/FirstOrDefault and Last/LastOrDefault.

    Read the article

  • LINQ: Enhancing Distinct With The SelectorEqualityComparer

    - by Paulo Morgado
    On my last post, I introduced the PredicateEqualityComparer and a Distinct extension method that receives a predicate to internally create a PredicateEqualityComparer to filter elements. Using the predicate, greatly improves readability, conciseness and expressiveness of the queries, but it can be even better. Most of the times, we don’t want to provide a comparison method but just to extract the comaprison key for the elements. So, I developed a SelectorEqualityComparer that takes a method that extracts the key value for each element. Something like this: public class SelectorEqualityComparer<TSource, Tkey> : EqualityComparer<TSource> where Tkey : IEquatable<Tkey> { private Func<TSource, Tkey> selector; public SelectorEqualityComparer(Func<TSource, Tkey> selector) : base() { this.selector = selector; } public override bool Equals(TSource x, TSource y) { Tkey xKey = this.GetKey(x); Tkey yKey = this.GetKey(y); if (xKey != null) { return ((yKey != null) && xKey.Equals(yKey)); } return (yKey == null); } public override int GetHashCode(TSource obj) { Tkey key = this.GetKey(obj); return (key == null) ? 0 : key.GetHashCode(); } public override bool Equals(object obj) { SelectorEqualityComparer<TSource, Tkey> comparer = obj as SelectorEqualityComparer<TSource, Tkey>; return (comparer != null); } public override int GetHashCode() { return base.GetType().Name.GetHashCode(); } private Tkey GetKey(TSource obj) { return (obj == null) ? (Tkey)(object)null : this.selector(obj); } } Now I can write code like this: .Distinct(new SelectorEqualityComparer<Source, Key>(x => x.Field)) And, for improved readability, conciseness and expressiveness and support for anonymous types the corresponding Distinct extension method: public static IEnumerable<TSource> Distinct<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> selector) where TKey : IEquatable<TKey> { return source.Distinct(new SelectorEqualityComparer<TSource, TKey>(selector)); } And the query is now written like this: .Distinct(x => x.Field) For most usages, it’s simpler than using a predicate.

    Read the article

  • .net Framework won't install on Server 2003 SP2 x64

    - by Yvan JANSSENS
    Hi, When I install the .net Framework 3.5 SP1 on my rental VPS, I get the message that setup has failed. It's a Server 2003 VPS w/ SP2 installed (64-bit). The .net Framework v 2.0 installed correctly. How do I fix this? This is the installation log: [03/10/10,07:44:46] Microsoft .NET Framework 2.0a x64: [2] Failed to fetch setup file in CBaseComponent::PreInstall() [03/10/10,07:44:47] setup.exe: [2] ISetupComponent::Pre/Post/Install() failed in ISetupManager::InternalInstallManager() with HRESULT -2147467260. [03/10/10,07:44:48] setup.exe: [2] CSetupManager::RunInstallPhase() - Call to Pre/Install/Post for InstallComponents failed [03/10/10,07:44:49] setup.exe: [2] CSetupManager::RunInstallPhaseAndCheckResults() - RunInstallPhase() returned a NULL piActionResults [03/10/10,07:44:49] setup.exe: [2] CSetupManager::RunInstallFromList() - RunInstallPhaseAndCheckResults failed [2] [03/10/10,07:44:51] setup.exe: [2] ISetupManager::RunInstallLists(IP_PREINSTALL failed in ISetupManager::RunInstallFromThread() [03/10/10,07:44:52] setup.exe: [2] ISetupManager::RunInstallFromThread() failed in ISetupManager::RunInstall() [03/10/10,07:44:53] setup.exe: [2] CSetupManager::Run() - Call to RunInstall() failed [03/10/10,07:44:59] WapUI: [2] DepCheck indicates Microsoft .NET Framework 2.0a x64 is not installed. [03/10/10,07:45:00] WapUI: [2] DepCheck indicates XPSEPSC x64 Installer was not attempted to be installed. [03/10/10,07:45:02] WapUI: [2] DepCheck indicates Microsoft .NET Framework 3.0 SP2 x64 was not attempted to be installed. [03/10/10,07:45:02] WapUI: [2] DepCheck indicates Microsoft .NET Framework 3.5 (x64) 'package' was not attempted to be installed. [03/11/10,14:19:23] Microsoft .NET Framework 3.0 SP2 x64: [2] Error: Installation failed for component Microsoft .NET Framework 3.0 SP2 x64. MSI returned error code 1604 [03/11/10,14:26:14] WapUI: [2] DepCheck indicates Microsoft .NET Framework 3.0 SP2 x64 is not installed. Thanks!! Yvan

    Read the article

  • .NET 3.5 SP1 Installer hang at around 80%

    - by kuoson
    Hi, I was trying to install .NET 3.5 SP1 to one of our production machines with Windows 2003 SP2. However, the installer just hang at around 80% with message "Setup is loading installation components, This may take a minute or two". In fact it's been like that for 30mins already and using 0% CPU. I disabled the anti-virus software and then applied the windows installer 4.5 update but no luck, the installer still hangs. Anyone had this problem before?

    Read the article

  • Windows 7 .NET 3.5.1 - 2.0 Slightly Corrupted, How to Repair?

    - by Quinxy von Besiex
    My Windows 7 included .NET installation (3.5 to 2.0) appears very slightly and particularly corrupted and I am trying to fix it without reinstalling Windows or trying to revert to backups. Everything was working and then my hard drive started corrupting a few files and checkdisk found bad clusters so I imaged the drive to a new one. As soon as I booted on the new drive everything worked except programs which call the System.Net.NetworkInformation methods within .NET 3.5 to 2.0 (like Ping() and IsNetworkAvailable()), which immediately crash the app in which the calls are (those calls in .NET 4.0 works fine). Those methods are found inside System.dll, and I assume call native methods which I believe are inside winnsi.dll or iphlpapi.dll or something else (I've not found this yet); I assume it calls native methods because the exception which causes the crash is Fatal Execution Engine Error which people mention is usually related to calling native methods and marshaling data between them. A huge clue about the culprit is likely found in the fact that when I launch the exact same crashing application through a code profiler (which executes the exe and captures stats on which methods took the longest) the app works fine, no crash at all! How could running it within the profiler work and running it outside not work? That seems the key to the mystery. I've used procmon to catch all the registry, filesystem, and network events from the crashing execution and the profiler-run successful execution and compared the two outputs but didn't learn much (I see the moment at which the non-profiled app crashes, but up until then they behave the same, loaded the same modules, ). The only big difference seems to be that at the moment before the app crash the profiler-executed code creates 4-6 new threads and the directly executed code only creates 1-2. I have diffed the files/directories which seemed most relevant (the .NET stuff under Windows and Program Files) pre- and post- disk trouble and seen no changes where I didn't expect any (no obvious file corruption). I have diffed the software and system registry hives pre- and post- disk trouble and seen no changes which seemed relevant. I have created a new user account and cleaned up any environment variables in case environment was related. No change. I did "sfc /scannow" and it found no integrity problems. I tried "ngen update" to regenerate pre-compiled code in case I missed something that might be damaged and nothing changed. I assume I need to repair my .NET installation but because Windows 7 included .NET 3.5 - 2.0 you can't just re-run a .NET installer to redo it. I do not have access to the Windows disks to try to re-install Windows over itself (the computer has a recovery partition but it is unusable); also the drive uses a whole-disk encryption solution and re-installing would be difficult. I absolutely do not want to start from scratch here and install a fresh Windows, reinstall dozens of software packages, try and remember dozens of development-related customizations/etc. Given all that... does anyone have any helpful advice? I need .NET 3.5 - 2.0 working as I am a developer and need to build and test against it. Thanks! Quinxy

    Read the article

  • Failure to install NetFX3 on Windows Server 2012: Error 3017 -- Am I missing something here?

    - by Nick
    I am really struggling to get this installed. I have tried the suggestions here in an attempt to rectify any possible corruption. I mounted the disk image to 'G' to do an offline install. I also attempted an online install with similar results. Output as follows: Microsoft Windows [Version 6.2.9200] (c) 2012 Microsoft Corporation. All rights reserved. C:\Users\Administrator>dism /online /enable-feature /featurename:NetFX3 /All /So urce:G:\sources\sxs /LimitAccess Deployment Image Servicing and Management tool Version: 6.2.9200.16384 Image Version: 6.2.9200.16384 Enabling feature(s) [==========================100.0%==========================] Error: 3017 The requested operation failed. A system reboot is required to roll back changes made. The DISM log file can be found at C:\Windows\Logs\DISM\dism.log Log as follows (Errors/Warnings Only): 2013-04-08 23:40:17, Error DISM DISM Package Manager: PID=3756 TID=3768 Failed finalizing changes. - CDISMPackageManager::Internal_Finalize(hr:0x80070bc9) 2013-04-08 23:40:17, Error DISM DISM Package Manager: PID=3756 TID=3768 Failed processing package changes with session options - CDISMPackageManager::ProcessChangesWithOptions(hr:0x80070bc9) 2013-04-08 23:40:17, Error DISM DISM Package Manager: PID=3756 TID=3768 Failed ProcessChanges. - CPackageManagerCLIHandler::Private_ProcessFeatureChange(hr:0x80070bc9) 2013-04-08 23:40:17, Error DISM DISM Package Manager: PID=3756 TID=3768 Failed while processing command enable-feature. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x80070bc9) 2013-04-08 23:40:17, Error DISM DISM.EXE: DISM Package Manager processed the command line but failed. HRESULT=80070BC9 2013-04-08 23:38:10, Warning DISM DISM Provider Store: PID=3160 TID=3172 Failed to Load the provider: C:\Windows\TEMP\505F54F1-4977-4233-835C-8B6DA83BCAEB\PEProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e) 2013-04-08 23:39:23, Warning DISM DISM Provider Store: PID=3756 TID=3768 Failed to Load the provider: C:\Users\ADMINI~1\AppData\Local\Temp\2\F1B7A223-F380-4F42-84BF-396D374EE80B\PEProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e) 2013-04-08 23:39:23, Warning DISM DISM Provider Store: PID=3756 TID=3768 Failed to Load the provider: C:\Users\ADMINI~1\AppData\Local\Temp\2\F1B7A223-F380-4F42-84BF-396D374EE80B\IBSProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e) 2013-04-08 23:39:23, Warning DISM DISM Provider Store: PID=3756 TID=3768 Failed to get the IDismObject Interface - CDISMProviderStore::Internal_LoadProvider(hr:0x80004002) 2013-04-08 23:39:23, Warning DISM DISM Provider Store: PID=3756 TID=3768 Failed to Load the provider: C:\Users\ADMINI~1\AppData\Local\Temp\2\F1B7A223-F380-4F42-84BF-396D374EE80B\Wow64provider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x80004002) 2013-04-08 23:39:23, Warning DISM DISM Provider Store: PID=3756 TID=3768 Failed to Load the provider: C:\Users\ADMINI~1\AppData\Local\Temp\2\F1B7A223-F380-4F42-84BF-396D374EE80B\EmbeddedProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e) None of my error codes align with any of those on this MS support page. I would really appreciate your assistance. I am really struggling with a solution. Am I missing something obvious here? EDIT: I have verified the checksum of my ISO image: File Name: en_windows_server_2012_x64_dvd_915478.iso SHA1: D09E752B1EE480BC7E93DFA7D5C3A9B8AAC477BA

    Read the article

  • Error installing a .NET Windows service with InstallUtil

    - by norlando
    I keep getting the error below when every I try to use the InstallUtil to install my .NET service. I put "installutil myservice.exe" into command prompt and then get the error. Any idea of what the problem is? Do I need to add another parameter? An exception occurred during the Install phase. System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.

    Read the article

  • HTTP 401 Challenge and HTTP 302 Login/Redirect won't work together in IIS7

    - by RandomBen
    I am developing a website using .NET 3.5 that allow users to visit the site and create logins using the standard Microsoft login controls. However, users do not need to login to do general things like view products. Now I need to setup the site so some of our Traveling Sales people are able to access it but not allow anyone else to access it. The easiest way I know how to do this is to turn on Windows Authentication for the Site in IIS7. When I do that I get all sorts of errors due to also having Forms Authentication turned on. If I turn Forms Auth then I get a different kind of error. Does anyone know how to make Forms Auth and Windows Auth play nice on a single site in IIS7 or some other way to create a required login without having me kill Forms Auth?

    Read the article

  • Offline installer for .net 3.5 sp1 not working

    - by Tim Tom
    I download a big file of .Net 3.5 SP1 from http://download.microsoft.com/download/2/0/e/20e90413-712f-438c-988e-fdaa79a8ac3d/dotnetfx35.exe Now when I try to install it on Windows Server 2012, I get the following screenshot: What the?? When will the microsoft learn? Now this is a loop. When I try to install from Server Manager, I get installation cannot be done. It needs installation disk. Does that mean I can't install at all without the installation disk in presence?

    Read the article

1 2 3 4  | Next Page >