Accidentally removed myself (administrative-level user) from a project and I am unable to access/modify it. Is there a way to unlock the project?
I have control and access of the server to execute and back-end commands.
bin/policy unlock PHID-xxxx from the command-line.
Related
I distributed my xaf Winforms+Desktop Bridge app to myself via the Windows Store.
following this blog
From the blog, I want to pre-generate the ModelAssembly.dll, Model.Cache.xafml and ModulesVersionInfo file and package them to go in the output directory.
These files are generated by XAF if they don't already exist.
Where the output directory is given by
Path.GetDirectoryName(GetType().Assembly.Location)
When I install and run my app from the store. I get this error message.
Access to the path 'C:\Program Files\WindowsApps\JobTalk.JobTalk_1.0.19.0_x64__8kpaqbvntb9aj\SBD.JobTalk.Workflow.Win10\ModelAssembly.dll' is denied.
In the code I tried looking form Path.GetRelativePath but it is not available in Framework 4.7.2
In short, UWP app doesn't allow to access files via absolute path. Because UWP apps run in sandbox and have very limited access to the files out of the app container. In most scenarios, the UWP app can directly access only their install folder and their application data folder. Since the converted app also is a UWP app, so your app need to follow this rule.
Please check the Prepare to package a desktop application. The document has mentions some scenarios that is related to your question.
Your application writes to the AppData folder or to the registry with the intention of sharing data with another app. After conversion, AppData is redirected to the local app data store, which is a private store for each UWP app.
Your application writes to the install directory for your app. For example, your application writes to a log file that you put in the same directory as your exe. This isn't supported, so you'll need to find another location, like the local app data store.
Here, there's a special scenario that you could access files via files absolute path. It's a restricted capability called as broadFileSystemAccess. Once you add the broadFileSystemAccess capability, you could use the APIs in the Windows.Storage namespace to get all files that the user has access to. Please read File access permissions for more information.
Please note that the document has explained:
If you submit an app to the Store that declares this capability, you will need to supply additional descriptions of why your app needs this capability, and how it intends to use it.
Xavier's answer explains what was going wrong. The reason it happened on my project was that I missed the step of marking the linked files as "Copy if newer"
How do you save a database in Access 2010 so that the database can be connected to and the queries run from a machine that does not have Access installed? I have read that I can use runtime but can't find how to actually make it so that it can be used in runtime. Is this what the Package Solution Wizard is for or is just a certain file extension? If I do that, will the user have to install it? On my network I am not sure if that is allowed. Can you just email it as a file that doesn't need to be installed? I am really struggling to find much info.
You don't need to make any special preparations in your database for launching under runtime. Launching Microsoft Access with your database is similar to the way you would do so with the regular version of Access. Simply launch the msaccess.exe followed by the name of your database.
You can read more about this for instance here.
Access runtime should be installed on PC first
I am building a Web Application that will be installed many times. The application needs to be able to save certain setting itself upon request.
I have an installer (InnoSetup) but I want to very careful about what permissions I give the Web Application.
I can't use a database.
A default install always leaves the web.config as read-only. (Most secure)
The registry can be problematic. Unless there is a set of keys a DotNet webapp can always write to by default (IIS_IUSR)...
I was considering App_Data, but the default permissions are no longer useful and Inno-Setup can't easily fix it correctly:
https://support.microsoft.com/en-us/kb/2005172
Security and Ease of Setup are both big issues..
I also don't want to make a mess of the machines I install to.
A FAILED solution was to write to the user portion of the registry:
Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Software\\MyCo\\MyApp\\");
var reg = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("Software\\MyCo\\MyApp", true);
reg.SetValue("MyValue", (string)dataString, Microsoft.Win32.RegistryValueKind.String);
But I found out that writing to HKEY_CURRENT_USER is also not allowed by default on Server 2012 and likely others. The server error page is helpful and gives options such as explicitly giving the IUSR_{MachineName} explicit permission but this is a no go for me.
So my final solution is to have the installer create a user configurable folder and then assigning all users Read/Write access to that folder. The administrator can always lock it down more if they want.
If anyone has a better option then let me know.
With InnoSetup I created a new Wizard page to suggest and collect a Data folder from the user. The installer then:
Created that folder and gave All Users Read/Write access,
Added a HKLM registry key telling the Web App where to look for the folder,
Notified the user that they should lock the folder down further to prevent abuse.
Got an ASP.NET site which I wish to perform an SVN info call from.
My understanding is this error message appears when a user hasn't yet done their basic setup to use SVN. Specifically there is a folder a few steps under AppData named Subversion which when not present and properly configured, shows the aforementioned message.
The ASP.NET site is running under the account "NetworkService" whose AppData folder I cannot find. I was planning to copy & paste the Subversion folder, as it's not easy to do an actual log in as NetworkService.
How can I proceed using NetworkService so that the "svn info" can also proceed?
Thanks in advance--
FYI: Using SharpSvn as a wrapper. Doubt that matters, but there you go
add this line before you authenticate and or perform any svn event.
client.LoadConfiguration(Path.Combine(Path.GetTempPath(), "Svn"), true);
I'm working on Mac App Store sandboxing but have an app that was rejected from the store based on detected read/write access to an SQLite database file located in my .APP bundle. However, I only need read access to this file, so the .APP bundle is a good location. I'm using FMDB, which by default opens SQLite databases using sqlite3_open unless you call FMDB's openWithFlags: method, which instead calls sqlite3_open_v2 using the flags parameter.
My question: If I use sqlite3_open_v2 with the SQLITE_OPEN_READONLY flag, is it equivalent to file system read-only access? If read-only access to the database means something different than file system read-only access, then the app will be rejected again. The SQLite documentation for SQLITE_OPEN_READONLY states (http://www.sqlite.org/c3ref/open.html):
"The database is opened in read-only mode. If the database does not already exist, an error is returned."
But, this doesn't seem to answer my question.
I submitted my app with the SQLITE_READ_ONLY flag, and the app was accepted to the App Store. This leads me to believe that the SQLITE_OPEN-READONLY flag is equivalent to file system read-only mode.