App.config Examples

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

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>

    </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>

    </runtime> </configuration>

    •  
Group az webapp : Manage web apps. Subgroups: auth : Manage webapp authentication and authorization. To use v2 auth commands, run "az extension add --name authV2" to add the authV2 CLI extension. config : Configure a web app. connection : Commands to manage webapp connections. cors : Manage Cross-Origin Resource Sharing (CORS). deleted [Preview] : Manage deleted web apps. deployment : Manage web app deployments. hybrid-connection : Methods that list, add and remove hybrid-connections from webapps. identity : Manage web app's managed identity. log : Manage web app logs. sitecontainers : Manage linux web apps sitecontainers. traffic-routing : Manage traffic routing for web apps. vnet-integration : Methods that list, add, and remove virtual network integrations from a webapp. webjob : Allows management operations for webjobs on a web app. Commands: browse : Open a web app in a browser. This is not supported in Azure Cloud Shell. create : Create a web app. create-remote-connection : Creates a remote connection using a tcp tunnel to your web app. delete : Delete a web app. deploy : Deploys a provided artifact to Azure Web Apps. list : List web apps. list-instances : List all scaled out instances of a web app or web app slot. list-runtimes : List available built-in stacks which can be used for web apps. restart : Restart a web app. show : Get the details of a web app. ssh [Preview] : SSH command establishes a ssh session to the web container and developer would get a shell terminal remotely. start : Start a web app. stop : Stop a web app. up : Create a webapp and deploy code from a local workspace to the app. The command is required to run from the folder where the code is present. Current support includes Node, Python, .NET Core and ASP.NET. Node, Python apps are created as Linux apps. .Net Core, ASP.NET, and static HTML apps are created as Windows apps. Append the html flag to deploy as a static HTML app. Each time the command is successfully run, default argument values for resource group, sku, location, plan, and name are saved for the current directory. These defaults are then used for any arguments not provided on subsequent runs of the command in the same directory. Use 'az configure' to manage defaults. Run this command with the --debug parameter to see the API calls and parameters values being used. update : Update an existing web app. To search AI knowledge base for examples, use: az find "az webapp" You have 2 update(s) available. They will be updated with the next build of Cloud Shell.
05-13
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值