public void GetKey() { WApplicationInterfaceBLL server = new WApplicationInterfaceBLL(loggingSessionInfo); WApplicationInterfaceEntity info = null; if (string.IsNullOrEmpty(applicationId)) { info = server.Query( new IWhereCondition[] { new EqualsCondition() { FieldName = "CustomerId", Value = customerId } } , null)[0]; } else { info = server.GetByID(applicationId); } if (info == null) { Response.Write("不存在对应的微信标识"); Response.End(); } else { applicationId = info.ApplicationId; strAppId = info.AppID; strAppSecret = info.AppSecret; if (info.AuthUrl == null || info.AuthUrl.Equals("")) { } else { strRedirectUri = info.AuthUrl + "WXOAuth/AuthCodeReques.aspx"; } } }