我正在尝试将一些vb.net代码转换为C#,但是我一直在遇到错误。目前,我遇到的错误与标题相同。
出错的代码行是:
string[] strUserInitials = HttpContext.Current.Request.ServerVariables("LOGON_USER").Split(Convert.ToChar("\\"));
有人知道这是为什么吗?
我正在处理一个webservice(asmx文件)。
在代码顶部,我有以下内容:
using System.Web;
using System.Web.Services;
using System.Web.Script.Services;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
OperationContext
替代吗? - Widor