当前位置:编程学习 > C#/ASP.NET >>

MVC3 Webconfig 这个是什么意思?

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
      <add name="HostAdapter" type="Microsoft.VisualStudio.TestTools.HostAdapter.Web.HttpModule, Microsoft.VisualStudio.QualityTools.HostAdapters.ASPNETAdapter, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </modules>
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.HostAdapters.ASPNETAdapter" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <codeBase version="10.0.0.0" href="file:///C:/Program%20Files/Microsoft%20Visual%20Studio%2010.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.QualityTools.HostAdapters.ASPNETAdapter.DLL" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <codeBase version="10.0.0.0" href="file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.QualityTools.Common/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.QualityTools.Common.dll" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.ExecutionCommon" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <codeBase version="10.0.0.0" href="file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.QualityTools.ExecutionCommon/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.QualityTools.ExecutionCommon.dll" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.VisualStudio.QualityTools.Resource" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <codeBase version="10.0.0.0" href="file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.QualityTools.Resource/10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.QualityTools.Resource.dll" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
如题 这个都是配置说明的 希望大师出来介绍下 --------------------编程问答--------------------    都是加载程序集的配置。这样做的好处可以方便切换使用哪个程序集。
常见的操作如一个显示层,在某地方使用的SQL server数据库,在另外一个地方却使用的oracle数据库。
这样在同一借口下的两个程序集就可以不动任何东西的情况下相互切换(切换你还是要写的)

还有就是这也可能只是加载不同的程序集 --------------------编程问答-------------------- MVC3需要他们~

我们在写程序的时候,比如简单的ToString(),或DateTime.Now 但这些方法是由别人提供的~
所以我们需要别人提供的程序文件  一般是dll
只是这些dll创建项目的时候就包含在项目引用中了

我们在view中使用@html.ActionLink()这些方法也是由别人提供的~
所以我们需要那些dll(System.Web.Mvc.dll)

<runtime> 运行的时候
<dependentAssembly> 依赖程序集......dll就是程序集

为什么要写到配置文件中去~看1楼

补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,