Skip to main content

HTTP/1.1 500 Internal Server Error

运气不好,开机以后就碰到“HTTP/1.1 500 Internal Server Error”这个错误。

使用Google搜索的话,第一个是http://support.microsoft.com/kb/822319官方的东西,但是依然没有解决我的问题。尝试使用中文搜索找到:HTTP/1.1 500 Internal Server Error,寒一下,在一个英文论坛,xiaosan-33这个老兄,发表了长篇的中文,而且页面是utf-8的,必须改用gb2312才能看到,要不然是乱码。

aspnet_wp.exe could not be started. The error code for the failure is 80004005. This error can be caused when the worker process account has insufficient rights to read the .NET Framework files. Please ensure that the .NET Framework is correctly installed and that the ACLs on the installation directory allow access to the configured account.
这个才是关键,本机的aspnet_wp.exe没有启动。

解决步凑:

  1. 删除本机的ASPNET和IUSR_{machine}用户。(IUSR_{machine}每台机器各有不同)
  2. 运行aspnet_regiis -i重新注册。
  3. 运行iisreset,重启iis
  4. 打开Internet Information Services,确保在IIS的安全设置(匿名访问)里面找到"IUSR_machine"用户,并且是由IIS控制密码的;
  5. 注销。
  6. 这步也许不是必要的。两个用户添加以后,在User Account中查看,发现一个为Users,一个为Guests,把他们全部变成了Adminstrator。
问题解决。

补充一下本机环境。xp sp2,vs2003,vs2005,iis 5.1,framework 1.1, 2.0, 3.0。

Comments

Popular posts from this blog

asp.net Single Sign-On(SSO) from SAP

公司的主系统是SAP的东西,有的时候老板想要一些小的新功能或是某个部门需要一个自己使用的小系统又不想买SAP的东西(贵啊),只有自己写和使用一些第三方免费或是开源的系统,这个时候就难免涉及到 Single Sign-On 。而在asp.net 2.0下是非常容易实现的。有SAP提供的“Sapsecu.dll”,“sapssoext.dll”2个dll再加上由公司SAP系统提供的"verify.pse"就足够了。 第一步 复制Sapsecu.dll到system32目录,并使用Rersrv32注册。 第二步 在项目里添加对sapssoext.dll的引用,vs2005会自动生成Interop.SAPSSOEXT.dll来让.net使用。 第三步 在你项目的根目录创建sap目录,并将SAP系统那边提供的verify.pse复制过去。位置倒到不是一定要在这里,只要你找得到就好。 第四步 在SAP系统那边,需要生成一个类似:http://yourserver/login.aspx?sso=werwerwerwe的链接,当然具体的页面需要你和那边的管理员商量来决定。这个链接是有时效性的,我在做测试的时候他们给的测试链接通常只能用一天。现在我们要做到就是我们这边的编码,在login.aspx的page_load里面实现: protected void Page_Load(object sender, EventArgs e) {   string sso= Request.QueryString["sso"];   SAPSSOEXT.SSO2Ticket objSSO = new SAPSSOEXT.SSO2Ticket();   objSSO.CryptLib = "sapsecu.dll";   string strKeypath = Server.MapPath("~/sap/verify.pse");    //放在根目录比较容易找   object tt;   tt = objSSO.EvalLogonTicket(strTicket, strKeypath, String.Empty); ...

On Building

慢慢添东西,嘿嘿,放了个ico上去,美女哦,三国11的貂婵。 原计划是把整个css改为我自己设计的那个css的,仔细看了一下,我的和现在用这个根本没法比嘛。