No edit summary |
(Automatically adding template at the end of the page.) |
||
(12 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
If you name a folder | If you name a folder as <ModelName>[[_AssetsTK]] and put it next to your <ModelName>.[[modlr]] file, or <ModelName>.[[ecomdl]] file, the following will happen: | ||
* <ModelName>_AssetsTK will be included in the Model sent to MDrivenServer when you Upload the model | * <ModelName>_AssetsTK will be included in the Model sent to MDrivenServer when you Upload the model. | ||
* Once on the server MDriven Turnkey will unpack the folder in AppData under the name | * Once on the server, MDriven Turnkey will unpack the folder in AppData under the name <code>ExtractForExpansionInSite_AssetsTK</code>. | ||
* Once extracted to ExtractForExpansionInSite_AssetsTK the MDriven Turnkey application will try | * Once extracted to <code>ExtractForExpansionInSite_AssetsTK</code>, the MDriven Turnkey application will try to mirror the contents of the following folders from <code>ExtractForExpansionInSite_AssetsTK</code> to AppRoot: | ||
''Filename/folder example | ''Filename/folder example:'' | ||
If your modlr filename is '''products.azurewebsites.net__MDrivenServerA0.modlr''' | If your modlr filename is '''products.azurewebsites.net__MDrivenServerA0.modlr,''' name your folder '''products.azurewebsites.net__MDrivenServerA0_AssetsTK''' | ||
Note! | Note! Replace the file extension with '''_AssetsTK'''. | ||
{| class="wikitable" | {| class="wikitable" | ||
!Folder name | !Folder name | ||
!Special purpose | !Special purpose | ||
|- | |- | ||
|EXT_LateBoundAssembly | |EXT_LateBoundAssembly | ||
|When extending your | |When extending your Turnkey app with C# built logic, your assemblies go here | ||
|- | |- | ||
|EXT_Scripts | |EXT_Scripts | ||
|Use this to add | |Use this to add your own js files. Add [[AppWideAngularScriptIncludes]].html here and contents will be added to scripts in the app. This is necessary to load things before AngularJS compiles as you need when creating directives. | ||
|- | |- | ||
|SiteAssets | |SiteAssets | ||
| | |General purpose | ||
|- | |- | ||
|Content | |Content | ||
|This is where the tkusercss.css should be. If you have it, it will be included | |This is where the [[tkusercss]].css should be. If you have it, it will be included on your page. | ||
|- | |- | ||
|Views\EXT_OverridePages | |Views\EXT_OverridePages | ||
| | |Add your cshtml files here - either name it as a ViewModel to override the whole page or put a matching name as you have in the Content Override ViewModel column in the AngularUIOverride tagged value. | ||
|- | |- | ||
|other names | |other names | ||
|You may have any folder depth with any content with special assets and plugins - they will be replicated on server side | |You may have any folder depth with any content with special assets and plugins - they will be replicated on the server side. | ||
| | |- | ||
| | |. | ||
|Files put in the root of _AssetsTK will be mirrored to the application root. This is where you put a favicon.png that shows in the browser tab. | |||
|} | |} | ||
This enables you to merge your own | This enables you to merge your own CSS, styles, and C# assemblies for C# developed logic. | ||
==== Deleting | ==== Deleting Files That Were Copied But Should Be Removed ==== | ||
To delete a file by this file replication you must append .DELETE as an extension. The file copying logic will look for /xxx/something.ext and delete it | To delete a file by this file replication, you must append .DELETE as an extension. The file copying logic will look for <code>/xxx/something.ext</code> and delete it whenever it finds a file <code>/xxx/something.ext.DELETE</code> in the replicated data. | ||
==== Practical | '''Update 2019-06-15.''' Since it has proved cumbersome to use the <code>.DELETE extension</code>, we have introduced the special file ''CleanAll.txt''. If you put such a file in the root level of your AssetsTK directory, all known places and names of assets will be cleaned to the default state. The reason this is done sometimes is that when doing massive file changes on the server, it may restart with this showing up in the log "shutDownMessage Change Notification for critical directories". The ideal way to avoid restarts is to touch as few files as possible - this is what we normally do during expansion. However, sometimes you may want to start over - then use the CleanAll.txt file (the file can be empty). | ||
==== Practical Issues Identified ==== | |||
[[File:2016-12-20 11h23 57.png|thumb|none]] | [[File:2016-12-20 11h23 57.png|thumb|none]] | ||
When using the AssetsTK file copy strategy you may have issues with file creation permissions on the server. Check that the IIS_IUSRS has sufficient rights in App_Data. | When using the AssetsTK file copy strategy, you may have issues with file creation permissions on the server. Check that the IIS_IUSRS has sufficient rights in App_Data. | ||
You may find a file called ExtractForExpansionInSite.log in App_Data. This will explain further issues with file creation: | You may find a file called '''ExtractForExpansionInSite.log in App_Data'''. This will explain further issues with file creation: | ||
<code>Problem expanding AssetsTK:Access to the path 'C:\inetpub\wwwroot\MTTK\App_Data\..\Content\Something.png' is denied.</code> | <code>Problem expanding AssetsTK:Access to the path 'C:\inetpub\wwwroot\MTTK\App_Data\..\Content\Something.png' is denied.</code> | ||
Line 61: | Line 52: | ||
<code>Time: 11:19:12</code> | <code>Time: 11:19:12</code> | ||
If this is the case | If this is the case, fix it by giving access to the IIS user. | ||
More on practical CSS work with Turnkey: [[MDriven_Turnkey_theming]] | |||
[[Category:UI]] | [[Category:UI]] | ||
[[Category:MDriven Turnkey]] | [[Category:MDriven Turnkey]] | ||
{{Edited|July|12|2024}} |
Latest revision as of 15:48, 10 February 2024
If you name a folder as <ModelName>_AssetsTK and put it next to your <ModelName>.modlr file, or <ModelName>.ecomdl file, the following will happen:
- <ModelName>_AssetsTK will be included in the Model sent to MDrivenServer when you Upload the model.
- Once on the server, MDriven Turnkey will unpack the folder in AppData under the name
ExtractForExpansionInSite_AssetsTK
. - Once extracted to
ExtractForExpansionInSite_AssetsTK
, the MDriven Turnkey application will try to mirror the contents of the following folders fromExtractForExpansionInSite_AssetsTK
to AppRoot:
Filename/folder example:
If your modlr filename is products.azurewebsites.net__MDrivenServerA0.modlr, name your folder products.azurewebsites.net__MDrivenServerA0_AssetsTK
Note! Replace the file extension with _AssetsTK.
Folder name | Special purpose |
---|---|
EXT_LateBoundAssembly | When extending your Turnkey app with C# built logic, your assemblies go here |
EXT_Scripts | Use this to add your own js files. Add AppWideAngularScriptIncludes.html here and contents will be added to scripts in the app. This is necessary to load things before AngularJS compiles as you need when creating directives. |
SiteAssets | General purpose |
Content | This is where the tkusercss.css should be. If you have it, it will be included on your page. |
Views\EXT_OverridePages | Add your cshtml files here - either name it as a ViewModel to override the whole page or put a matching name as you have in the Content Override ViewModel column in the AngularUIOverride tagged value. |
other names | You may have any folder depth with any content with special assets and plugins - they will be replicated on the server side. |
. | Files put in the root of _AssetsTK will be mirrored to the application root. This is where you put a favicon.png that shows in the browser tab. |
This enables you to merge your own CSS, styles, and C# assemblies for C# developed logic.
Deleting Files That Were Copied But Should Be Removed
To delete a file by this file replication, you must append .DELETE as an extension. The file copying logic will look for /xxx/something.ext
and delete it whenever it finds a file /xxx/something.ext.DELETE
in the replicated data.
Update 2019-06-15. Since it has proved cumbersome to use the .DELETE extension
, we have introduced the special file CleanAll.txt. If you put such a file in the root level of your AssetsTK directory, all known places and names of assets will be cleaned to the default state. The reason this is done sometimes is that when doing massive file changes on the server, it may restart with this showing up in the log "shutDownMessage Change Notification for critical directories". The ideal way to avoid restarts is to touch as few files as possible - this is what we normally do during expansion. However, sometimes you may want to start over - then use the CleanAll.txt file (the file can be empty).
Practical Issues Identified
When using the AssetsTK file copy strategy, you may have issues with file creation permissions on the server. Check that the IIS_IUSRS has sufficient rights in App_Data.
You may find a file called ExtractForExpansionInSite.log in App_Data. This will explain further issues with file creation:
Problem expanding AssetsTK:Access to the path 'C:\inetpub\wwwroot\MTTK\App_Data\..\Content\Something.png' is denied.
Time: 11:19:12
If this is the case, fix it by giving access to the IIS user.
More on practical CSS work with Turnkey: MDriven_Turnkey_theming