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

Activities of "sparkyjr"

Hi,

Wherever we have injected few application services into controller class's constructor, and if the constructor of any of these application services has many items injected, then it takes too long (as long as 20 sec) to hit the controller action.

Could you please help and suggest some robust solution here?

Thanks in advance! SparkyJr

Our solution is built using ASPNetZero and our web app is hosted on Azure. The log files in Azure are getting inundated with the following entry (approx. every 2 mins)

WARN XXX... Abp.Auditing.WebAuditInfoProvider - Could not obtain web parameters for audit info. WARN XXX... Abp.Auditing.WebAuditInfoProvider - System.Net.Sockets.SocketException (0x80004005): No such host is known at System.Net.Dns.GetAddrInfo(String name) at System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) at System.Net.Dns.GetHostAddresses(String hostNameOrAddress) at Abp.Auditing.WebAuditInfoProvider.GetClientIpAddress(HttpContext httpContext) at Abp.Auditing.WebAuditInfoProvider.Fill(AuditInfo auditInfo)

Tried following the solution described at <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/467">https://github.com/aspnetboilerplate/as ... issues/467</a> but could not find the relevant libraries in the ASPNet Zero solution. We are currently on version 1.9.0 (Package version 0.8.3.0). Is there a way we can selectively disable this log entry? Any other alternate solutions possible?

Thanks. SJ

I have added some methods to CommonLookupAppService. The CommonLookupAppService has the AbpAuthorize attribute, indicating that only authorized users can access this service methods.

Now, I want to suppress authorization for a method in this CommonLookupAppService. I tried using AbpAllowAnonymous and AllowAnonymous attributes, but unfortunately these attributes aren't available in the project.

How do I suppress authorization for a method in any service, which has AbpAuthorize attribute?

Hi,

Is there a place in Web project where I can add my CSS classes that I shall used throughout my project. Ideally, I'm hoping that I wouldn't have to give any stylesheet links on the pages i'm working on. Just use the classes without giving stylesheet reference.

Thanks

Hi,

Suppose I need the TenantId in any controller Action Method, we just say

AbpSession.TenantId

This will return the TenantId of the logged in user.

What if I need to include a custom property in this AbpSession with a value related to the login user? eg.

AbpSession.CustomerFolioNo

Is that possible? If yes, where should I set my custom property? When the User logs in..??

Hi.

I'm trying to display names of all users of the current tenant in a dropdown. I tried using the following ways to get Users list, but didn't succeed

<ins>Method 1)</ins> In the controller, I tried injecting UserManagerand then in the action method, wrote the following code

var allUsers = _userManager.Users;
ViewBag.DdlUsers = new SelectList(allUsers, "Id", "value", null);

<ins>Method 2)</ins> In the controller, I tried injecting UserAppServiceand then in the action method, wrote the following code

var allUsers = var allUsers = await _userAppService.GetUsers(new GetUsersInput());
ViewBag.DdlUsers = new SelectList(allUsers, "Id", "value", null);

In both cases I'm getting the following error "The operation cannot be completed because the DbContext has been disposed."

I would also like to know if there is a way to get this list in Javascript as JSON

I have been deploying our ASP.NET Zero project to Azure without problems for a while now. For last few days all deployments have started failing with error "SQLExpress database file auto-creation error: ", where it looks like the Azure system is trying to connect to a local database. Upon debugging it seems like this is happening only for authenticated pages. The login page shows up as expected, and login failures also happen. But as soon as authentication is successful, it seems a different DB is getting accessed.

Here is my current connection string in web.config

<add name="Default" connectionString="Data Source=xxx.database.windows.net,1433;Database=XYDB;User ID=xxx;Password=yyy;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" providerName="System.Data.SqlClient" />

Looks like the system for some reason might be reverting to the LocalSqlServer connection string in machine.config. When I add the following

<remove name="LocalSqlServer" />
    <add name="LocalSqlServer" connectionString="Data Source=xxx.database.windows.net,1433;Database=XYDB;User ID=xxx;Password=yyy;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" providerName="System.Data.SqlClient" />

The error now changes to "Could not find stored procedure 'dbo.aspnet_CheckSchemaVersion'. "

Makes me wonder whether the ASPNet Zero is indeed using the ASP default role management? Is there a way I can disable it if it is not used? As this seems to be happening out of the blue, I am also thinking if this is because of some action on the Azure side. Any help is appreciated

Hi,

We have used Background Worker to send out emails every 24 hours. The problem is, the client never received any emails. We think that the application gets removed after certain time, and is not active on the server.

How do I keep the application alive and active all the time?

Thanks in advance!

Hi,

What all are the possible cases when the CreatorUserId goes as null?

Hi,

When testing for multiple Tenants the TenantId is getting cached in AbpSession. Just to recreate this scenario you could check AccountController, and try logging with different Tenants.

Showing 21 to 30 of 32 entries