已有webSite工程中增加Atlas支持方法

首先添加对Microsoft.Web.Atlas的引用(C:\Program Files\Microsoft ASP.NET\Atlas\v2.0.50727\Atlas),然后将以下内容加入Web.config文件中的<configuration>标签中即可。
None.gif      < configSections >
None.gif        
< sectionGroup  name ="microsoft.web"  type ="Microsoft.Web.Configuration.MicrosoftWebSectionGroup" >
None.gif            
< section  name ="converters"  type ="Microsoft.Web.Configuration.ConvertersSection"  requirePermission ="false" />
None.gif            
< section  name ="webServices"  type ="Microsoft.Web.Configuration.WebServicesSection"  requirePermission ="false" />
None.gif            
< section  name ="authenticationService"  type ="Microsoft.Web.Configuration.AuthenticationServiceSection"  requirePermission ="false" />
None.gif            
< section  name ="profileService"  type ="Microsoft.Web.Configuration.ProfileServiceSection"  requirePermission ="false" />
None.gif        
</ sectionGroup >
None.gif    
</ configSections >
None.gif    
<!--  
None.gif      The microsoft.web section defines items required for the Atlas framework.
None.gif  
-->
None.gif    
< microsoft .web >
None.gif        
< converters >
None.gif            
< add  type ="Microsoft.Web.Script.Serialization.Converters.DataSetConverter" />
None.gif            
< add  type ="Microsoft.Web.Script.Serialization.Converters.DataRowConverter" />
None.gif            
< add  type ="Microsoft.Web.Script.Serialization.Converters.DataTableConverter" />
None.gif        
</ converters >
None.gif        
< webServices  enableBrowserAccess ="true" />
None.gif        
<!--
None.gif      Uncomment this line to enable the authentication service.
None.gif    <authenticationService enabled="true" />
None.gif    
-->
None.gif        
<!--  Uncomment these lines to enable the profile service. To allow profile properties to be retrieved 
None.gif         and modified in Atlas applications, you need to add each property name to the setProperties and 
None.gif         getProperties attributes.  If you intend for all properties to be available, you can use "*"
None.gif         as a shorthand rather than enumerating each property  
-->
None.gif        
<!--   
None.gif    <profileService enabled="true" 
None.gif                    setProperties="propertyname1;propertyname2" 
None.gif                    getProperties="propertyname1;propertyname2" />
None.gif    
-->
None.gif    
</ microsoft.web >
None.gif    
< appSettings />
None.gif    
< connectionStrings />
None.gif    
< system .web >
None.gif        
< pages >
None.gif            
< controls >
None.gif                
< add  namespace ="Microsoft.Web.UI"  assembly ="Microsoft.Web.Atlas"  tagPrefix ="atlas" />
None.gif                
< add  namespace ="Microsoft.Web.UI.Controls"  assembly ="Microsoft.Web.Atlas"  tagPrefix ="atlas" />
None.gif            
</ controls >
None.gif        
</ pages >
None.gif        
<!--  
None.gif            Set compilation debug="true" to insert debugging 
None.gif            symbols into the compiled page. Because this 
None.gif            affects performance, set this value to true only 
None.gif            during development.
None.gif        
-->
None.gif        
< compilation  debug ="true" >
None.gif            
< assemblies >
None.gif                
< add  assembly ="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
None.gif                
< add  assembly ="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /></ assemblies ></ compilation >
None.gif        
<!--
None.gif          ASMX is mapped to a new handler so that proxy javascripts can also be served.
None.gif    
-->
None.gif        
< httpHandlers >
None.gif            
< remove  verb ="*"  path ="*.asmx" />
None.gif            
< add  verb ="*"  path ="*.asmx"  type ="Microsoft.Web.Services.ScriptHandlerFactory"  validate ="false" />
None.gif            
<!--
None.gif          The MultiRequestHandler enables multiple requests to be handled in one
None.gif          roundtrip to the server. Its use requires Full Trust.
None.gif      
-->
None.gif            
< add  verb ="*"  path ="atlasbatchcall.axd"  type ="Microsoft.Web.Services.MultiRequestHandler"  validate ="false" />
None.gif            
< add  verb ="*"  path ="atlasglob.axd"  type ="Microsoft.Web.Globalization.GlobalizationHandler"  validate ="false" />
None.gif            
<!--
None.gif          The IFrameHandler enables a limited form of cross-domain calls to 'Atlas' web services.
None.gif          This should only be enabled if you need this functionality and you're willing to expose
None.gif          the data publicly on the Internet.
None.gif          To use it, you will also need to add the attribute [WebOperation(true, ResponseFormatMode.Json, true)]
None.gif          on the methods that you want to be called cross-domain.
None.gif          This attribute is by default on any DataService's GetData method.
None.gif          
None.gif      <add verb="*" path="iframecall.axd" type="Microsoft.Web.Services.IFrameHandler" validate="false"/>
None.gif      
-->
None.gif            
< add  verb ="*"  path ="*.asbx"  type ="Microsoft.Web.Services.ScriptHandlerFactory"  validate ="false" />
None.gif        
</ httpHandlers >
None.gif        
< httpModules >
None.gif            
< add  name ="ScriptModule"  type ="Microsoft.Web.Services.ScriptModule" />
None.gif            
< add  name ="BridgeModule"  type ="Microsoft.Web.Services.BridgeModule" />
None.gif            
< add  name ="WebResourceCompression"  type ="Microsoft.Web.Services.WebResourceCompressionModule" />
None.gif        
</ httpModules >

转载于:https://www.cnblogs.com/Finding2013/archive/2006/08/04/467784.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值