I'm developing a web application in which I want to insert users and be able to display files that they upload via a search option. I can get all of the logic that I need sorted and the files uploaded into the correct directory. However, if I insert a new user into the db, the web app cannot find their file in the directory until I restart the server.
How can I make it so that the resources directory of my web app automatically gets refreshed by the server? I'm developing in Java/JSP and using Tomcat as my server.
Thanks!!
I'm guessing you're putting the files into the src/main/resources folder, then it's being packaged into the artifact and then you access them as the classpath resources. Then the next portion of the resources is going to be available after the next packaging.
Instead you should access the Files via usual File System and Absolute or Relative paths.
Related
I have .Net Core WPF application and would like to distribute it from my web site.
I'd created the folder app in wwwroot and published MSIX into it.
Then I created page on my website and put the link to appropriate appbundle file there.
But when I'd tried to download this app I got a 403 error. I found out that such error arise because of insufficient permission set of msixbundle file. The folder, contained this file had limited set of permissions and has not inherited proper permissions from the parent directory.
I believe that when I publish the project, VS moves files from some temp directory there instead of copying them.
Could you suggest how should I publish the project properly? Is it possible to setup some "after publishing" event in order to set the proper permissions to published files?
I wouldn't like to setup the full-fledged devops process just now, because it is very beginning stage of the project.
My VB.Net application is using a data bound MS Access database. This app is going to distributed to multiple co-workers so according to almost every article I've read, I need to include the database in my project so that it will get deployed (copied to the user's local directory) when the Setup.exe is run. When I publish the project, I see both the Database.employ and the DataSet.xsd.employ files in my Application Files that gets created. Yet when I run the Setup.exe I get an error message telling me that it can't find the file. I manually check the Data folder where it's looking and there is nothing in it. It seems that the files I need to get deployed are not getting so.
Everything I've read so far explains how to deploy the database but I haven't been able to find anything about this error I'm receiving or why the files aren't getting copied to the Data folder.
When using ClickOnce to deploy, in order for files to be deployed into the Data directory the Publish Status for the file should be set to Data File on the project properties Publish tab -> Application Files...
I have a click once Application which is deployed in folder say, "c:\temp\MyApp". In this folder I have a config file "MyAppDynamic.config" which I want my click once app to read when it starts.
When I click on c:\temp\MyApp\setup.exe, ClickOnce App is deployed in %APPDATA%.. folder and hence I am not able to get the folder location from where clickonce is launched.
Is there a way to get the launch location in clickonce app?
Am I doing something wrong?
Thanks,
RDV
Little more info:
My clickonce app's main purpose is to install a bunch of pre-reqs on client box. These pre-reqs can be located anywhere on network (their location changes depending upon whether the particular component is in development or production). I did not want to update the clickonce installer just because some dynamic location changed and thats why I do not want to hardcode the installation paths in ClickOnce app.
Hence, I am using an external file "MyAppDynamic.config" where I update the installation paths of all components and I place this file in the published folder where setup.exe resides.
The problem is I want to read this file when ClickOnce application starts, but any System/Environment variable wont give me this published location because by this time, ClickOnce is already deployed on Client Box and all Location/CodeBase paths point to %APPDATA%..
Question:
Is it possible for a deployed clickonce application to get its installation directory path (I verified IsolatedStorage does not provide this information)?
Is above not not possible, are there any ideas how to achieve this? Again I do not even want to hardcode location of MyAppDynmaic.config file. But if nothing else work, this is going to be my best bet :-(
Thanks,
RDV
There is no way to get or set location of installation. Installation folder is under Isolated Storage for security purpose. You can read your config file. Check this answer;
How can I get the application's path in a .NET console application?
In my GWT application, a 'root' user upload a specific text file with data and that data should be available to anyone who have access to the app (using GAE).
What's the classic way to store a data that will be available to all users? I don't want to use any database (objectify!?) since this is a relatively small amount of information and it changes from time to time by root.
I was wondering if there was such static MAP on the 'engine level' (not user's session) that this info can be stored (and if the server is down - no bigi, root will upload again)
Thanks
You have three primary options:
Add this file to your /war/ directory and deploy with the app. This is what we typically do with all static files that rarely change (like .css file, images, etc.) This file will be available to all users, whether they are authenticated or not.
Add this file to your /war/WEB-INF/ directory and deploy with the app. This file will be available to your server-side code, so you can read it on the server-side and show to a user. This way you can decide which users can see this file and which users should not have access to it.
Upload this file to Google Cloud Storage. You can do it through an app, or you can simply upload it manually to a bucket using a GCS console or gsutil command-line tool. Then you simply provide a link to your users. The advantage of this option is that you do not have to redeploy your app when a file changes.
The only reason to go with the first two options is to have this file under version control. If you don't need that, I would recommend going with the GCS option.
Is it possible for DNN to read files directly off a server? What I would like to do is be able to drag files into a created folder on my server and they will automatically be uploaded and show up on my DNN site. My main concern in this scenario is that I want to be able to go into the file on the server make changes and the changes will automatically be reflected on my DNN site without me having to reupload the file.
You can put things into the Portals/#/ folder, or a subfolder there, and have DNN AutoSynchronize the file-system (there's a scheduled task) so that the files show up in the File Manager in DNN.
I have a client who has a specific Uploads directory they FTP files into, and the synchronization process makes them available to their editors.