Code
public class SecureWebService : WebService
{
public CredentialSoapHeader Credentials;
protected string VerifyCredentials()
{
System.Threading.Thread.Sleep(2000);
if (this.Credentials == null
|| this.Credentials.Username == null
|| this.Credentials.PasswordHash == null)
{
throw new SoapException("权限不支持",
SoapException.ClientFaultCode, "Security");
}
if( this.Credentials.VersionNo != Configuration.Instance.VersionNo )
throw new SoapException("版本不匹配.",
SoapException.VersionMismatchFaultCode, "Security");
return CheckCredential(this.Credentials);
}
public class SecureWebService : WebService
{
public CredentialSoapHeader Credentials;
protected string VerifyCredentials()
{
System.Threading.Thread.Sleep(2000);
if (this.Credentials == null
|| this.Credentials.Username == null
|| this.Credentials.PasswordHash == null)
{
throw new SoapException("权限不支持",
SoapException.ClientFaultCode, "Security");
}
if( this.Credentials.VersionNo != Configuration.Instance.VersionNo )
throw new SoapException("版本不匹配.",
SoapException.VersionMismatchFaultCode, "Security");
return CheckCredential(this.Credentials);
}