Live Chat Programs

March 22, 2008

App.config Examples

Filed under: Live Chat software

Also see: Generics and .NET

Below are three examples of useful application configuration files.

  1. Forces the v1.0 CLR to be run. If the v1.0 CLR is not installed, the app will fail to run.

    <?xml version =”1.0″?>
     <configuration>
        <startup>
             <requiredRuntime version=”v1.0.3705″/>
             <supportedRuntime version=”v1.0.3705″/>
         </startup>
     </configuration>

  2. Redirects “assemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=25283151a234958d“ to version 2.0.0.0 of that assembly. This is only useful for strongly-named assemblies, since versions don’t matter for those that are simply-named.

    <?xml version =”1.0″?>
    <configuration>
    <runtime>

            <assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>

                    <dependentAssembly>
                            <assemblyIdentity name=”assemblyName” culture=”" publicKeyToken=”25283151a234958d”/>
                            <bindingRedirect oldVersion=”1.0.0.0″ newVersion=”2.0.0.0″/>

                    </dependentAssembly>
            </assemblyBinding>

    Also see: Snippet Compiler update

    Also see: AppDomains (”application domains”)

    Also see: Scott Guthrie presents at NDDNUG

    Also see: AppDomains (”application domains”)

    Also see: Hello world!

    Also see: xClaims and Microformats

    Also see: Snippet Compiler update

    Also see: Using IronPython for Dynamic Expressions.

    Also see: New Assembly, Old .NET (and Vice-Versa)

    Also see: Alexbarn Leaves Microsoft…ARGH!

    Also see: Scott Guthrie presents at NDDNUG

    Also see: From C# to Java: Part 5

    </runtime>
    </configuration>

  3. Redirects “assemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8968ee41e78ce97a“ to codebase “http://www.yourwebsite.com/filename.dll“. ‘Href’ can also be set to something like “file:///c:/localfile/filename.dll“. Note that redirecting to a codebase causes a System.Net.WebPermission or System.IO.FileIOPermissionAccess.Read + PathDiscovery demand when loading that assembly.

    <?xml version =”1.0″?>
    <configuration>
    <runtime>

            <assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>

                    <dependentAssembly>
                            <assemblyIdentity name=”assemblyName” culture=”" publicKeyToken=”8968ee41e78ce97a”/>
                            <codeBase version=”1.0.0.0″ href=”http://www.yourwebsite.com/filename.dll”/>

                    </dependentAssembly>
            </assemblyBinding>

    Multisoft Group: Custom Software Development and Consulting Service.

    </runtime>
    </configuration>


    http://blogs.msdn.com/suzcook/archive/2004/05/14/132022.aspx

    Comments »

    The URI to TrackBack this entry is: http://thelivechatsoftware.blogsome.com/2008/03/22/appconfig-examples-2/trackback/

    No comments yet.

    RSS feed for comments on this post.

    Leave a comment

    Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



    Anti-spam measure: please retype the above text into the box provided.

    Get free blog up and running in minutes with Blogsome
    Theme designed by Jay of onefinejay.com