Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 编程语言 > .NET > C#.NET > 关于.Net Remoting以IIS发布的一些心得体会
【标  题】:关于.Net Remoting以IIS发布的一些心得体会
【关键字】:.Net,Remoting,IIS
【来  源】:http://blog.csdn.net/saintjackson/archive/2007/01/15/1483971.aspx

关于.Net Remoting以IIS发布的一些心得体会

Your Ad Here

经过这次MIS课程设计 我掌握了一些Remoting 技巧以IIS发布的方法为:

首先将要发布的工程以网站的方式发布出去。需要有配置文件。特别要注意的是在IIS目录里面右击网站目录,选择属性。将要发布的Remoting的安全属性设置为允许匿名访问。确定。否则会返回401错误。然后在配置文件里面加入<system.runtime.remoting>
 <application>
      <service>
  <!--需要发布成remoting的类以及它们的URI. type的结构是"assembly名称,类名"-->
        <wellknown mode="Singleton"
                   type="Newegg.CDBranchSite.BusinessLogic.ArticalManage.NewsCenter, Newegg.CDBranchSite.BusinessLogic"
                   objectUri="NewsCenter_UrlService_v_1_1_1.soap" />
        <wellknown mode="Singleton"
                   type="Newegg.CDBranchSite.BusinessLogic.ArticalManage.ArticleCenter, Newegg.CDBranchSite.BusinessLogic"
                   objectUri="ArticleCenter_UrlService_v_1_1_1.soap" />
        <wellknown mode="Singleton"
                   type="Newegg.CDBranchSite.BusinessLogic.ArticalManage.SingleArticle, Newegg.CDBranchSite.BusinessLogic"
                   objectUri="SingleArticle_UrlService_v_1_1_1.soap" />
        <wellknown mode="Singleton"
                   type="Newegg.CDBranchSite.BusinessLogic.AdminManage.SecrityManager, Newegg.CDBranchSite.BusinessLogic"
                   objectUri="SecrityManager_UrlService_v_1_1_1.soap" />
         <wellknown mode="Singleton"
                   type="EHR.Attendance.Logic.Att_Event_Logic, EHR.Attendance.Logic"
                   objectUri="Att_Event_LogicUrlService_v_1_1_1.soap" />
         <wellknown mode="Singleton"
                   type="Newegg.CDBranchSite.BusinessLogic.AdminManage.UserManager, Newegg.CDBranchSite.BusinessLogic"
                   objectUri="UserManager_UrlService_v_1_1_1.soap" />
         <wellknown mode="Singleton"
       type="Newegg.CDBranchSite.BusinessLogic.AdminManage.RoleManage,Newegg.CDBranchSite.BusinessLogic"
       objectUri="RoleManage_UrlService_v_1_1_1.soap" />
  <wellknown mode="Singleton"
       type="Newegg.CDBranchSite.BusinessLogic.RecruitProtal.PositionManager,Newegg.CDBranchSite.BusinessLogic"
       objectUri="PositionManager_UrlService_v_1_1_1.soap" />
      </service>
       <channels>
     <channel ref="http server">
         <serverProviders>
          <formatter ref="soap" typeFilterLevel="Full"/>
         </serverProviders>
        </channel>
       </channels>
     </application>
    
     <customErrors mode="Off" />
    
   </system.runtime.remoting>

在客户端配置文件加入:<appSettings>
  <add key="CommonPagerPageSize" value="10"/>
  <add key="FCKeditor:BasePath" value="~/Newegg.CDBranchSite.Presentation.Admin/"/>
  <add key="FCKeditor:UserFilesPath" value="/Newegg.CDBranchSite.Presentation.Admin/UserFiles"/>
  <!--Remoting Uri地址配置开始-->
  <add key="IPAM_PayrollCalc_GetNewsCenterUrl" value="http://127.0.0.1/Newegg.CDBranchSite.BusinessLogic/NewsCenter_UrlService_v_1_1_1.soap"/>
  <add key="IPAM_PayrollCalc_GetArticleCenterUrl" value="http://127.0.0.1/Newegg.CDBranchSite.BusinessLogic/ArticleCenter_UrlService_v_1_1_1.soap"/>
  <add key="IPAM_PayrollCalc_GetSingleArticleUrl" value="http://127.0.0.1/Newegg.CDBranchSite.BusinessLogic/SingleArticle_UrlService_v_1_1_1.soap"/>
  <add key="IPAM_PayrollCalc_GetSecrityManagerUrl" value="http://127.0.0.1/Newegg.CDBranchSite.BusinessLogic/SecrityManager_UrlService_v_1_1_1.soap"/>
  <add key="IPAM_PayrollCalc_GetUserManagerUrl" value="http://127.0.0.1/Newegg.CDBranchSite.BusinessLogic/UserManager_UrlService_v_1_1_1.soap"/>
  <add key="IPAM_PayrollCalc_GetRoleManageUrl" value="http://127.0.0.1/Newegg.CDBranchSite.BusinessLogic/RoleManage_UrlService_v_1_1_1.soap"/>
  <add key="IPAM_PayrollCalc_GetPositionManageUrl" value="http://127.0.0.1/Newegg.CDBranchSite.BusinessLogic/PositionManager_UrlService_v_1_1_1.soap"/>
  <!--Remoting Uri地址配置结束-->
 </appSettings>

这样一一对应。客户端也为ASp.net网站工程 调用代码为:private void GetRemoteObject()
  public class WebForm1 : System.Web.UI.Page
 {
  private IFindGrade fGradeObj;

  private void Page_Load(object sender, System.EventArgs e)
  {
   // 在此处放置用户代码以初始化页面
   GetRemoteObject();
   try
   {
    float a = fGradeObj.Add(1,1);
   }
   catch(Exception ex)
   {
    string str= ex.Message;
    Response.Write(str);
   }
  }
  private void GetRemoteObject()
  {
   string sdkConnect = ConfigurationSettings.AppSettings["GetAdd_Url"];
   fGradeObj = (IFindGrade)Activator.GetObject(typeof(IFindGrade),sdkConnect);
  }

DotNet加密保护工具:DotNetGuard:【上一篇】
HTTPS(Secure Hypertext Transfer Protocol)安全超文本传输协议:【下一篇】
【相关文章】
  • 有时候看.neter的表现,真的很奇怪。那种近在眼前而不见的茫然,真的让你为之着急——说说XML的无效字符
  • Application Based on .Net Framework, 如何保护我的代码?
  • VS.NET开发小技巧——C/S程序中MDI子窗体控制其父窗体控件
  • asp.net 2.0 与1.1 在生成的前台页面内容方面的一点不同
  • MagicAjax.net2.0 框架特殊字符的处理
  • 用WPF和.NET开发的下一代Yahoo Messenger
  • .NET程序的序列号控制
  • 下载PDF 格式的ASP.NET AJAX 备忘表
  • .NET程序的序列号控制 - 2
  • 体验IIS的FastCGI
  • 【随机文章】
  • 太极药业集团智能布线系统
  • 详细解说MySQL 的字符集
  • 轻松制作优盘Linux
  • MySQL数据库基础教程
  • 用Fireworks给黑白图上色
  • csv导入函数
  • linux下用socket的抓包程序
  • HP服务器上安装Linux版本支持列表
  • vb.net学习总结五(数组)
  • 单硬盘模拟各种RAID的做法
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.