简体   繁体   English

在IIS中托管(503服务不可用)

[英]Hosting in IIS (503 Service Unavailable)

I am trying to host my WCF service in IIS 7.5, but everytime i run the website i get a page stating 我试图将我的WCF服务托管在IIS 7.5中,但是每次运行网站时,我都会看到一个页面,指出

Service Unavailable 暂停服务

HTTP Error 503. The service is unavailable. http错误503服务不可用。

I noticed that whenever I started the website the ASP.net v4.0 stopped automatically. 我注意到,无论何时启动网站,ASP.net v4.0都会自动停止。 I checked the eventviewer and this seems to be the error 我检查了事件查看器,这似乎是错误

The worker process for application pool 'ASP.NET v4.0' encountered an error 'Configuration file is not well-formed XML ' trying to read configuration data from file '\\?\\C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\CONFIG\\web.config', line number '0'. 应用程序池'ASP.NET v4.0'的工作进程遇到错误'配置文件格式不正确的XML'试图从文件'\\?\\ C:\\ Windows \\ Microsoft.NET \\ Framework64 \\ v4读取配置数据.0.30319 \\ CONFIG \\ web.config”,行号“ 0”。 The data field contains the error code. 数据字段包含错误代码。

I tried searching for solutions around the internet but none of them have been helpful so far. 我尝试在Internet上搜索解决方案,但到目前为止,它们都没有帮助。

  1. I tried changing the identity of ASP.net v4.0 in IIS to LocalSystem and it didn't work 我尝试将IIS中的ASP.net v4.0的身份更改为LocalSystem,但它不起作用

  2. After that i tried setting up a "Custom account" by setting the username as my computer username and adding passwords but i got "The specified password is invalid, type a new password" even though i don't have any passwords for my account 之后,我尝试通过将用户名设置为我的计算机用户名并添加密码来设置“自定义帐户”,但是即使我没有任何密码,我也会收到“指定的密码无效,请输入新密码”

3.The final thing i tried was to add IIS_IUSRS and IUSR to the security of the Web.config but still it didn't work 3.我最后尝试的方法是将IIS_IUSRS和IUSR添加到Web.config的安全性中,但仍然无法正常工作

This is my Web.config 这是我的Web.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name="mexBehavior">
          <serviceMetadata httpGetEnabled="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="mexBehavior"
               name="HelloService1.HelloService1">
        <endpoint address="HelloService1" binding="basicHttpBinding"
            contract="HelloService1.IHelloService1" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8080" />
          </baseAddresses>
        </host>
      </service>
    </services>
  </system.serviceModel>

</configuration>

Try a re-install of the .NET Framework 4.0. 尝试重新安装.NET Framework 4.0。 Go to this location 转到这个位置

%windir%\Microsoft.NET\Framework64\v4.0.30319

Run this command 运行此命令

aspnet_regiis -i

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio IIS HTTP 503 服务不可用 - Visual Studio IIS HTTP 503 Service Unavailable HTTP 错误 503。该服务在 IIS 中不可用? - HTTP Error 503. The service is unavailable in IIS? IIS 停止并出现错误消息“HTTP 错误 503。服务不可用” - IIS stopped and error message "HTTP Error 503. The service is unavailable" HTTP 503:服务不可用 - HTTP 503 : Service Unavailable 使用 ApplicationPoolIdentity 或自定义帐户时,IIS8“HTTP 错误 503 - 服务不可用”,但在使用 NetworkService 时则不然 - IIS8 'HTTP Error 503 - Service unavailable' when using ApplicationPoolIdentity or a custom account, but not when using NetworkService 503服务不可用IIS +本地主机+ WebAPI + VS Android仿真器.Net Core 2 - 503 service unavailable IIS + localhost + WebAPI + VS Android Emulator .Net Core 2 IIS服务器上的Web API内的Httpclient GetAsync失败(503 Service Unavailable) - Httpclient GetAsync Fails(503 Service Unavailable) inside Web API on IIS Server Google reCAPTACHA-托管在IIS中-服务器响应状态为503(服务不可用)-MVC5 - Google reCAPTACHA - hosted in IIS - Server responded with a status of 503 (Service Unavailable) - MVC5 IIS中的服务不可用消息 - Service unavailable message in IIS HttpListener服务器返回错误:(503)服务不可用 - HttpListener server returns an error: (503) Service Unavailable
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM