Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "pratiksa"

Thanks it is working.

<cite>maliming: </cite> Call CurrentUnitOfWork.SaveChangesAsync() to catch exceptions

try
{
 
  //db operations.
  CurrentUnitOfWork.SaveChangesAsync()

}
catch (DbUpdateException e)
{
  SqlException s = e.InnerException.InnerException as SqlException;
  //handle and see your exception
}

These are the database error messages, I think should not be displayed to the UI. The application should avoid this error. For example, do parameter verification and supplement unit testing.

Even if this kind of message is displayed to the UI, sometimes it does not understand what is going on.

I tried but it is not working.

Actually have added the unique constraints in my database and I want to check the validation message for duplicate field. So i am trying to catch the error message and sent it to UI by editing in error message so user can easily understand.

<cite>maliming: </cite>

Hi, I want to show an exact error message on UI . I know the reason why insertion is failing but not getting any error message from InsertAsync.

<cite>alper: </cite>

I tried this but not working.


     try
           {

               
           }
           catch (DbUpdateException e)
           {
               SqlException s = e.InnerException.InnerException as SqlException;
               //handle and see your exception
           } 

}

I am creating new record using "InsertAsync" using asp.net zero tool. But i am getting an error message "An internal error occurred during your request" on UI and i want to show an exact error message on UI. I tried with Try-Catch but it is not caching any error message. So how to get the exact error message from "InsertAsync".

Same issue is getting during Update and DeleteAsync

Below are my project details-

Project Details: i) Created Project Structure using Asp.Net Zero tool ii) Using Asp.Net Core iii) UI Angular-5

<cite>ismcagdas: </cite> It is a private repository. Go to <a class="postlink" href="https://aspnetzero.com/LicenseManagement">https://aspnetzero.com/LicenseManagement</a> and add your github user on github users tab.

I clicked on link ><cite>ismcagdas: </cite>

It is a private repository. Go to <a class="postlink" href="https://aspnetzero.com/LicenseManagement">https://aspnetzero.com/LicenseManagement</a> and add your github user on github users tab.

I clicked on above link and i have login-ed with forum but i am not getting the option for git hub user. Could you please precise the steps.

<cite>alper: </cite> for the others I created a wiki page for adding a new item to AbpSession <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/wiki">https://github.com/aspnetzero/aspnet-zero-core/wiki</a>

After clicking on link i am getting 404 not found error. Could you please resend me the link

Hello,

Thanks for above solution. But we need to always inject "MyAppSession" class whenever we want to use and it is seems to be not working like "IAbpSession" any other possible solution rather than injection.

I want to add my own properties in "IAbpSession" interface and i have taken this url <a class="postlink" href="https://gist.github.com/hikalkan/67469e05475c2d18cb88">https://gist.github.com/hikalkan/67469e05475c2d18cb88</a> for reference and below are my project details and i have few questions on this-

Project Details: i) Created Project Structure using Asp.Net Zero tool ii) Using Asp.Net Core iii) UI Angualr-5

Questions:

I have created all things as per given in above url. But i am not getting the definition for "CreateIdentityAsync" So where i need to exactly place this method . After adding new claims then how will we get the values in UI using AbpSession. How AbpSession Works in Asp.Net.Zero tool. How we will get the value using abpSession for newly added claim in angular-5 . Can any one provide the code snippet using angular-5 and asp.net zero tool.

Showing 1 to 9 of 9 entries