Create Writable folder in Visual Studio 2010 Web-Setup Project - visual-studio-2010

I've got a VS2010 web-setup project which works well and creates a virtual directory under IIS for my ASP.NET project.
I need it to create a directory for the logs. I've managed to do this by creating a WebFolder and setting it to be writable. The directory it creates is not writable by IIS.
How can I get around this?
Thanks

In the File System Editor where you have created your directory, select the directory you want to be writable. In the Properties pane, you have a property called ´AllowWriteAccess´. Set it to ´True´ and this will be installed as writable by IIS.
For security reasons, any writable web folders should have ExecutePermissions=vsdepNone.
In the IIS6 GUI control, you even get a warning when ticking on write access for a folder that does not have Execute permission set to None.

Related

Error MSB3191 Unable to create directory on MSBuild

I'm getting below error while trying to build the solution
MSB3191 Unable to create directory "obj\Debug\net5.0\Razor\Pages". Could not find a part of the path 'obj\Debug\net5.0\Razor\Pages'
What I have tried so far:
Given full permissions to obj folder
Closed and reopened the VS
Clean & rebuild the solution couple of times.
Changing the configuration settings from Debug to Release and vice versa but nothing changed.
Running Visual Studio under administration account.
I have resolved this by moving my project from network drive to PC's drive. Now Visual studio automatically creating the required folders.

Install files to each users Application Data Folder using Visual Studio Setup project

I have created a visual studio setup project that writes content files to User's Application Data Folder
C:\users\user\AppData\Roaming\CompanyName
I did this By adding User's Application Data Folder in File System on Target Machine link from setup project and adding content files to that folder.
When I install this setup it installs only for one user(active). I want this to install content files to all users AppData folders
Example folder locations:
1.C:\users\user1\AppData\Roaming\CompanyName
2.C:\users\user2\AppData\Roaming\CompanyName
How to install these content files to each and every user's AppData folder on the machine using Visual Studio Setup project.
Any help is greatly appreciated.
The short answer is that you can't. There's no way of enumerating all those folders and installing files to them, and that won't work anyway if a user account gets created after your setup has been installed.
The good news is that it should just work. Assuming your installed app has a shortcut to the program, and the setup was installed for Everyone, log on as another user and use the shortcut. What should happen is that Windows will notice that the user doesn't have the files and it will ask for the original MSI file to install them. This works even if the user account wasn't present at the time of the install, and will happen just once per new user of the app to install the files.

IIS is trying to access the wrong web.config

So first a bit of background: I rechecked out my SVN repository to a new location and tried to run the application from there. And now Visual Studio is having problems launching my MVC application using Local IIS Web server.
I am currently getting this error:
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x80070003
Config Error Cannot read configuration file
Config File \?\C:\RND\app\web.config
Requested URL https: //localhost:44304/app
Physical Path
Logon Method Not yet determined
Logon User Not yet determined
Request Tracing Dir
And the problem is that the config file does not exist at c:\RND\app\web.config it is now located at c:\RND\appTest\web.config.
Is there a way I can update this in Visual Studio?
It is as if it has saved the old path somewhere and not automatically updating it.
You can correct this behavior by simply deleting the .vs file located in your project, and rebuilding the project. Visual Studio will regenerate another .vs file with the path to the web.config corrected. There are stored the settings about the web.config file path, among the others.
I had the same issue after moving my project folder. I fixed it by editing the IISExpress applicationhost.config file and correcting the faulty paths found in it.
On my machine the applicationhost.config file was found in C:\Users\\Documents\IISExpress\config
I fix it by removing a file named "applicationhost.config" stored in the .vs folder at the same level of .sln file.
This file contains all the info about solution, by deleting it visual studio needs to recreate it with the default value.

Can't create a new Visual Studio Project

I have the following problem:
When I create a new project in Visual Studio, name it and hit enter I get the following dialog box:
Access to the path "C:\Users\Tamas\AppData\Temp\lyy03tab.2ey\Temp\Properties\AssemblyInfo.cs" is denied.
I haved changed the default location of the visual studio project, runed VS as administrator but still no result. When I navigate to the AssemblyInfo.cs file it is showed greyed out (like when you cut it). The permision set that are granted for the System,Administrators and my user are all but special permisions.
Can someone help ???
Thanks,
Tamash
Check if you can manually create a folder in Temp. You may want to have a look at the below links. Helpful links:
Unable to create C# Console or C# WinForm app projects in VS2008
The project file could not be loaded. Access to the path "path" is denied
MSDN: /ResetSkipPkgs (devenv.exe)
Else Try deleting the content in Temp directory. Try disabling antivirus if installed.
I have seen this in the past where a virus may have marked a folder or file as "Hidden". Check to be sure that all folders are not hidden and that all files are not hidden. You can do this by right clicking and going into that folder's or file's Properties.

Visual Studio Setup project should not delete file during uninstall

I created Visual Studio 2005 Setup project for my application. Windows Installer during installation put one xml file into AppData/myCustomFolder. I used File System Editor and added special folder - user's app data folder, then included that xml there.
When I uninstall application from Control Panel folder from Program Files is deleted, but also my xml file from AppData is deleted too. I need to leave this xml file in the AppData always, even when user re-install application.
How I could do it?
Set the Permanent property to True
Permanent Property

Resources