DNN (DotNetNuke) reading files locally - dotnetnuke

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.

Related

Set permissions to files after MSIX publishing

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.

Using VB.Net to deploy an Access database but database does not get deployed

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...

How do I refresh resources folder of web application?

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.

How to get setup.exe folder path for ClickOnce

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?

Publish Windows App to be Emailed

I have a finished version of an app (made using WPF). I want to publish it so that the installation files can be emailed to another person. The only options shown with the Visual Studio 2013 Publish Wizard are "From a Web site", "From a UNC path or file share", or "From a CD-ROM or DVD-ROM".
How can I publish the app so that it goes into a nice and tidy folder on my Desktop which I can simply zip up and email it to someone? To which they can simply unzip, click setup, and follow the traditional setup wizard. It needs to be able to run on Windows XP thru Windows 8.
(I have .csv files and image files that the application uses, if it is relevant.)
In Visual Studio, highlight the project you want to deploy and right click. This will raise a context menu which has a 'Publish' item on it...
Selecting this will raise a Wizard like this...
From here, select 'Finish'. This will create a directory with a Setup.exe and all the necessary files to install the application on a different machine (given security levels permit, third party software restrictions, and a host of other deployment issues). You can then create a zip file (keeping the directory structure) and email it.
The 'Publish' feature has other options on it you will want to explore, like Click Once.
That is pretty straight forward if you are going to perform zip and email to your subscribers
begin with publishing the app from Build -> Publish
Choose a path from your local hard drive eg. C:\Myapp
then in next screen choose From a CD-ROM or DVD-ROM
then in next screen choose The application will not check updates unless you have a web location where you can publish the updates (which I guess you dont want for now)
then Finish
and your chosen folder C:\Myapp will contain the setup files which you can zip and email to your users.

Resources