Search This Blog

Showing posts with label .Net Framework. Show all posts
Showing posts with label .Net Framework. Show all posts

Sunday, March 30, 2014

Configure an Application to Support .NET Framework 4 or 4.5

Application Configuration to Support .Net Framework 4 or 4.5

All apps that host the common language runtime (CLR) need to start, or activate, the CLR in order to run managed code. Typically, a .NET Framework app runs on the version of the CLR that it was built on, but you can change this behavior for desktop apps by using an application configuration file (sometimes referred to as an app.config file). However, you cannot change the default activation behavior for Windows Store apps or Windows Phone apps by using an application configuration file. 

To configure your app to run on the .NET Framework 4 or 4.5
  1. Add or locate the configuration file for the .NET Framework project. The configuration file for an app is in the same directory and has the same name as the app, but has a .config extension. For example, for an app named MyExecutable.exe, the application configuration file is named MyExecutable.exe.config.
    To add a configuration file, on the Visual Studio menu bar, choose Project, Add New Item. Choose General from the left pane, and then choose Configuration File. Name the configuration file appName.exe.config. These menu choices are not available for Windows Store app or Windows phone app projects, because you cannot change the activation policy on those platforms.
  2. Add the  element as follows to the application configuration file:
      
        
      
    
  • where  specifies the CLR version that aligns with the .NET Framework version that your app supports. Use the following strings:
    • .NET Framework 1.0: "v1.0.3705"
    • .NET Framework 1.1: "v1.1.4322"
    • .NET Framework 2.0, 3.0, and 3.5: "v2.0.50727"
    • .NET Framework 4 and 4.5 (including point releases such as 4.5.1): "v4.0"
    You can add multiple  elements, listed in order of preference, to specify support for multiple versions of the .NET Framework.




  • Friday, March 21, 2014

    How to identify a computer that do not have .net framework

    To Identify a computer that do not have .Net Framework:

    1. In the configuration manager navigate to System Center Configuration Manager/Site Database/System Status/Status Message Query.

    2. Right Click on All Status Message and Click On Show Messages.

    3. In the All Status Messages dialog box enter the time period or date and time for which you want to check the status messages and then click OK.

    4. All Status Messages are displayed in Status Message Viewer , click on the Component column and locate the status messages with a component named Desired Configuration Management.

    5. In The Message ID column , look for 11802 to identify the computer that logged to this message.

    6. For more information to this message Right Click a status message and select Detail.

    7.View the information in Status Message Details dialog box and then clock OK to close this dialog box or clock previous or next to view the details of other messages.

    8. Click OK to close Status Message Details dialog box and close the Status Message Viewer.



    Sunday, March 9, 2014

    .Net Framework 4.5 features and improvements

    Core new features and enhancements include:
    • Automatic binding redirection for assemblies. Starting with Visual Studio 2013, when you compile an app that targets the .NET Framework 4.5.1, binding redirects may be added to the app configuration file if your app or its components reference multiple versions of the same assembly. You can also enable this feature for projects that target older versions of the .NET Framework.
    • Ability to collect diagnostics information to help developers improve the performance of server and cloud applications. For more information, see theWriteEventWithRelatedActivityId and WriteEventWithRelatedActivityIdCore methods in the EventSource class.
    • Ability to explicitly compact the large object heap (LOH) during garbage collection. For more information, see the GCSettings.LargeObjectHeapCompactionModeproperty.
    • Additional performance improvements such as ASP.NET app suspension, multi-core JIT improvements, and faster app startup after a .NET Framework update.
    Improvements when debugging your .NET Framework apps in Visual Studio 2013 include:
    • Return values in the Visual Studio debugger. When you debug a managed app in Visual Studio 2013, the Autos window displays return types and values for methods. This information is available for desktop, Windows Store, and Windows Phone apps. For more information, see Examine return values of method calls in the MSDN Library.
    • Edit and Continue for 64-bit apps. Visual Studio 2013 supports the Edit and Continue feature for 64-bit managed apps for desktop, Windows Store, and Windows Phone. The existing limitations remain in effect for both 32-bit and 64-bit apps (see the last section of the Supported Code Changes (C#) article).
    • Async-aware debugging. To make it easier to debug asynchronous apps in Visual Studio 2013, the call stack hides the infrastructure code provided by compilers to support asynchronous programming, and also chains in logical parent frames so you can follow logical program execution more clearly. A Tasks window replaces the Parallel Tasks window and displays tasks that relate to a particular breakpoint, and also displays any other tasks that are currently active or scheduled in the app. You can read about this feature in the "Async-aware debugging" section of the .NET Framework 4.5.1 announcement.
    • Better exception support for Windows Runtime components. In Windows 8.1, exceptions that arise from Windows Store apps preserve information about the error that caused the exception, even across language boundaries. You can read about this feature in the "Windows Store app development" section of the .NET Framework 4.5.1 announcement.

    Tools
    In the .NET Framework 4.5, Resource File Generator (Resgen.exe) enables you to create a .resw file for use in Windows Store apps from a .resources file embedded in a .NET Framework assembly. 
    Managed Profile Guided Optimization (Mpgo.exe) enables you to improve application startup time, memory utilization (working set size), and throughput by optimizing native image assemblies. The command-line tool generates profile data for native image application assemblies. 
    Parallel Computing
    The .NET Framework 4.5 provides several new features and improvements for parallel computing. These include improved performance, increased control, improved support for asynchronous programming, a new dataflow library, and improved support for parallel debugging and performance analysis.
    Web
    ASP.NET Core Services
    ASP.NET Web Forms
    ASP.NET MVC 4
    ASP.NET Web Pages 2
    ASP.NET MVC 4, Web API, and ASP.NET Web Pages (Razor) are now Open Source
    Editor Enhancements
    Data-Related Enhancements
    Web Application Project Deployment Enhancements
    Multiversion Support
    IIS Express

    Asynchronous File Operation
    In the .NET Framework 4.5, new asynchronous features were added to the C# and Visual Basic languages. These features add a task-based model for performing asynchronous operations. 

    Managed Extensibility Framework
    In the .NET Framework 4.5, the Managed Extensibility Framework (MEF) provides the following new features:
    • Support for generic types.
    • Convention-based programming model that enables you to create parts based on naming conventions rather than attributes.
    • Multiple scopes.
    • A subset of MEF that you can use when you create Windows Store apps. This subset is available as a downloadable package from the NuGet Gallery. To install the package, open your project in Visual Studio, choose Manage NuGet Packages from the Project menu, and search online for the Microsoft.Composition package.
    Core and new features improvement
    • Ability to reduce system restarts by detecting and closing .NET Framework 4 applications during deployment.
    • Support for arrays that are larger than 2 gigabytes (GB) on 64-bit platforms. This feature can be enabled in the application configuration file.
    • Better performance through background garbage collection for servers. When you use server garbage collection in the .NET Framework 4.5, background garbage collection is automatically enabled. 
    • Background just-in-time (JIT) compilation, which is optionally available on multi-core processors to improve application performance.
    • Ability to limit how long the regular expression engine will attempt to resolve a regular expression before it times out. 
    • Ability to define the default culture for an application domain. See the CultureInfo class.
    • Console support for Unicode (UTF-16) encoding. See the Console class.
    • Support for versioning of cultural string ordering and comparison data. See the SortVersion class.
    • Better performance when retrieving resources. 
    • Zip compression improvements to reduce the size of a compressed file. 
    • Ability to customize a reflection context to override default reflection behavior through the CustomReflectionContext class.
    • Support for the 2008 version of the Internationalized Domain Names in Applications (IDNA) standard when the System.Globalization.IdnMapping class is used on Windows 8.
    • Delegation of string comparison to the operating system, which implements Unicode 6.0, when the .NET Framework is used on Windows 8. When running on other platforms, the .NET Framework includes its own string comparison data, which implements Unicode 5.x. 
    • Ability to compute the hash codes for strings on a per application domain basis. 
    • Type reflection support split between Type and TypeInfo classes. 
    Networking
    The .NET Framework 4.5 provides a new programming interface for HTTP applications. ex.System.Net.Http and System.Net.Http.Headers
    Support is also included for a new programming interface for accepting and interacting with a WebSocket connection by using the existing HttpListener and related classes. For more information, ex. System.Net.WebSockets namespace and the HttpListener class.
    In addition, the .NET Framework 4.5 includes the following networking improvements:
    • RFC-compliant URI support. For more information, see Uri and related classes.
    • Support for Internationalized Domain Name (IDN) parsing. For more information, see Uri and related classes.
    • Support for Email Address Internationalization (EAI). 
    • Improved IPv6 support. For more information, see the System.Net.NetworkInformation namespace.
    • Dual-mode socket support. For more information, see the Socket and TcpListener classes.
    Windows Presentation Foundation(WPF)
    n the .NET Framework 4.5, Windows Presentation Foundation (WPF) contains changes and improvements in the following areas:
    • The new Ribbon control, which enables you to implement a ribbon user interface that hosts a Quick Access Toolbar, Application Menu, and tabs.
    • The new INotifyDataErrorInfo interface, which supports synchronous and asynchronous data validation.
    • New features for the VirtualizingPanel and Dispatcher classes.
    • Improved performance when displaying large sets of grouped data, and by accessing collections on non-UI threads.
    • Data binding to static properties, data binding to custom types that implement the ICustomTypeProvider interface, and retrieval of data binding information from a binding expression.
    • Repositioning of data as the values change (live shaping).
    • Ability to check whether the data context for an item container is disconnected.
    • Ability to set the amount of time that should elapse between property changes and data source updates.
    • Improved support for implementing weak event patterns. Also, events can now accept markup extensions.
    Windows Communication Foundation
    In the .NET Framework 4.5, the following features have been added to make it simpler to write and maintain Windows Communication Foundation (WCF) applications:
    • Simplification of generated configuration files.
    • Support for contract-first development.
    • Ability to configure ASP.NET compatibility mode more easily.
    • Changes in default transport property values to reduce the likelihood that you will have to set them.
    • Updates to the XmlDictionaryReaderQuotas class to reduce the likelihood that you will have to manually configure quotas for XML dictionary readers.
    • Validation of WCF configuration files by Visual Studio as part of the build process, so you can detect configuration errors before you run your application.
    • New asynchronous streaming support.
    • New HTTPS protocol mapping to make it easier to expose an endpoint over HTTPS with Internet Information Services (IIS).
    • Ability to generate metadata in a single WSDL document by appending ?singleWSDL to the service URL.
    • Websockets support to enable true bidirectional communication over ports 80 and 443 with performance characteristics similar to the TCP transport.
    • Support for configuring services in code.
    • XML Editor tooltips.
    • ChannelFactory caching support.
    • Binary encoder compression support.
    • Support for a UDP transport that enables developers to write services that use "fire and forget" messaging. A client sends a message to a service and expects no response from the service.
    • Ability to support multiple authentication modes on a single WCF endpoint when using the HTTP transport and transport security.
    • Support for WCF services that use internationalized domain names (IDNs).
    Windows Workflow Foundation(WF)
    In the .NET Framework 4.5, several new features were added to Windows Workflow Foundation (WF), including:
    • State machine workflows, which were first introduced as part of the .NET Framework 4.0.1 (.NET Framework 4 Platform Update 1). This update included several new classes and activities that enabled developers to create state machine workflows. These classes and activities were updated for the .NET Framework 4.5 to include:
      • The ability to set breakpoints on states.
      • The ability to copy and paste transitions in the workflow designer.
      • Designer support for shared trigger transition creation.
      • Activities for creating state machine workflows, including: StateMachine, State, and Transition.
    • Enhanced Workflow Designer features such as the following:
      • Enhanced workflow search capabilities in Visual Studio, including Quick Find and Find in Files.
      • Ability to automatically create a Sequence activity when a second child activity is added to a container activity, and to include both activities in the Sequence activity.
      • Panning support, which enables the visible portion of a workflow to be changed without using the scroll bars.
      • A new Document Outline view that shows the components of a workflow in a tree-style outline view and lets you select a component in the Document Outlineview.
      • Ability to add annotations to activities.
      • Ability to define and consume activity delegates by using the workflow designer.
      • Auto-connect and auto-insert for activities and transitions in state machine and flowchart workflows.
    • Storage of the view state information for a workflow in a single element in the XAML file, so you can easily locate and edit the view state information.
    • A NoPersistScope container activity to prevent child activities from persisting.
    • Support for C# expressions:
      • Workflow projects that use Visual Basic will use Visual Basic expressions, and C# workflow projects will use C# expressions.
      • C# workflow projects that were created in Visual Studio 2010 and that have Visual Basic expressions are compatible with C# workflow projects that use C# expressions.
    • Versioning enhancements:
      • The new WorkflowIdentity class, which provides a mapping between a persisted workflow instance and its workflow definition.
      • Side-by-side execution of multiple workflow versions in the same host, including WorkflowServiceHost.
      • In Dynamic Update, the ability to modify the definition of a persisted workflow instance.
    • Contract-first workflow service development, which provides support for automatically generating activities to match an existing service contract.
    .Net for Windows Store APPS
    Windows Store apps are designed for specific form factors and leverage the power of the Windows operating system. A subset of the .NET Framework 4.5 or 4.5.1 is available for building Windows Store apps for Windows by using C# or Visual Basic. This subset is called .NET for Windows Store apps and is discussed in an overview in the Windows Dev Center.

    Portable Class Library
    The Portable Class Library project in Visual Studio 2012 (and later versions) enables you to write and build managed assemblies that work on multiple .NET Framework platforms. Using a Portable Class Library project, you choose the platforms (such as Windows Phone and .NET for Windows Store apps) to target. The available types and members in your project are automatically restricted to the common types and members across these platforms. For more information, 


    Friday, April 2, 2010

    Your Simple dotnet Dictionary(One Line Definition)

    .NET Architecture
    The programming model for the .NET platform.A managed execution environment,simplified development ,deployement.supports a lot of programming languages.also called M/S next generation plateform

    The .NET Framework has two key parts:
    1.The .NET Framework class library is a comprehensive, object-oriented collection of reusable types that you can use to develop applications. The .NET Framework class library includes ADO.NET, ASP.NET and Windows Forms.
    2.The common language runtime (CLR) is the core runtime engine for executing applications in the .NET Framework. You can think of the CLR as a safe area - a "sandbox" - inside of which your .NET code runs. Code that runs in the CLR is called managed code.
     
    ADO.NET
    The data access component for the .NET Framework.

    ADO.NET uses the  of XML to provide disconnected access to data. ADO.NET is made of a set of classes that are used for connecting to a database, providing access to relational data, XML, application data and retrieving results.
    ADO.NET is made of a set of classes that are used for connecting to a database, providing access to relational data, XML, application data, and retrieving results.

    ASP.NET

    The component of the Microsoft .NET Framework used for building, deploying, and running Web applications and distributed applications.

    Assembly

    A ompiled representation of one or more classes.
    Each assembly is self-contained, that is, the assembly includes the metadata about the assembly as a whole.

    Assembly Cache

    A code cache used for side-by-side storage of assemblies.

    Code Access Security (CAS)

    The component of the Microsoft .NET Framework used for building, deploying and running Web applications and distributed applications.

    Common Language Runtime (CLR)

    The core runtime engine in the Microsoft .NET Framework. The CLR supplies services such as cross-language integration, code access security, object lifetime management and debugging support. Applications that run in the CLR are sometimes said to be running "in the sandbox."

    Download Cache

    The subdirectory in assembly cache that stores code downloaded from Internet or intranet sites, isolated to the application that caused the download. This isolation prevents code downloaded on behalf of one application from affecting other applications.

    DTC (Distributed Transaction Coordinator)

    In Microsoft Windows NT, Windows 2000, Windows XP and the Windows Server 2003 family, the DTC is a system service that is part of COM+ services.
    COM+ components that use DTC can enlist .NET connections in distributed transactions. This makes it possible to scale transactions from one to many computers without adding special code.

    Expose

    To host and make available a Web service so that it can be used by other applications or services.

    Garbage Collection

    A process in the CLR that automatically frees allocated objects when there are no longer any outstanding references to them. The developer does not need to explicitly free memory assigned to an object.

    Global Assembly Cache (GAC)

    The part of the assembly cache that stores assemblies specifically installed to be shared by many applications on the computer. Applications deployed in the global assembly cache must have a strong name to handle name and version conflicts.

    Isolation Level

    An isolation level represents a particular locking strategy employed in the database system to improve data consistency. The higher the isolation level, the more complex the locking strategy behind it.
    The isolation level provided by the database determines whether a transaction will encounter defined behaviors in data consistency.
    The American National Standards Institute (ANSI) defines four isolation levels:
    • Read uncommitted (0)
    • Read committed (1)
    • Repeatable read (2)
    • Serializable (3)
    JIT Compiler

    The "just-in-time" compilation that converts Microsoft intermediate language (MSIL) into machine code at the point when the code is required at run time.

    Unmanaged Code

    Code that is executed directly by the operating system, outside of the CLR.
    Unmanaged code includes all code written before the .NET Framework was introduced. This includes code written to use COM, native Win32 and Visual Basic 6. Because it does not run inside the .NET environment, unmanaged code cannot make use of any .NET managed facilities.

    UnicodeA standard that software can use to support multi-lingual character sets.
    The .NET Framework uses UTF-16 Unicode encoding to represent characters. .NET applications use encoding and decoding to map character representations between Unicode and non-Unicode formats. The .NET Framework also provides UTF-8, ASCII, and ANSI/ISO encodings.


    Locking Level

    Locking is a database operation that restricts a user from accessing a table or record. Locking is used in situations when more than one user might try to use the same table at the same time. By locking the table or record, only one user at a time can affect the data.

    Managed Code

     Code executed and managed by the .NET Framework, specifically by the CLR. Managed code must supply the information necessary for the CLR to provide services such as memory management and code access security.

    Microsoft Intermediate Language (MSIL)

    A CPU-independent set of instructions that can be converted to native code. MSIL includes instructions for loading, storing, initializing and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling and other operations.

    Namespace

    A logical naming scheme for grouping related types.
    In the .NET Framework, a namespace is a logical design-time naming convenience, whereas an assembly establishes the name scope for types at run time.

    No-touch Deployment

    A feature of the .NET Framework, similar to browser-based application deployment, that lets clients download the assemblies they need from a remote web server.

    The first time an assembly is referenced, it is downloaded to the download cache on the client and executed. After that, when the client accesses the application, the application checks the server to find out whether any assemblies have been updated. Any new assemblies are downloaded to the download cache on the client, refreshing the application without any interaction with the end user.

    Side-by-side Execution

    The ability to install and use multiple versions of the same assembly in isolation at the same time. Allowing different versions of assemblies to coexist and to execute simultaneously on the same computer enables robust versioning.
    Web Forms

    An ASP.NET feature that can be used to create the user interface for Web applications.
    The Web Forms page works as a container for the static text and controls you want to display. The programming logic for the Web Forms page resides in a separate file from the user interface file. This file is referred to as the "code-behind" file and has an ".aspx.vb" or ".aspx.cs" extension, depending on whether the code-behind file was written in Visual Basic or Visual C#.

    Web Services

    A set of modular applications or "services" that can be accessed within a network (e.g., the Internet, an intranet, or extranet) through a standard interface, typically XML.

    Universal Description, Discover, and Integration (UDDI)

    A platform-independent framework that provides a way to locate and register Web services on the Internet.
    The UDDI specification calls for three elements, similar to a telephone book:
    1.White pages; which provide business contact information
    2.Yellow pages; which organize Web services into categories (for example, credit card authorization services)
    3.Green pages; which provide detailed technical information about individual services.
    The UDDI specification also contains an operational registry.

    Simple Object Access Protocol (SOAP)

    A simple, XML-based protocol for exchanging structured data and type information over the Internet. SOAP is currently the de facto standard for XML messaging.
    SOAP consists of:
    •An envelope that defines a framework for describing message structure.
    •A set of encoding rules for expressing instances of application-defined data types.
    •A convention for using SOAP with HTTP.