今天打算把Community Server 2.0在vista IIS 7.0下跑起来,设置完虚拟目录后浏览,发现HttpContext.Current.Request抛出了System.Web.HttpException,检查了一下IIS下设置成集成管道模式,换成经典管道模式,则不抛出异常,百思不得其解,后来发现msdn上有如下一段话
不包含自定义模块或处理程序的 Web 应用程序通常无需更改即可在 IIS 7.0 集成模式下正常工作。对于依赖于自定义模块或处理程序的 Web 应用程序,需要执行以下步骤来使其能够在集成模式下运行:
使用本主题稍后的将 Web Config 文件迁移到集成模式部分中描述的方法之一,在 Web.config 文件的 system.webServer 节中注册自定义模块和处理程序。
仅在自定义模块的 Init 方法中定义 HttpApplication 请求管道事件(如 BeginRequest 和 EndRequest)的事件处理程序。
请确保您已解决 Upgrading ASP.NET Applications to IIS 7.0: Differences between IIS 7.0 Integrated Mode and Classic mode(将 ASP.NET 应用程序升级到 IIS 7.0:IIS 7.0 集成模式和经典模式之间的区别)的“Known Differences Between Integrated Mode and Classic Mode”(集成模式和经典模式之间的已知区别)部分中讨论的问题。
而CommunityServer 的写法如下
Global.ascx.cs
protected void Application_Start(Object sender, EventArgs e)
{
Jobs.Instance().Start();
EventLogs.Info("CS.Web Started", "Application", 200);
}
Jobs会调用HttpContext.Current.Request,在集成管道模式下抛出异常。
还有一个问题,在集成管道模式下涉及到CS的url rewriting全部不起作用,找不到路径,我开始试图修改处理程序映射中的“检查文件是否存在”取消打勾,不过却找不到该选项。
后来发现换成经典管道模式也正常了。这里记录一下,给有相同问题的朋友提个醒。
头疼死了,不过还是想写完再休息,今日事今日毕,养成好习惯。
今天的讲课大赛真是郁闷,比赛前被告知无法使用笔记本连接投影,试了一下讲课的台式机发现flash无法使用,更新了flash的版本还是不行;还有台式机也缺少微软雅黑字体,搞得我的课件字体很难看。晕倒,抽签还是第二个,准备已经来不及,最后只得放弃flash,好歹拷贝了微软雅黑字体装上,匆匆忙忙的就开始讲课。
讲课的过程感觉发挥的还可以,就是时间没有把握好,半个小时的时间提前了4分钟。讲完课下来感觉轻松了很多,趁其他老师讲课的时候溜出去踢了一会球。不过最恐怖的是学院里的讲课大赛持续了7个半小时,不过最终的结果感觉还可以,拿了个二等奖。一等奖的两位老师可以代表学院参加学校的比赛,羡慕ing。
不过最高兴的是,我又可以写我的程序、正儿八经地踢球了。
其实有n个理由不去报名的,要看孩子,要写程序,要学新东西…..
不知道哪根筋崩掉了,竟然报名了…..
估计是让金融危机闹得,得了失业恐惧症,别把我末位淘汰了,程序先放放,教课是主业阿!
郁闷,昨天晚上还做了个噩梦,梦见离讲课大赛还有3个小时,我的方程解不出来了(晕,这是哪跟哪啊),囧
不管了,全当去练脸皮了,这几天把课件再整一下,星期四就比赛了。
憋在心里不痛快,发发牢骚。
1.环境
物理机 vista business
虚拟机 ubuntu 内核 2.6.24-12-generic , gcc版本 4.2.4
2.症状
在vmware把vista下的d盘设置为共享文件夹,ubuntu下无法访问。
3.尝试步骤
重新安装vmware tools 系统报gcc版本应该为4.2.3,当前为4.2.4,如强制使用gcc 4.2.4编译,报错
于是想到降级gcc,不过按照网上很多办法,都不成功,比如使用aptitude,yum以及设置CC。后来发现在/var/cache/apt/archives下放置了旧版本4.2.3的deb包,于是使用dpkg -i 降级,期间遇到依赖错误,按照相应的依赖关系执行即可,我是如下处理的
$ cd /var/cache/apt/archives
$ ls |grep gcc
$ ls |grep cpp
$ dpkg –i gcc-4.2-base_4.2.3-2ubuntu7_i386.deb
$ dpkg –i cpp-4.2_4.2.3-2ubuntu7_i386.deb
$ dpkg –i gcc-4.2_4.2.3-2ubuntu7_i386.deb
此时执行gcc –v发现已降级为gcc 4.2.3
但安装vmware tools 发现仍然无法正确编译共享文件夹需要的vmhgfs模块。问题不在这里,经过一番尝试,终于找到解决方案,如下
- Download the latest open-vm-tools tar from http://open-vm-tools.sourceforge.net/and extract it (tar -xvf)
- Follow the open-vm-tools INSTALL document, just to check these actually build. If they don’t, it’s a no-go and not going to be a solution for you.
- Grab the latest VMWare Tools (i.e. mount it using the "Install VMware Tools" option in Vmware Workstation, or wherever)
- Grab the VMWare tools tar, and extract it to a seperate directory (you now have two directories - one with the official tools, one with the open-vm-tools)
- Goto the open-vm-tools/modules/linux directory. For each directory:
a) Rename it to xxx-only (i.e. vmmemctl becomes vmmemctl-only)
b) Then, tar each directory as follows: "tar -cf xxx.tar xxx-only". For example, "tar -cf vmmemctl.tar vmmemctl-only" - Once each directory is tarred, copy the tars overwriting the existing vmware-tools official ones. The official tars are located in vmware-tools-distrib/lib/modules/source. So, for example, do a: "cp open-vm-tools/modules/linux/.tar vmware-tools-distrib/lib/modules/source/", and overwrite each one.
- Re-run vmware-config-tools.pl, and build each module. Do not say yes to the experimental option (might work, but have not tested it - can’t see the matching open source modules tho…).
- Poof - should all work. Test a shared folder appears under /mnt/hgfs/ to make sure things are working for you.
经过以上步骤,共享文件夹问题解决