Is it possible to run a Docker image while mounting NTFS symlinks? - c#

I'm trying to incorporate Docker into my workflow developing web apps using C#, but I stumbled across an issue trying to use it.
Long story short, I run Windows, and I have an unusual storage setup on my computer. Normally, nuget packages get downloaded into a cache in the .nuget\packages folder in the user's profile. For space reasons I had to symlink that folder to a separate hard disk, so .nuget\packages redirects to another drive.
It works well for all my regular development so far, but it seems that Docker really doesn't like the symlink. I'm guessing that maybe it doesn't rely on transparent OS access to a filesystem, and that's why it refuses to mount it, but... Is there a way to keep my Symlink, but maybe tell Docker from inside Visual Studio to use the original directory, or is there some other kind of workaround?

Related

How do I publish a .NET application with OneClick publish through Visual Studio 2015?

I've been trying to research this the last couple of days and it doesn't seem like there is very good support for beginners. All video tutorials I find don't answer the questions I'm asking.
What I want:
I have an application I've written with .NET 4.6.1 in Visual Studio 2015 and I want to distribute an .exe that automatically checks if there are updates. It seems like this is exactly what OneClick is intended to do.
Where I'm at right now:
I want to publish to a shared drive among multiple people. It seems like I put that file path in the "Publishing Folder Location" which produces Setup.exe, MyApp.application, publish.htm, and Application Files. When you go to publish.htm there is an install button that downloads Setup.exe.
Where I'm stuck:
When you download the Setup.exe file onto your local machine and try running it gives an error. The details say it wasn't able to find the MyApp.application file. It seems that file is responsible for knowing what version of MyApp is currently installed on the users machine so that it can be compared to the download location (in my case the shared drive) to see if updates are available.
What am I missing? Do I misunderstand the purpose of OneClick publishing? Shouldn't users be able to visit the publish.htm once to get an .exe and that .exe is used to launch my application and look for updates first? I really appreciate any insight on this topic!
PS I've read over all the MSDN documentation, but it isn't user friendly to beginners in my opinion. Or maybe I'm just slow : )
You understand it exactly right, but when a user navigates to the html page, it downloads multiple files. The .exe, the .application and other supporting files.
You are correct in assuming ClickOnce is what you want. What I've found is the .net dependencies are very particular when using click once. You have to make sure each machine has the correct version of the framework and then they can use the htm site.
What I prefer doing is distributing the .application file to the users machine and just letting them run that. It will check for updates on the server every time it is ran and copy all the necessary decencies to the users Local directory.
You have to direct the users to the .application-File.
That one is responible for versioning (Updating) and executing your Application.
If you execute the .exe it will look for the .application-file to find the infos about the version, which should be installed/downloaded.
NOTE
Not all Browsers (in case of internet/intranet-deployment) support ClickOnce. But there are extensions for almost every browser

LAN Application with shared files

I've written a c# application which is intended to be ran on multiple computers within a network. The problem im trying to figure out is how I can share some common files between all the computers within the network.
I was handling this before by installing the software on one computer, storing a path string as an application scope setting during install, and then creating exe shortcuts on all other computers in the network which point back to the original installs exe.
Application deployment to network drive
I read this link and they talked about how it would be better to use clickonce rather than using a network share. The network share was the only way I could think of to have a common files directory. Are there any other ways to accomplish this?
Part of the installation process should ask the user for the path where the shared files will go. As long as each user enters the same path your good. That's the trick...
One way to solve that is to provide a silent installer mode that can be run with a preset of values the installer will need. You can then push the installer via group policy to all of the machines in your network.
I'm not sure what installer tech you are using, but WIX will create MSI's that support silent installation.

Windows Service Installer C#

I am working on a task, where I need to create a installer (.msi/exe) which can install my application as an Windows Service. Also, I need to deploy this service from a non-alterable medium (i.e from CDROM). But I have my configuration files in the CDROM which I want to copy them to a local folder on hard drive before hosting the service. I understand there are different ways for creating a installer
1) Using Install shield wizard in Visual Studio
2) Advanced Installers
Which option do you think is optimal for my problem? Also, I am not sure if it is possible to copy configuration files to Hard Drive and leave the dll's on the disk while installation.
Please guide me through the right direction.
I am not totally clear what your real problem is, however, I try an answer:
But I have my configuration files in the CDROM which I want to copy them to a local folder on hard drive before hosting the service
If these files can be integrated in the VS solution, they can be tagged as "Content" (Build Action) and copied to the install location during setup. If you need to be more flexible, you can write a setup extension.
and leave the dll's on the disk while installation
I do not understand this. Which DLLs ?
If you are interested in some tips for creating a sample service with a complete setup, you can check my SO answer: https://stackoverflow.com/a/28853490/4547223
Or look at: http://www.rsprog.de/samplewindowsservice/
You may probably comment you experiences with that and tell us which files do you want to copy to which location and more about the background. I will try to refine my answer then.

Converting C# app from WinXP to 7: How to make it not require admin privileges?

I have a program designed to work in XP, but with Windows dropping support for the OS, it's time to upgrade.
The location is in Program Files(x86), so when I run it without Admin privileges, it can't read/write library/assembly files within its folder.
What are my options?
Found this link helpful:
Allow access permission to write in Program Files of Windows 7
Since Vista was released in 2007, UAC has meant that users do not have rights to write to the program files directory, unless the program is run elevated. You need to locate the files that need to be modified somewhere else.
Exactly where those files should be located, I cannot say. Perhaps under the user profile, perhaps somewhere else. It would require some detailed knowledge of how your application operates to give more specific advise. And quite possible your application will need some re-design in order to work well with UAC.
On the other hand, you say that your application can't access library files within its folder. If all you are trying to do is read these library files, there will be no problem, even in modern versions of Windows. It seems plausible that you have not yet fully diagnosed the problem. It seems likely that your application is trying to write to a restricted location. But reading library or assembly files should be fine, even with restricted access under UAC.
So perhaps the problem is not the reading of these library files. Perhaps the problem is that your application is writing to the program files directory, or some other restricted location. You'll need to do a little debugging to diagnose exactly which parts of your application are failing.

Running a C# exe file

Duplicate:
Why does my .NET application crash when run from a network drive?
Can someone help me? For a school project, I wrote a C# windows application in Visual Studio 2005. It works just fine, no problems. I want to be able to share this program with others in my department at work. So, I copied the exe file to a network drive. When we attempt to run the exe from the network, it fails with "name of progrm...has encountered a problem and needs to close". If I have the co-worker copy the exe file to their c:\ drive then attempt to run, it works. Why won't my program run from the network drive?
Susan
.NET by default does not allow applications to be run off a network drive. Either copy it to a local drive or alter the security settings for .NET.
This discussion should give you what you need.
Microsoft has finally realised that the default behavior of preventing applications from running off a network drive is wrong. From The .NET 3.5 SP1 download page:
"Additionally, managed applications that are opened from network shares have the same behavior as native applications by running with full trust."
This change is long overdue: there is virtually no security benefit in preventing managed applications running from a network share, since a hacker could just as easily use an unmanaged application.

Categories

Resources