Base solution for your next web application

Activities of "otgontugsmiimaa"

Answer

If i understand you correctly, for example if you had given a name "SampleProject1", you should just publish SampleProject1.Web project in your solution to a local folder and copy it to your server. The other projects are referenced to SampleProject.Web and published together. The entry point is Global.asax file in SampleProject.Web :p

Question

I've hosted a sample Aspnetzero multitenant web on web1.mydomain.com. And i want to access tenant1.web1.mydomain.com.

So I added "*.mydomain.com" dns host string with an static IP and on IIS, bound web1.mydomain.com to the static IP address. When i access tenant1.web1.mydomain.com, i get HTTP Error 404.

Is there something i'm missing?

I also tried "*.web1.mydomain.com" dns string with no success.

Answer

Forgot to mention it. This setting was also defined. http://{TENANCY_NAME}.web1.mydomain.com/

Answer

Yes i've waited for the host to update dns. Now i can ping default.web1.mydomain.com and its pointing to my host.

Putting "127.0.0.1 default.web1.mydomain.com" in hosts file the same result. In IIS, web1.mydomain.com is bound to All assigned IP addresses. Any other clue?

Answer

Yes it's on port 80. There is a separate website working on mydomain.com and <a class="postlink" href="http://www.mydomain.com">www.mydomain.com</a> names.

ASP.NETZero demo is located in different folder and different IIS website bound to web1.mydomain.com.

PS: It seems IIS misconfiguration. When i added a binding tenant1.web1.mydomain.com to the IIS website, it worked. Thank you

Hi there, I'd like to organize an entity which have name and image attributes like:

public class User 
{ 
public string Name{get;set;}; 
public "sometype_for_storing_image" ProfileImage{get;set;}; 
}

I've a input form <input type=text name=Name/> <input type=file name=ProfileImage/>. Then i need to save the form data to the database.

Can "sometype_for_storing_image" be BinaryObject class? If yes what would the DTO, form and JS look like?

I've seen GetProfilePicture, ChangeProfilePicture actions in ProfileController example. But it uses angular fileUploader module. This is non-transactional and i don't want to store bunch of useless images if form data is invalid.

Thanks

Question

Hi Halil,

There's a case that needs your suggestion. Restaurant(a restaurant is a tenant in my case) staffs are tenant users for adding/updating restaurant informations (such that open hours, menu prices, events, pictures etc.,). All other people are registered as a host user and can search restaurant informations, order a table, comment, rate ...

It seems 'host users' are for 'admin' users. Am i right? But i want to create a new form that registers a user without a tenant. So all users except restaurant staffs are host users and tenants have no users other than staffs. Is it acceptable solution?

Thanks in advance.

That's exactly what i want to hear. Thank you :)

Hi,

I decided to develope a web which is based on ASP.NET Zero Front end. But i want to use AngularJS to call Application service methods. So i included following refs in FrontEndBundleConfig.cs:

bundles.Add(
                new ScriptBundle("~/Bundles/Frontend/libs/js")
                    .Include(
                        ScriptPaths.Json2,
                        ScriptPaths.JQuery,
                        ScriptPaths.JQuery_Migrate,
                        ScriptPaths.Bootstrap,
                        ScriptPaths.Bootstrap_Hover_Dropdown,
                        ScriptPaths.JQuery_Slimscroll,
                        ScriptPaths.JQuery_BlockUi,
                        ScriptPaths.JQuery_Cookie,
                        ScriptPaths.SpinJs,
                        ScriptPaths.SpinJs_JQuery,
                        ScriptPaths.Angular,
                        ScriptPaths.Angular_Sanitize,
                        ScriptPaths.Angular_Touch,
                        ScriptPaths.Angular_Ui_Router,
                        ScriptPaths.Angular_Ui_Utils,
                        ScriptPaths.Angular_Ui_Bootstrap_Tpls,
                        ScriptPaths.Angular_Ui_Grid,
                        ScriptPaths.Angular_OcLazyLoad,
                        ScriptPaths.Angular_File_Upload,
                        ScriptPaths.Angular_DateRangePicker,
                        ScriptPaths.SweetAlert,
                        ScriptPaths.Toastr,
                        ScriptPaths.MomentJs,
                        ScriptPaths.Abp,
                        ScriptPaths.Abp_JQuery,
                        ScriptPaths.Abp_Toastr,
                        ScriptPaths.Abp_BlockUi,
                        ScriptPaths.Abp_SpinJs,
                        ScriptPaths.Abp_SweetAlert,
                        ScriptPaths.Abp_Angular
                    ).ForceOrdered()
                );

And then added following codes to _Layout.cshtml:

<body class="corporate" ng-app="MyApp" ng-cloak>

Also in /Views/Home/Index.cshtml

@Html.IncludeScript("~/Views/Home/Index.js")

Created a new JS file /Views/Home/Index.js and added following code to it:

(function () {
    'use strict';
    angular
        .module('MyApp', ['ngMaterial', 'abp'])
        .controller('DemoCtrl', ['$scope', 'abp.services.app.carModel', 
    function ($scope, carModelService) {
        var self = this;
        self.carModels = {};

        function init() {
            self.carModels= carModelService.getCarModels({}).success(function (data) {
                self.carModels = data.items;
            }).finally(function () {                
            });
        }

        init();
    }
])
})();

When i run the project following error is thrown: <a class="postlink" href="https://docs.angularjs.org/error/$injector/unpr?p0=abp.services.app.carModelProvider%20%3C-%20abp.services.app.carModel%20%3C-%20DemoCtrl">https://docs.angularjs.org/error/$injec ... 20DemoCtrl</a>

Please help me to find what i did wrong?

Oh sorry i forgot these.


    <script src="~/api/AbpServiceProxies/GetAll?type=angular&v=@(Clock.Now.Ticks)"></script>
    <script src="~/api/AbpServiceProxies/GetAll?v=@(Clock.Now.Ticks)"></script>
    <script src="~/AbpScripts/GetScripts?v=@(Clock.Now.Ticks)" type="text/javascript"></script>
Showing 1 to 10 of 14 entries