http错误503服务不可用.应用程序池在访问网站时停止 [英] HTTP Error 503. The service is unavailable. App pool stops on accessing website

查看:37
本文介绍了http错误503服务不可用.应用程序池在访问网站时停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

There are number of posts on this and I have tried many a things by now. But to no avail. Myself a Winforms Developer basically, started working on this Web stuff few days back as my company is taking Web initiatives.

I have a ASP.Net project and I want to host it on local IIS. In Project properties -> Web settings I chose Use Local IIS Server and gave a url as localhost/MyApp. I tried accessing it on my firefox browser and received error as HTTP Error 503. The service is unavailable.

Previously I got many other errors and I one by one fixed them all. But struck with this one. These are the settings I have in my project

  1. Application Pool set to ASP.Net v4.0 Classic
  2. App Pool Enable 32 bit Application property is true
  3. App Pool is started
  4. Project build property set to Any CPU for Target framework

But I would like to mention a weird behavior. Following is something that I am facing

  1. Application Pool is Started
  2. I try to access my local website (by giving url as localhost/MyApp)
  3. I receive the error as HTTP Error 503. The service is unavailable
  4. Application Pool is Stopped

I have seen following link and I have already tried it. For the above behavior I reached here. According to this link, Computer name should not have . in it. I don't have any . in my Computer name but do have - in it. Also my domain name contains . in it. Moreover I can't change these settings as its my office laptop and our TFS settings are bound to our Domain and Computer Names.

Can anyone help me to understand whats happening? Please guide me. Thanks.

Edit

I have following code in Global.asax. Application_BeginRequest method is empty in same file.

protected override void Application_Start(object sender, EventArgs e)
{
    base.Application_Start(sender, e);
    String _path = String.Concat(System.AppDomain.CurrentDomain.RelativeSearchPath, ";",
                                         System.Environment.GetEnvironmentVariable("PATH"));
    System.Environment.SetEnvironmentVariable("PATH", _path, EnvironmentVariableTarget.Process);
    MyAppLog.Initialize();
    MyAppLog.WriteMessage("Application Started");
}

Update

As per the suggestions in Comment, I am able to run the website from Cassini.

解决方案

One possible reason this might happen is that the Application Pool in IIS is configured to run under some custom account and this account either doesn't exist or a wrong password has been provided, or the password has been changed. Look at the advanced properties of the Application Pool in IIS for which account it uses.

Also the Event Log might contain more information as to why the Application Pool is stopping immediately on the first request.

这篇关于http错误503服务不可用.应用程序池在访问网站时停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆