I use QML Settings in my application. Therefore, while developing and testing, every time I open the app, it remembers the settings.
How can I clear the settings status so that I can simulate the very first launch of the app by a user? Thanks.
You can specify the file that is used to store the Settings by setting the filename property.
Settings {
filename: "/path/to/my/settings/file"
}
Then when you want to clear the Settings, simply delete the file. Everything should start over with default values after that.
Related
I'm sure - it's very common Q, but I'm new with Azure and don't sure how correctly even google this question.
So - here we have some App service with URL site.com. It have "swap" slot, with URL site-staging.com.
Our deployments scheme is:
CI server > deploy to STAGING > check > if ok then swap to PROD
Questions is: in file Web.staging.config - we have:
key="ida:PostLogoutRedirectUri" value="http://site-staging.azurewebsites.net/admin"
But. After "swap" will be done - URL will be changed to "http://site.azurewebsites.net/admin", while in Web.staging.config - it still will use old value - "http://site-staging.azurewebsites.net/admin".
So - after user will open "http://site.azurewebsites.net/admin" and log in - he will be redirected to "http://site-staging.azurewebsites.net/admin" (taken from Web.staging.config), what is obviously wrong direction.
On similar setup in AWS for example - I'd try to use some variables in my "shell-swap-scripts", to determine that staffs and change config values.
But what about Azure's swapping?
Any tips appreciated.
For all settings that change between slots, the best practice is to configure app settings and connection strings from the Azure portal and not using different web.config files. All settings defined in the portal override the values that may be present in the web.config file (for app settings and connection strings).
You can also define specific-slot settings.
See: https://azure.microsoft.com/en-us/documentation/articles/web-sites-staged-publishing/#configuration-for-deployment-slots
Hope this helps,
Julien
A simple way to configure Application settings that either switch (or do not switch) depending on the slot setting. Information about configuration can be found in the Azure docs:
https://azure.microsoft.com/en-us/documentation/articles/web-sites-staged-publishing/#configuration-for-deployment-slots
Each time I write something into WebStorm IDE Meteor rebuilds. Even if I don't save the files. My computer becomes noisy and hot quickly.
I am looking for a way to prevent Meteor to watch WebStorm temp files.
Does this happen when debugging your code? If yes, this must be a Live Edit issue. Try disabling Live Edit plugin - does it help?
Look at the synchronization section of the system settings page from their documentation
Here's what it says:
Synchronization
Synchronize files on frame or editor tab activation
If this check box
is selected, all the files that were changed externally are reloaded
from disk when you switch to WebStorm from a different application, or
when you you switch to their editor tab.
Save files on frame deactivation
If this check box is selected, all
modified files are auto saved when you switch from WebStorm to a
different application. Note that you cannot disable autosave
completely by turning off this and the following option. See Saving
and Reverting Changes.
Save files automatically if application is idle for N seconds
If this
check box is selected, all modified files are auto saved at regular
time internals. See also, Saving and Reverting Changes.
Use "safe write" (save changes to a temporary file first)
If this
check box is selected, a changed file is first saved in a temporary
file. If the save operation succeeds, the file being saved is replaced
with the saved file. (Technically, the original file is deleted and
the temporary file is renamed.) Also, the ownership of such file
changes. If this check box is not selected, the ownership of a file
does not change, but all the advantages of safe write will be lost.
Try unchecking those checkboxes and see if that prevents some saves.
I had a similar problem in that WebStorm was constantly saving edits to Jade files, even after typing just one character, triggering a gulp watcher. Disabling the Live Edit plugin and unchecking these boxes worked for me. Since disabling Live Edit didn't work for you, maybe unchecking one or more of these boxes will fix it.
Check this meteor specific webstorm help article. There is detailed description on how to configure live edit and code updating and how that would work together with meteor.
I've got a fubu mvc application that only works on local iis if my view files (.cshtml) are copy to output and set as resources (via the properties menu).
However, for them to be picked up on windows azure they need to be set as "copy to output: always" but not set as resources.
Is it possible to change this setting in code or powershell? So I can flip a switch before pushing to azure, then flip it back after?
I'm late to the party but the answer to your question is that .cshtml-files must be set as Build Action: Content under Properties. This is the default build action for MVC-views.
Copy to output directory should be set to Do not copy
I'm trying to use a settings file to store the user preferences when he/she logins on the application.
I defined them as user (scope) but I am getting
System.Configuration.ConfigurationErrorsException: The current configuration system does not support user-scoped settings.
What may be a good solution?
When I had this problem, it turned out that I had a reference to a dll which had a Settings.settings (or Settings.Designer.cs) file.
What happens is that when editing the Setting.settings file, upon clicking the blank line at the bottom, a new line is added with template information and a default user setting instead of application setting. This is a nice feature but you could see how after changing the template and adding your new setting, then clicking below to lose focus a new template line is added and if you are not paying attention, you accidently add a user setting. Check if you have this file in a referenced dll and remove any user settings.
User-scoped settings are indeed not supported for a Web application. And they wouldn't work, User settings would have to be saved under the Users\<username>\... folder on the server.
You have a wide choice of web techniques:
persistent cookies
ASP.NET Membership profiles
your own Db
You can make Application scope settings writable by simply adding a setter to the property definition in Settings.Designer.cs. For instance:
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("AdminContext")]
public string DbContext
{
get { return ((string)(this["DbContext"])); }
set { this["DbContext"] = value; } }
The caveat is that the Settings.Designer.cs is auto-generated, and therefore if you use the designer UI, your setters will be overwritten.
This works in console and web applications.
Is there a configuration file for JobScape where I can specify which jobs to load on startup, the refresh interval etc?
Apparently JobScape that comes with AutoSys 4.5 has no user preference file. You can not specify default values for job specific parameters that you see from the View menu (like what jobs to load on startup, the view levels etc). But there is a preference file for X-Windows resources that you can manually edit to specify default values for X-Windows parameters that you see from the Options menu (like auto reload, refresh interval etc.) In Solaris this file is /usr/openwin/lib/app-defaults/Xpert