DeviceManager/TsSFCDeviceService/deviceData.asmx.cs

44 lines
1.4 KiB
C#
Raw Normal View History

2024-07-22 07:50:10 +00:00
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
namespace TsSFCDeviceService
{
[WebService(Namespace = "http://www.TechScan.cn/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消注释以下行。
// [System.Web.Script.Services.ScriptService]
public class deviceData : System.Web.Services.WebService
{
private static readonly Logger log = LogManager.GetCurrentClassLogger();
[WebMethod(Description = "测试")]
public string HelloWorld()
{
//HttpAuthtication();
return "Hello World";
}
}
//private void HttpAuthtication()
//{
// #region 校验
// if (authentication == null || !authentication.ValidUser(authentication.Username, authentication.Password))
// {
// HttpException soapEx = new HttpException(403, "服务不允许访问此页面,也不允许匿名访问。");
// SvcLog.Warn(string.Format("客户端[{0}]我们试图执行远程匿名访问Func[{1}]!这是被禁止的!", HttpContext.Current.Request.UserHostAddress, "GetDatas"), soapEx);
// throw soapEx;
// }
// #endregion 校验
//}
}