设为首页 收藏本站
查看: 835|回复: 0

[经验分享] apache支持asp.net的模块mod_aspdotnet的BUG修复及重编译

[复制链接]

尚未签到

发表于 2015-8-5 10:59:39 | 显示全部楼层 |阅读模式
  apache上面运行.net是突出奇想,然后到网上找了一下,确实有支持,下载下来用了一下,有一些小的BUG,比如写入多个COOKIE只有最后一个COOKIE被写入成功,如果要真正使用这个组件的话,这点是必须修复的,还好在网上找到了mod_aspdotnet的源代码,我用的apache的版本是2.2,于是就把源代码打开把BUG修正了,然后重新编译得到两个文件.
  其实我编译的时候花了不少工夫.最终找到官方管理员,请教半天才弄出来,这也是我现在要把我重新编译的两个文件贴出来的主要原因.
  编译环境可以是XP或更高版本,vs2005或更高版本,apache2.2
  编译的时候不能用批处理编译,要用vs的命令行
  set APACHE22_PATH=e:\apache2.2
  设置环境变量,就是apache2.2的目录,安装apache的时候千万注意,要完整的安装,有一个什么headers的可选项一定要选上,要不然编译不成功的.
  
  devenv mod_aspdotnet.sln /useenv /build "Release 2.2" /project mod_aspdotnet
  编译好后有两个文件,一个是Apache.Web.dll,加入windows GAC就OK了,
  mod_aspdotnet.so放到apache下面的modules目录中的
  mod_aspdotnet下载地址
  这是官方示例的配置文件,具体的可以到其他网站上再看一下,容易找.这里就不写了.
  # Load the Apache mod_aspdotnet.so module
#   - which in turn loads the .NET / ASP.NET Framework
#      - which in turn loads the Apache.Web.dll provider
#
LoadModule aspdotnet_module "modules/mod_aspdotnet.so"

  
  # A specific version of the .NET Common Language Runtime may be forced
  # with the AspNetVersion directive; uncomment one of the lines below
  # for the v1.0 or v1.1 general release versions, and refer to the
  # C:/WINDOWS/Microsoft.NET/Framework directory for installed versions.
  # The default is the most recent installed .NET CLR version.
  #
  #AspNetVersion v1.0.3705
  #AspNetVersion v1.1.4322
  # Appear consistent with other ASP.NET hosts to the client.
  # This is optional, unaware of client applications expecting it.
  #
  Header Add X-Powered-By ASP.NET
  # Process these file types with the asp.net handler
  # (provided they fall within an AspNetMount'ed location)
  #
  AddHandler asp.net asax ascx ashx asmx aspx axd config cs csproj \
                     licx rem resources resx soap vb vbproj vsdisco webinfo
  # Serve the /aspnet_client files to the web browser, to handle
  # JavaScript controls integrated into ASP.NET applications.
  #
  AliasMatch "^/(?i)aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*)" \
             "C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4"
  # Permit the /aspnet_client files to be served to web clients.
  # Change C:/Windows above in the AliasMatch, and below in the
  # line to reflect the root of Windows (echo %windir% from the cmd prompt.)
  #
  
    Options FollowSymlinks
    Order allow,deny
    Allow from all
  
  # This  prevents Apache from processing this example
  # template, duplicate the contents (adjusting for your desired
  # /app-uri and C:/path/to/app) as many times as necessary, but
  # not within the  ...  section
  #
  
    # Create an ASP.NET host for Requests to /app-uri to be processed
    # by c:/path/to/app - see the Alias below for actually serving
    # /app-uri from Apache.
    # This is usually the path of the web.config file for the app.
    #
    AspNetMount /app-uri "C:/path/to/app"
    # Have Apache serve /app-uri requests with c:/path/to/app mounted hosted
    # Some form of Alias is required, AspNetMount does not expose /app-uri
    # itself, through Apache.
    #
    Alias /app-uri "C:/path/to/app"
    # Permit content in C:/path/to/app to be served (and use ASP.NET
    # conventions for the default pages.)
    #
   
      # Add 'Indexes'  to Options below for autoindex file listings
      # Add 'Includes' to Options below for SSI reparsing
      Options FollowSymlinks
      # Add 'Virtual' to AspNet below for non-file resources
      AspNet Files
      Order allow,deny
      Allow from all
      DirectoryIndex default.htm default.aspx

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-94380-1-1.html 上篇帖子: apache之404错误页面自定义跳转说明 下篇帖子: apache-实战FastCGI
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表