I have developed a Reporting Module which will fetch data from application services but will generate PDF or EXCEL on this module.
My idea is to have a separate installation of the entire application which will connect to a replicated database and I should be able to call the reporting services from this application directly from the UI. This way my Reporting will be completely separated from the application.
My problem is how to authenticate. The scenario is I login to my application which will have a button say "Generate Huge Report". This button will wire up to call the reporting service from a separate web API instance. I don't know will I authenticate the request here as it's a separate URL .
Any ideas?
Is there a plan to handle concurrency in ABP ?
Any updates ?
Awesome. Looking forward to it !!!
Hi -
I have a grid which gets it's data from a Web API let's .../api/services/app/GetVendors. Now it returns let's say 50 records when I send a request with page size and it renders to the grid. All works fine.
Now I want to add a button called "Export To Excel" which will consume the same API and return all the vendors which I can do it by sending page size as -1. This is fine as well.
But what I need is to able to specify the formatted output for the API which could be json or XM whil accessing the API.
My plan is use the below link which returns an excel from teh WebAPI by formatting the output .
<a class="postlink" href="http://webapicontrib.github.io/WebApiContrib.Formatting.Xlsx/">http://webapicontrib.github.io/WebApiCo ... ting.Xlsx/</a>
Hi -
I am trying to create a new Module called "reporting " which will be dependent on Application and Core Module. I would also like these reporting module to exposed through a Web API like the application module.
Could you help me in configuring this module?
Thanks, Partha
I am using AWS RDS instance for SQL.
With the implementation of [https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1706]) i was under the impression that we no longer require MSDTC. But I am still getting the error :
The partner transaction manager has disabled its support for remote/network transactions.
Am i missing something in here ?
Hi -
I am now in the phase where I am architecting my deployment strategy. This is what is happening :
I have hosted my application in AWS EC2 instance where I have one IIS server and two database server say "Host" and Client"
While deployingy the web config is "Trusted_Connection=True;" in the connection parameter. Also it's the same when I add the client database details while setting up the Tenant. When i do this everything works fine as they as these databases are accessed using IIS service account.
Everything is great till now.
Then comes the migrator tool. The Migrator tool will be using the connection string sepcified in the App.config.
As my build and deployment tool is outside the AWS so obviously i cannot use "Trusted_Connection=True;" in my connection string , in that case I have to use the sql authentication.
This works fine and it fails while updating the client database as in that case the connection string would be "Trusted_Connection=True;". I can fix this issue by programmatically changing the connection string.
My problem is _migrator.CreateOrMigrateForHost() doesn't takes any parameter, so I cannot override the connection string for the host. Which leaves me no choice than writing down my userid and password in my web config which I totally don't want it.
If you could provide a override method for _migrator.CreateOrMigrateForHost() which accepts a connection string that would solve a lot fo problem.
If you can think of any other way to hid the user id or password that would be great.
Thanks
This is what I have done so far. Wrote a class on the Entityframeowrk project
public class MyDbPerTenantConnectionStringResolver : IDbPerTenantConnectionStringResolver
{
/// <summary>
/// Reference to the session.
/// </summary>
public IAbpSession AbpSession { get; set; }
private readonly ICurrentUnitOfWorkProvider _currentUnitOfWorkProvider;
private readonly ITenantCache _tenantCache;
/// <summary>
/// Initializes a new instance of the <see cref="SumitDbPerTenantConnectionStringResolver"/> class.
/// </summary>
public SumitDbPerTenantConnectionStringResolver(
IAbpStartupConfiguration configuration,
ICurrentUnitOfWorkProvider currentUnitOfWorkProvider,
ITenantCache tenantCache)
{
_currentUnitOfWorkProvider = currentUnitOfWorkProvider;
_tenantCache = tenantCache;
AbpSession = NullAbpSession.Instance;
}
public string GetNameOrConnectionString(ConnectionStringResolveArgs args)
{
if (args.MultiTenancySide == MultiTenancySides.Host)
{
return GetNameOrConnectionString(new DbPerTenantConnectionStringResolveArgs(null, args));
}
return GetNameOrConnectionString(new DbPerTenantConnectionStringResolveArgs(GetCurrentTenantId(), args));
}
public virtual string GetNameOrConnectionString(DbPerTenantConnectionStringResolveArgs args)
{
if (args.TenantId == null)
{
//Requested for host
return GetNameOrConnectionString(args);
}
var tenantCacheItem = _tenantCache.Get(args.TenantId.Value);
if (tenantCacheItem.ConnectionString.IsNullOrEmpty())
{
//Tenant has not dedicated database
return GetNameOrConnectionString(args);
}
return tenantCacheItem.ConnectionString;
}
protected virtual int? GetCurrentTenantId()
{
return _currentUnitOfWorkProvider.Current != null
? _currentUnitOfWorkProvider.Current.GetTenantId()
: AbpSession.TenantId;
}
}
Then added the code the following code on the data module on the PreInitialize
Configuration.ReplaceService<IDbPerTenantConnectionStringResolver, MyDbPerTenantConnectionStringResolver>();
Still it's not overiding. Am I missing anything ?
I wrote the below class :
public class DbPerTenantConnectionStringResolver : IDbPerTenantConnectionStringResolver
{
/// <summary>
/// Reference to the session.
/// </summary>
public IAbpSession AbpSession { get; set; }
private readonly ICurrentUnitOfWorkProvider _currentUnitOfWorkProvider;
private readonly ITenantCache _tenantCache;
/// <summary>
/// Initializes a new instance of the <see cref="DbPerTenantConnectionStringResolver"/> class.
/// </summary>
public DbPerTenantConnectionStringResolver(
IAbpStartupConfiguration configuration,
ICurrentUnitOfWorkProvider currentUnitOfWorkProvider,
ITenantCache tenantCache)
{
_currentUnitOfWorkProvider = currentUnitOfWorkProvider;
_tenantCache = tenantCache;
AbpSession = NullAbpSession.Instance;
}
public string GetNameOrConnectionString(ConnectionStringResolveArgs args)
{
if (args.MultiTenancySide == MultiTenancySides.Host)
{
return GetNameOrConnectionString(new DbPerTenantConnectionStringResolveArgs(null, args));
}
return GetNameOrConnectionString(new DbPerTenantConnectionStringResolveArgs(GetCurrentTenantId(), args));
}
public virtual string GetNameOrConnectionString(DbPerTenantConnectionStringResolveArgs args)
{
if (args.TenantId == null)
{
//Requested for host
return GetNameOrConnectionString(args);
}
var tenantCacheItem = _tenantCache.Get(args.TenantId.Value);
if (tenantCacheItem.ConnectionString.IsNullOrEmpty())
{
//Tenant has not dedicated database
return GetNameOrConnectionString(args);
}
return tenantCacheItem.ConnectionString;
}
protected virtual int? GetCurrentTenantId()
{
return _currentUnitOfWorkProvider.Current != null
? _currentUnitOfWorkProvider.Current.GetTenantId()
: AbpSession.TenantId;
}
}
I wrote this in my Entityframework project.
Still the brek point is not hitting.
Am I doing something wrong here ?