0
kunnummal created
Hi,
when I tried to call web service method i'm getting 'SOAP WEB EXCEPTION' error.
this is my code pl. review the code and correct me if there is any wrong in this code.
WEB SERVICE CODE:
[WebMethod]
public async Task<int> GetTenantId(string strTenancy, string strUser, string strPwd)
{
int tentId = await GetLoginResult(strTenancy, strUser, strPwd);
return tentId;
}
private async Task<int> GetLoginResult(string strTenancy, string strUser, string strPassword)
{
string strRetVal = "";
int TId = 0;
try
{
var loginResult = await _logInManager.LoginAsync(strUser, strPassword, strTenancy);
switch (loginResult.Result)
{
case AbpLoginResultType.Success:
return loginResult.Tenant.Id;
default:
return TId;
}
}
catch (Exception ex)
{
throw ex;
}
}
CALLING WEB SERVICE
string strUser = txtUsername.Text.Trim();
string strPwd = txtPassword.Text.Trim();
string strTen = txtTenancy.Text.Trim();
LoginSample.LoginSample obj = new LoginSample.LoginSample();
textBox1.Text = obj.GetTenantId(strTen, strUser, strPwd).ToString(); ---- here i'm getting SOAP WEB EXCEPTION method error while calling WEB SERVICE
1 Answer(s)
-
0
Hi @kunnummal,
Do you use ASP.NET MVC 5.x or ASP.NET Core version ? You can check our step by step documentation for calling an applicaation service or controller <a class="postlink" href="https://aspnetzero.com/Documents/Developing-Step-By-Step">https://aspnetzero.com/Documents/Develo ... ep-By-Step</a>.