Sometimes, not always, when I login to my ASPNETZERO app, I get returned a .json file instead of the Home/Index page. This is the contents of the .json file;
{ "targetUrl": "/Application/Index", "success": true, "result": null, "error": null, "unAuthorizedRequest": false }
Why does this happen? It might be that this sometimes only happens after I have re-published the web app - is it that the app is not ready yet?
Thanks, Andy
Hi, Does anyone have any experience of redistributing an ASPNETZERO project with some form of either copy-protection or licensing (trial/time period etc.)?
My initial thought, is to simply use obfuscation and supply the customer with a unique dll compiled specifically with their own domain name as a hard coded check within the login page and/or perform some sort of date check. Is this appropriate? I was also thinking about an Azure Cloud based verification/licensing solution. How best to protect our product from unwanted distribution and hosted on other servers?
Any advice is much appreciated.
Thanks.
Does the inbuilt modalManager allow me to reference a common modal.cshtml and .js located in the Mpa/Views/Common/Modal folder or do I have to duplicate the modal.cshtml and .js files into each view folder I want to initiate the modal? Example: I have a modal to display information about a computer, but I want to open this modal from many different views - but I don't want to maintain/update ComputerModal.cshtml in all view folders.
I have added some additional settings to general and can successfully set and store these in the database. I just duplicated how the WebSiteRootAddress setting worked.
If I have a controller, how do I retrieve a setting? I have tried having "using abp.configuration;" at the top of the controller, and trying something like
var value2 = SettingManager.GetSettingValue("somestoredsetting");
results in VS showing "'SettingManager' does not contain a definition for 'GetSettingValue'".
What am I missing? Do I need to use the @Model method of code that the Settings.cshtml page uses to retrieve settings?
Hi,
When I publish Release to IIS, I am missing the jstree layout style/checkboxes when I view Roles/Permissions. OK when using local VS IISExpress debug. Is this another bundle config issue?
Hi, where do I configure to have the Mpa application start with the /Account/Login page? If I tick the 'remember me' option, should it then also take me straight into dashboard or still present the login page? Also, I am using Mpa only, so what sections/folders within Visual Studio can I safely remove from my project?
Hi, How can I update the bootstrap components within my ASPNETZero project to latest pre-release version? Do I just use "Install-Package bootstrap -Pre" or will that not work? I am finding that the standard col size classes are far too outdated and dashboard starts to look silly with large portlets on high resolution displays (Most people have 1920x1080p monitors and even Surface Pro has 2560 width!). 4K screens are now appearing on a few people desks, which have 3000+ resolution!
I tried adding the BootStrapXL.css and although I can reference the col-xl- classes in code, metronic/aspnetzero does not seem to create portlets that work, for instance in xl mode (>1600) each portlet was set to col-xl-2 but they still appear as col-lg-3.
Do you have advice or perhaps customisation for adding xl and xxl col size classes? (xl I think should be >1600 and xxl should be >2500).
I'd like to integrate the JQuery.CounterUp.js module into my solution. I had this working when I was using webforms, but I am struggling with ASPNETZERO.
I have figured out that I should include a @section Scripts in my view page, and I do have some working code in there that uses AJAX to retrieve some data and populate this into the DOM. However, I do not seem to be able to get the CounterUp module working. I added the script src entries for the waypoint and counterup js files into my script section and I have a span class=counter in my DOM, but when I run the page I get:
Error: Unable to get property 'replace' of undefined or null reference
That error is coming from the counterup.js.
Help!?
Hi,
In my web forms based version of my application, I have centralised my navigation menu by having the code for it inside a User Control, and I reference the UC on each page. This saves greatly when adding new pages/menu items as I do not need to amend all the existing pages. I realise that ASP.NET Zero accomplishes this centralisation for me, which is a very good thing, however I wish to amend the code for the whole menu tree that gets generated.
Specifically, I wish to be able to identify LI items in the menu system by assigning them an ID=value, so that I can do something with the menu in client-side JavaScript once the page is ready. The code snippet below is what I want to be able to do...
<li class="nav-item" id="menu-parent01">
<a href="javascript:;">
<i class="icon-puzzle"></i>
<span class="title">Parent 01</span>
<span class="arrow "></span>
</a>
<ul class="sub-menu">
<li class="nav-item start" id="menu-parent01-child01">
<a href="/parent01/child01.aspx">
<i class="icon-grid"></i>
Child 01</a>
</li>
<li class="nav-item" id="menu-parent01-child02">
<a href="parent01/child02.aspx">
<i class="icon-globe"></i>
Child 02</a>
</li>
<li class="nav-item" id="menu-parent01-child03">
<a href="parent01/child03.aspx">
<i class="icon-screen-desktop"></i>
Child 03</a>
</li>
Why? In short, I am dynamically adding sub-items to the Nav-Menu using JavaScript, to represent temporary/dynamic pages that exist in my application when the user drills through into data. For instance, when they drill through a list of computer names they get a page containing details of that computer, and the Nav Menu is modified to include a sub-menu item which shows the name of the computer they are looking at.
So, where do I start? I can see that the mpaNavigationProvider.cs provides for a "customData" parameter? Is this where I might be able to add an ID when I perform the .AddItem(new MenuItemDefinition...)
Thanks,
Andy
I have noticed that when I publish my website to an IIS server (local or remote) there seems to be an issue that prevents the site from locating some of the .png files used in the css. When I build/run the project in VS using the inbuilt IISExpress, everything renders correctly and using Google Chrome to inspect the page I see that the menu-toggler in the light.css is resolved to "http://localhost:6234/metronic/assets/admin/layout4/img/sidebar-toggle-light.png".
However, when the site is published to IIS, the debug tools in chrome show error 404 when trying to find the .png files for the menu-toggler and the close button on the sample note portlet. Using the Google Chrome Page inspector the url it is looking for do not exist:
"http://mysite.mydomain.com/Bundles/img/sidebar-toggle-light.png" "http://mysite.mydomain.com/Bundles/Mpa/img/remove-icon-small.png"
In fact, you can see the second url there is also different from the first, even though the .png files are in the same folder. I verified that both files exist by typing in their URL manually as below, and they exist.
"http://mylivesite.mydomain.com/metronic/assets/admin/layout4/img/sidebar-toggle-light.png" "http://mylivesite.mydomain.com/metronic/assets/global/img/remove-icon-small.png"
So there doesn't seem to be a file missing/publishing error - more some sort of code/IIS issue with how the 'bundle' config works?
What gives?