我在webservice
中有一个asmx
。我将其托管到IIS 7.0
中的Default Web Site
,但是浏览时会引发错误。
HTTP错误500.19,代码为0x80070021
此外,在IIS中扩展文件夹后,即使文件夹中也有web.config
和.asmx
文件,也不会显示。
文件夹内部视图:
Web服务代码:
namespace Plant_WebService
{
/// <summary>
/// Summary description for EngineeringData
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class EngineeringData : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
[WebMethod]
public bool InsertEngineeringData(string FunctionalLocation, string EqptType, string WINFileNo, string ComponentTagNo)
{
bool Status = false;
EngineeringDataDAL EngineeringDataDAL = new Vail_PlantWebApi.EngineeringDataDAL();
Status = EngineeringDataDAL.InsertEngineeringData(FunctionalLocation, EqptType, WINFileNo, ComponentTagNo);
return Status;
}
}
}