简体   繁体   English

在IIS 7上发布Web服务给出500.19-内部服务器错误

[英]Publishing web service on IIS 7 gives 500.19 - Internal Server Error

I have created a folder and published my webservice to this folder. 我已经创建了一个文件夹并将Web服务发布到该文件夹​​。 I then created an application (in IIS 7) and pointed it at this folder location. 然后,我创建了一个应用程序(在IIS 7中)并将其指向此文件夹位置。 When I try and hit the ASMX file from a browser on the local machine I get the following error: 当我尝试从本地计算机上的浏览器访问ASMX文件时,出现以下错误:

HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. HTTP错误500.19-内部服务器错误无法访问请求的页面,因为该页面的相关配置数据无效。

Can someone tell me why? 有人可以告诉我为什么吗?

Try this the other way around. 尝试另一种方法。 Publish directly to IIS, taking the option to create the virtual directory. 直接发布到IIS,可以选择创建虚拟目录。 Let Visual Studio configure the virtual directory (or application) the way it wants to. 让Visual Studio以所需的方式配置虚拟目录(或应用程序)。

It seems to be something related with the web.config file, check it first. 似乎与web.config文件有关,请首先检查它。

Also, ,maybe you missed registering asp.Net in IIS, you can run aspnet_regiis.exe on the server, with the -i flag 另外,也许您错过了在IIS中注册asp.Net的权限,则可以使用-i标志在服务器上运行aspnet_regiis.exe。

C:\WINDOWS\Microsoft.NET\Framework\<your framework version here>>aspnet_regiis.exe -i
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe -i

Reading your error report, I see you have not installed the System.Web.Extensions dll, Install it and/or put it on your bin folder (System.Web.Extensions.dll) 阅读您的错误报告,我发现您尚未安装System.Web.Extensions dll,对其进行安装和/或放置在您的bin文件夹(System.Web.Extensions.dll)中

Give permissions to the folder for the IIS_IUSRS group. 将权限授予IIS_IUSRS组的文件夹。 Also, see what is the Identity of the application pool for the application in IIS manager->"Application Pools".Set it as "LocalSystem". 另外,在IIS管理器->“应用程序池”中查看该应用程序的应用程序池的标识。将其设置为“ LocalSystem”。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM