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

Activities of "daws"

Hello everyone,

I'm looking to secure/licence/encrypt my software because it will be deployed on client side.

I want to prevent them to :

  • run the soft if they don't have a licence
  • do a reverse engineering on the code for the reverse engineering part, I use dotnetfuscator.

For the software utilisation, I was thinking about using an HASP key (sentinel dongle) which has to be plugged onto the server (usb port). There is also the fact that aspnetzero use his own "AbpZeroLicenseCode" mecanism to prevent unauthorized use of its code.

Has anyone has already thought about the use of HASP keys in the ABP environement ?

Or can we achieve the licensing with another way ? (a little bit more like "AbpZeroLicenseCode") Knowing that the client server can access in theory to internet, but could be disconnected for 2-3 days for example.

If you have any thoughts on how to prevent the execution of the software (HASP key, online licencing verification, ...) & where it's the best way to use it with abp framework; let me know ;)

thanks, daws

Dear support,

i've deployed successfully my app on production server (cf case 1 below) and works fine (intranet & internet).

Now (case 2), I try to launch the client (angular-cli on my VSCode) from outside the production server and use the remote Web.Host as backend. Goal is to allows me to develop some UI stuff with my production data.

I think it's only related to my network configuration but I want to make sure I didn't forgot anything on my settings.

<ins>Global details</ins>

  • aspnetzero 5.0.6 .net with separate host (.net core) and client (angular)
  • IIS server on private remote server (NOT azure)
  • IIS routing module installed, all other installation of IIS is ok (application Pool, web.config, etc)
  • LOCAL : development machine (behind router)
  • PRODUCTION : external web server (IIS on internet public accessible server)

<ins>Case 1 : everything (Web.Host and angular) on PRODUCTION server</ins>

Everything works fine as expected.

<ins>Angular</ins>

"remoteServiceBaseUrl": "http://PRODUCTION-public-ip:5000",
"appBaseUrl": "http://PRODUCTION-public-ip:4200",

<ins>Web.Host</ins>

"App": {
	"ServerRootAddress": "http://PRODUCTION-public-ip:5000/",
	"ClientRootAddress": "http://PRODUCTION-public-ip:4200",
	"CorsOrigins": "http://PRODUCTION-public-ip:4200"
},

<ins>Case 2 : PRODUCTION Web.Host accessed from angular LOCAL</ins>

<ins>Details</ins>

  • all firewall are disabled (on PRODUCTION and LOCAL side)
  • angular-cli launched from VSCode
  • NSWAGGER HTTP Interface from Web.Host PRODUCTION is accessible from internet.
  • development machine is under intranet connected & accessible from internet
  • router forward TCP 4200 between external and development machine (port check + communication is ok)
  • Angular App (launched from vsCode) is accessible from intranet AND internet. (but it only throws back the error)

<ins>Angular</ins>

"remoteServiceBaseUrl": "http://PRODUCTION-public-ip:5000",
"appBaseUrl": "http://LOCAL-public-ip:4200",

<ins>Web.Host</ins>

"App": {
	"ServerRootAddress": "http://PRODUCTION-public-ip:5000/",
	"ClientRootAddress": "http://LOCAL-public-ip:4200",
	"CorsOrigins": "http://LOCAL-public-ip:4200"
},

with angular-CLI launched via differents parameters for test :

  • ng server ==> (<a class="postlink" href="http://localhost:4200">http://localhost:4200</a>)
  • ng server --host LOCAL-local-ip ==> (<a class="postlink" href="http://LOCAL-">http://LOCAL-</a>local-ip:4200)
  • ng server --host LOCAL-public-ip ==> (<a class="postlink" href="http://LOCAL-">http://LOCAL-</a>public-ip:4200) but, when i start the angular-app, i've ""An error has occured!" Error detail not sent by server. No log available on Web.Host\App_Data\Logs\Logs.txt or on vscode server.

so, angularApp is accessible from intranet+internet but doesn't seems to communicate with the server correctly.

Do you see anything that i did wrong ?

Regards,

daws

Hello there,

Is it possible to include the whole app (AspNet zero 5.0 core+angular) on an iframe ? (meaning no restriction on your side) i suppose i'll need to adjust CORS permissions.

I made a quick test but it gave me a blank page, so i quick ask before modify everything :mrgreen:

thanks !

Hello there,

my current project is #3 ASP.NET MVC 5.x + ANGULARJS 1.x. i would like to go to #1 ASP.NET CORE + ANGULAR 4.x

but ... i've a custom angular app (another than the Dashboard) that will remains in angular 1.X for at least 2017.

i would like to know the possibility to use ASP.NET CORE + angular 4.X Dashboard + custom app angular 1.X.

knowing that this custom app uses permissions, features, AppService from backend.

Does JS interfaces with AppServices are the same in the latest project and old ?

or does all abp. services in JS are migrated to angular2 ? or maybe i can use the new abp. services for Dashboard; and the old one with angular 1.X; if the backend is still the same.

thanks for your help

Hello there,

I was using ODATA in single tenant, it worked fine.

But when I want to use it in excel, I think this is not possible since excel does not know the "tenant".

I see a workaround : create a webservice independant for each service, exposing ODATA on different port.

Do you know a better solution ?

Afterwards , i'll to look into : #815@7b73e6f2-1140-4638-984c-1d3d497d71cb because we'll need to secure ODATA in excel.

thanks for your help :)

Hello there,

ABP SPA is defined in /App/ which contains the full Dashboard code from aspnetzero.

i'm using the Dashboard SPA and another SPA for my main application.

I made Something like : /App/Dashboard => admin interface /App/Main => main app

Best practice is to define 1 sub folder by SPA app, i think.

it works fine, but each time a release of the admin interface is out, I've to rewrite all paths with the new folder when I copy/paste the full interface admin.

is it a possibility in ABP Template to set a folder for the admin interface ? like App/Abp or App/admin or Something else ? to allow the project to get multiple SPA.

another possibility is to leave App like that, and create AppMain to the base of my project. But it's against angular convention rule :)

Hello,

I have a console which runs multiple operations on multiple database.

rather than use SetTenantId in the Manager (too much change, don't match with my app logic), i would like to modify the IAbpSession on the fly to use the UnitOfWork with the correct database.

Right now (based on your sample), I ovveride the AbpSession in the PreInitialize of my module. Can i replace it anywhere in my code, and how ?

[DependsOn(typeof (SSSSDataModule), typeof (SSSSApplicationModule))]
    public class SSSSSServerAppModule : AbpModule
    {
        public override void PreInitialize()
        {
            //Suppress authentication and permission checking for the application, register as tenant configured in app.config
            IocManager.Register<IAbpSession, TenantAppSession>();
            IocManager.Register<IPermissionChecker, NullPermissionChecker>();
        }

        public override void Initialize()
        {
            IocManager.RegisterAssemblyByConvention(Assembly.GetExecutingAssembly());
        }
    }

thanks for your help !

Hello there !

i'm moving my architecture to an database per tenant approach. My app will have connected users and public (anonymous) users.

my main app could be accessed by logged user (full function) or anonymous user (restricted function) but both of them use data specific from each tenant.

So, I need that an anonymous user which retrieve the index.cshtml from HomeController have the tenantId to retrieve WebAPI requests from the correct database.

Based on the {TENANCY_NAME}.mydomain.com (or other full url); i could know which tenant is requested in my homeController. Is it possible to have the tenantId set somewhere for the anonymous user ?

I could include the tenant Id manually in each request to WebAPI, but it seems not efficient at all since it's already implemented in ABP based on the user session.

my HomeController is like this right now :

[AbpMvcAuthorize]
public ActionResult Index()
{
	return View(AbpSession.TenantId != null ? "~/App/Main/views/index.cshtml" : "~/App/Dashboard/common/views/layout/layout.cshtml");

I would like to go somewhere like this :

[AllowAnonymous]
public ActionResult Index()
{
	if (AbpSession == null)
	{
		//set the session to anonymous user with specific tenant Id based on subdomain
	}
   return View(AbpSession.TenantId != null ? "~/App/Main/views/index.cshtml" : "~/App/Dashboard/common/views/layout/layout.cshtml");

Thanks for your help !

Hi guys,

I struggle a little bit to understand methodoly of creating a new tenant in "Single Deployment - Multiple Database".

I would like to create default DB for host (managing editions/tenants), and a sub DB foreach tenant (different connection string).

regarding this code

if (Tenant == null)
{
	//Host seed
	new InitialHostDbBuilder(context).Create();

	//Default tenant seed (in host database).
	new DefaultTenantBuilder(context).Create();
	new TenantRoleAndUserBuilder(context, 1).Create();

	new InitialCustomDbBuilder(context).Create();
}
else
{
	//new TenantRoleAndUserBuilder(context, Tenant.Id).Create();
	//new InitialCustomDbBuilder(context).Create();
}

is the default tenant mandatory ? (even if we don't use it)

new DefaultTenantBuilder(context).Create();
new TenantRoleAndUserBuilder(context, 1).Create();

if the seed run into the else{} method (tenant creation, when we specify a connectionstring in dashboard), do we need to change the connectionstring with this method to set seed into the correct db ?

(_unitOfWorkManager.Current.SetTenantId(tenantId))

Thanks for your help! ;)

Question

Hello there !

In my .web project,I have 2 SPA.

  • /App/Dashboard (aspnetzero)
  • /App/MainApp

I would like to use 2 differents xml localization files foreach SPA.

When I define ""ConstsLocalizationSourceName = "Dashboard"" it works fine for the dashboard but not for "MainApp". When I define ""ConstsLocalizationSourceName = "MainApp"" it works fine for the MainApp but not for Dashboard.

It's perfectly logic.

I would like to keep all my solution with ""ConstsLocalizationSourceName = "Dashboard"". (for all dashboard SPA & MVC view [login etc]))

In my "MainApp", i'll configure the layout page with "MainApp" localization souce name.

It also works fine when I do this way : abp.localization.localize('Loading', 'MainApp'));

In the header of layout.cshml of MainApp, I set thi script :

<script>
        abp.localization.defaultSourceName = "Mainapp";
        moment.locale('@Thread.CurrentThread.CurrentUICulture.Name.Left(2)'); //Localizing moment.js
    </script>
<header>
    <script type="text/javascript">
        //This is used to get the application's root path from javascript. It's useful if you're running application in a virtual directory under IIS.
        var abp = abp || {}; abp.appPath = '@ApplicationPath';
    </script>
    @Scripts.Render("~/Bundles/App/vendor/js")
    <script>
        abp.localization.defaultSourceName = 'WebAero';
        moment.locale('@Thread.CurrentThread.CurrentUICulture.Name.Left(2)'); //Localizing moment.js
    </script>
	... // Loading my app js files
	</header>
	<body>
	    <li>
                        <label>
                            @L("ShowAll")
                        </label>
                    </li>			
	</body>
in this last example, @L("ShowAll") is not loading.
Is it possible to do like I did ?
If yes, when is it the correct time to set the abp.localization.defaultSourceName in JS ? after/before abp/MyApp scripts; before the page loading, ... etc

thks for the help !
Showing 21 to 30 of 44 entries