Server Application Unavailable (The web application you are attempting to access on this ..

本文探讨了解决ASP.NET1.1与ASP.NET2.0版本在同一IIS服务器上共存的问题,提供了详细的错误信息及解决方案,包括配置独立的应用程序池及解决因弱账户引起的启动失败。

   
Server Application Unavailable (The web application you are attempting to access on this ..2010-01-04 18:27服务器错误:

Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable.     Please hit the "Refresh" button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the system event log of the web server. Please review this log entry to discover what caused this error to occur.

一般碰到这样的问题可以用下面的方法解决:

上面解决方案不是很好用。
出现上面的错误。查看系统日志错误为:

事件类型: 错误
事件来源: ASP.NET 2.0.50727.0
事件种类: 无
事件 ID: 1062
日期:    2007-8-21
事件:    10:38:35
用户:    N/A
计算机: FDS-NKSDPPAO50X
描述:
It is not possible to run two different versions of ASP.NET in the same IIS process. Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process.

有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。

随着.net 2.0的发布,我们面临着ASP .NET 1.1到ASP .NET 2.0迁移的任务,中间会遇到好多两个版本的网站在一个服务器上并存的问题。

在IIS 5上,好像一切正常(没有具体研究过)。但是在IIS 6上因为引入了Application Pool的概念,所以会有一些问题。当我们针对不同两个.net版本的网站应用同一个Application Pool的时候,就会出现如下应用程序日志错误(这里ASP.NET 2.0是英文版,ASP.NET 1.1是中文版):


事件类型: 错误
事件来源: ASP.NET 1.1.4322.0
事件种类: 无
事件 ID: 1062
日期:    2006-1-5
事件:    10:35:47
用户:    N/A
计算机: xxxxxxxx
描述:
在同一 IIS 进程中不可能运行两个不同的 ASP.NET 版本。请使用 IIS 管理工具重新配置服务器以在一个单独的进程中运行应用程序。

有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。

++++++++++++++++++++++++++++++++++++++++++++


解决方案:

针对不同版本的站点(包括虚拟目录,因为它也要用Application Pool),采用不同的Application Pool。就这么简单。

也就是建立独立应用程序池。

 

 

================================================

这篇文章中的信息适用于:
Microsoft ASP.NET(随 .NET 框架一起提供)
Microsoft Internet 信息服务 5.0
Microsoft Mobile Internet Toolkit (MMIT)

本文的发布号曾为 CHS315158 
症状
在域控制器或备份域控制器上安装 Microsoft Visual Studio .NET 或 Microsoft .NET 框架后,如果您尝试运行 ASP.NET 应用程序,则浏览器会显示下面的错误信息:

Server Application Unavailable

The web application you are attempting to access on this web server is currently unavailable.

Please hit the "Refresh" button in your web browser to retry your request.
此外,系统应用程序事件日志中会记录以下事件:

aspnet_wp.exe could not be launched because the username and/or password supplied in the processModel section of the config file are invalid.
aspnet_wp.exe could not be started.
HRESULT for the failure:80004005 
此问题涉及 Internet 信息服务 (IIS) 5.0 版或更高版本。 
原因
默认情况下,为了提供更安全的环境,ASP.NET 用弱帐户(名为 ASPNET 的本地计算机帐户)运行它的辅助进程。域控制器或备份域控制器上的所有用户帐户都是域帐户,不是本地计算机帐户。因此,Aspnet_wp.exe 由于找不到名为"localmachinename/ASPNET"的本地帐户而未能启动。要在域控制器上提供有效的用户帐户,必须在 Machine.config 文件的 <processModel> 部分指定显式帐户,或者必须使用 SYSTEM 帐户。

备注:如果在尝试浏览页面之前尝试进行调试(单击启动按钮),则会出现完全相同的问题。 
解决方案
若要解决此问题,请使用下列方法之一:
创建具有正确权限的弱帐户,然后配置 Machine.config 文件的 <processModel> 部分使用该帐户。
在 Machine.config 文件的 <processModel> 部分,将 userName 属性设为 SYSTEM。
配置 Machine.config 文件的 <processModel> 部分使用管理员帐户。 
备注:如果允许 ASP.NET 应用程序作为 SYSTEM 或管理员帐户运行,将带来严重的安全问题。如果使用其中的任一种变通解决办法,在 Aspnet_wp.exe 进程中运行的代码将能够访问域控制器和域设置。从 Aspnet_wp.exe 进程启动的可执行文件在相同的上下文中运行,它们也能够访问域控制器。

因此,Microsoft 建议使用第一种变通解决办法。要使用第一种变通解决办法,请执行以下步骤:
在计算机上创建名为 ASPUSER 的用户帐户,然后将此帐户添加到"用户组"中。

备注:如果更改了 .NET 框架创建的 ASPNET 帐户的密码,也可以使用该帐户。您必须知道此帐户的密码,因为需要在后面的步骤中将该密码添加到 <processModel> 部分。
向 ASPUSER 或 ASPNET 帐户授予"作为批处理作业登录"的用户权限。确保此更改在"本地安全策略"设置中显示。

备注:要向此帐户授予"作为批处理作业登录"的用户权限,必须在以下每一个安全策略中授权此用户权限(从"控制面板"/"管理工具"开始操作):


域控制器安全策略
域安全策略
本地安全策略

备注:您必须重新启动服务器,以使这些更改生效。
确保 ASPUSER 或 ASPNET 帐户具有的权限能够访问启动 Aspnet_wp.exe 进程和为 ASP.NET 页提供服务所必需的全部目录和文件。有关必须向此帐户授予哪些权限的其他信息,请单击下面的文章编号,查看 Microsoft 知识库中的文章: 
317012 INFO:ASP.NET 中的进程和请求标识

打开 Machine.config 文件。该文件的路径是:%Systemroot%/Microsoft.NET/Framework/v1.0.3705/CONFIG.
在 Machine.config 文件的 <processModel> 部分,将 userName 和 password 属性更改为第 1 步创建的帐户的名称和密码。例如: userName="DomainName/ASPUSER" password="ASPUSERpassword"
保存对 Machine.config 文件所做的更改。 
状态
Microsoft 已经确认这是在本文开头列出的 Microsoft 产品中存在的错误。 
参考
有关 ASP.NET 安全性的其他信息,请单击下面的文章编号,查看 Microsoft 知识库中的文章: 
306590 INFO:ASP.NET 安全性概述

==========================================

^o^
记得把网站文件夹设置好安全属性。System账号为完全控制。
 

/* 1613 * The madvise(2) system call. 1614 * 1615 * Applications can use madvise() to advise the kernel how it should 1616 * handle paging I/O in this VM area. The idea is to help the kernel 1617 * use appropriate read-ahead and caching techniques. The information 1618 * provided is advisory only, and can be safely disregarded by the 1619 * kernel without affecting the correct operation of the application. 1620 * 1621 * behavior values: 1622 * MADV_NORMAL - the default behavior is to read clusters. This 1623 * results in some read-ahead and read-behind. 1624 * MADV_RANDOM - the system should read the minimum amount of data 1625 * on any access, since it is unlikely that the appli- 1626 * cation will need more than what it asks for. 1627 * MADV_SEQUENTIAL - pages in the given range will probably be accessed 1628 * once, so they can be aggressively read ahead, and 1629 * can be freed soon after they are accessed. 1630 * MADV_WILLNEED - the application is notifying the system to read 1631 * some pages ahead. 1632 * MADV_DONTNEED - the application is finished with the given range, 1633 * so the kernel can free resources associated with it. 1634 * MADV_FREE - the application marks pages in the given range as lazy free, 1635 * where actual purges are postponed until memory pressure happens. 1636 * MADV_REMOVE - the application wants to free up the given range of 1637 * pages and associated backing store. 1638 * MADV_DONTFORK - omit this area from child's address space when forking: 1639 * typically, to avoid COWing pages pinned by get_user_pages(). 1640 * MADV_DOFORK - cancel MADV_DONTFORK: no longer omit this area when forking. 1641 * MADV_WIPEONFORK - present the child process with zero-filled memory in this 1642 * range after a fork. 1643 * MADV_KEEPONFORK - undo the effect of MADV_WIPEONFORK 1644 * MADV_HWPOISON - trigger memory error handler as if the given memory range 1645 * were corrupted by unrecoverable hardware memory failure. 1646 * MADV_SOFT_OFFLINE - try to soft-offline the given range of memory. 1647 * MADV_MERGEABLE - the application recommends that KSM try to merge pages in 1648 * this area with pages of identical content from other such areas. 1649 * MADV_UNMERGEABLE- cancel MADV_MERGEABLE: no longer merge pages with others. 1650 * MADV_HUGEPAGE - the application wants to back the given range by transparent 1651 * huge pages in the future. Existing pages might be coalesced and 1652 * new pages might be allocated as THP. 1653 * MADV_NOHUGEPAGE - mark the given range as not worth being backed by 1654 * transparent huge pages so the existing pages will not be 1655 * coalesced into THP and new pages will not be allocated as THP. 1656 * MADV_COLLAPSE - synchronously coalesce pages into new THP. 1657 * MADV_DONTDUMP - the application wants to prevent pages in the given range 1658 * from being included in its core dump. 1659 * MADV_DODUMP - cancel MADV_DONTDUMP: no longer exclude from core dump. 1660 * MADV_COLD - the application is not expected to use this memory soon, 1661 * deactivate pages in this range so that they can be reclaimed 1662 * easily if memory pressure happens. 1663 * MADV_PAGEOUT - the application is not expected to use this memory soon, 1664 * page out the pages in this range immediately. 1665 * MADV_POPULATE_READ - populate (prefault) page tables readable by 1666 * triggering read faults if required 1667 * MADV_POPULATE_WRITE - populate (prefault) page tables writable by 1668 * triggering write faults if required 1669 * 1670 * return values: 1671 * zero - success 1672 * -EINVAL - start + len < 0, start is not page-aligned, 1673 * "behavior" is not a valid value, or application 1674 * is attempting to release locked or shared pages, 1675 * or the specified address range includes file, Huge TLB, 1676 * MAP_SHARED or VMPFNMAP range. 1677 * -ENOMEM - addresses in the specified range are not currently 1678 * mapped, or are outside the AS of the process. 1679 * -EIO - an I/O error occurred while paging in data. 1680 * -EBADF - map exists, but area maps something that isn't a file. 1681 * -EAGAIN - a kernel resource was temporarily unavailable. 1682 */
最新发布
11-14
### 解决 C++ 程序中网络资源不可用的问题 在网络编程过程中,遇到网络资源不可用的情况通常涉及底层套接字(socket)调用失败。对于C++程序而言,这可能源于`socket()`函数执行期间出现问题[^1]。 #### 套接字初始化阶段可能出现的错误及其处理方式 如果`socket(domain, type, protocol)`返回负数,则表示创建套接字失败。此时应该检查以下几个方面: - `domain`: 应设置为AF_INET(IPv4), AF_INET6(IPv6),或其他适当值。 - `type`: SOCK_STREAM(TCP流式传输)/SOCK_DGRAM(UDP数据报文)等。 - `protocol`: 大多数情况下设为0即可让系统自动选择协议;除非有特殊需求指定具体协议编号。 ```cpp #include <iostream> #include <sys/types.h> /* See NOTES */ #include <sys/socket.h> int main() { int sockfd; // 创建TCP IPv4类型的套接字 if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0){ perror("Socket creation error"); exit(EXIT_FAILURE); } } ``` - **权限不足** 某些操作系统上,创建特定类型的套接字需要管理员权限。确保运行环境具备足够的权限来完成此操作。 - **地址已经被占用** 尝试绑定本地端口时可能会因为之前未完全关闭的服务实例仍然持有该端口号而发生冲突。可以通过设置重用选项(`setsockopt`)来规避这个问题。 ```cpp // 设置允许立即重新使用本地地址和端口 if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR | SO_REUSEPORT, &opt, sizeof(opt))) { perror("Setsockopt failed"); close(sockfd); exit(EXIT_FAILURE); } ``` #### 运行库相关问题排查 考虑到VC运行库的重要性,在排除上述可能性之后还应考虑是否存在由于缺少必要的动态链接库(DLLs)造成的连接建立困难情况。特别是当应用程序依赖于第三方库或跨平台移植项目时更要注意这一点[^2]。 建议确认目标机器已经安装了对应版本的Microsoft Visual C++ Redistributable Package,并且路径配置正确无误以便加载所需的DLL文件。 #### 容器环境中额外注意事项 如果是基于容器化的部署模式下遇到了此类状况,那么还需要关注宿主机与容器之间的网络通信机制是否正常工作以及是否有防火墙策略阻止了内外网间的交互行为。此外,Kubernetes这类高级别的编排工具也可能引入一些默认的安全组规则影响到实际效果[^4]。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值