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

Activities of "daws"

Download hangfire project example from official hangfire website.

It has multiple example : console, Windows service, ...

for example, abp implementation in hangfire console :

(which is just hangfire official example encapsulated in abpboostrapper :) ) (nb I use nlog, change it to your log provider)

class Program
    {
        static void Main()
        {
            //Bootstrapping ABP system
            using (var bootstrapper = new AbpBootstrapper())
            {
                IocManager.Instance.IocContainer.AddFacility<LoggingFacility>(f => f.UseNLog().WithConfig("NLog.config"));

                bootstrapper.Initialize();

                LogProvider.SetCurrentLogProvider(new ColouredConsoleLogProvider());

                const string endpoint = "http://localhost:12345";

                using (WebApp.Start<Startup>(endpoint))
                {
                    Console.WriteLine();
                    Console.WriteLine("{0} Hangfire Server started.", DateTime.Now);
                    Console.WriteLine("{0} Dashboard is available at {1}/hangfire", DateTime.Now, endpoint);
                    Console.WriteLine();
                    Console.WriteLine("{0} Type JOB to add a background job.", DateTime.Now);
                    Console.WriteLine("{0} Press ENTER to exit...", DateTime.Now);

                    string command;
                    while ((command = Console.ReadLine()) != String.Empty)
                    {
                        if ("job".Equals(command, StringComparison.OrdinalIgnoreCase))
                        {
                            BackgroundJob.Enqueue(() => Console.WriteLine("{0} Background job completed successfully!", DateTime.Now.ToString()));
                        }
                    }
                }


            }

        }
    }

Re hello there ;)

After some tests, ALWAYS with [AbpApiAuthorize]n here some results

With postman : <a class="postlink" href="http://localhost:6235/odata">http://localhost:6235/odata</a> : $metadata retrieved for abpodataentitycontroller <a class="postlink" href="http://localhost:6235/odata/Persons">http://localhost:6235/odata/Persons</a> : access denied

from excel, giving this url as oData flux: <a class="postlink" href="http://localhost:6235/odata">http://localhost:6235/odata</a> : access granted to Persons table data (& all other data) <a class="postlink" href="http://localhost:6235/odata/Persons">http://localhost:6235/odata/Persons</a> : access denied (but if i can access it via the url just on previous line, it does not help us :mrgreen: )

and the following method to authentificate

  • anonymous
  • windows
  • basic
  • api Web (asking for a key), -> could be the one
  • marketplace key
  • profesionnal account

Is it planned on your side ton investigate further on this ?

it will be necessary for me in few weeks. :cry:

I could provide an excel 2016 proplus account (365, in english) to test it, if necessary and a fee if not planned on your side :)

Thks for your help ;)

Is it a possibility to integrate secure access atribute for odata soon ?

Thanks ;)

It was resolved with 0.8.1 (<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/864">https://github.com/aspnetboilerplate/as ... issues/864</a> ) did you get the latest nuget version ? ;)

Adding the [AbpApiAuthorize] give me the http call with "Authorization has been denied for this request."

But when I use this flux on excel (2016), I can access all data without login request :( ;)

Works like a charm !

thanks for the 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 !
Question

Hello there,

I start using OData to create a lot of reporting via excel powerBI.

Is it possible to secure odata calls with login ? via module zero or other form. (it's possible for odata; but how can I do it with ABP ;) )

Hello there,

In settings Management doc, it's specified that values are string and "We can store non-string values by converting to string".

Related to this sample :

//Getting a boolean value (async call)
var value1 = await SettingManager.GetSettingValueAsync<bool>("PassiveUsersCanNotLogin");

Is there a possibility to use GetSettingValueAsync<double> ? (for retrieving 0.2 value from "0.2" stored value. right now it's converted to "2")

if not, i could still convert it myself after retrieving the string.

thks for the help !

Had the same stuff for weeks ... I was going to throw my computer out of the window :lol:

Thanks for the investigation ;)

Showing 71 to 80 of 127 entries