Hello team,
We are encountering the following exception while dealing with UserConnection.
System.ServiceModel.ServiceActivationException: Set AspNetCompatibilityEnabled true
at Terrasoft.Web.Common.BaseService.get_UserConnection()
at Terrasoft.Configuration.UsrDeliqDBEntry.UsrdeliqDBEntry.d__7.MoveNext()
Could you please let us know if we are missing anything?
[ServiceContract]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
public class UsrdeliqDBEntry : BaseService
{
private readonly UsrLogger usrLogger = UsrLogger.Instance;
private Guid transRefId { get; set; }
Guid intendedUserId= Guid.Empty;
[OperationContract]
[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle =
WebMessageBodyStyle.Wrapped,
ResponseFormat = WebMessageFormat.Json)]
public async Task<string> saveCheckIndatabase(string documentId, string documentType, string customerId, Guid transRefId, Guid currentUserId)
{
var logger = global::Common.Logging.LogManager.GetLogger("MyLogger");
try
{var intendedUserSelect= new Select(UserConnection)
.Column("Id")
.From("SysAdminUnit")
.Where("ContactId").IsEqual(Column.Parameter(currentUserId))
as Select;
intendedUserId = intendedUserSelect.ExecuteScalar<Guid>();
}
catch(Exception e)
{
logger.Info("Exception ="+ e.ToString());
}