ASP.NET -The current identity (Machine\ASPNET) does not have write access to 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files' - iis-5

I am having this issue on my Win XP Professional Development Machine. My application is on Virtual Directory.
The current identity (MachineName\ASPNET) does not have write access to 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
I have done following so far.
1. Must Not Use Simple File Sharing. After Changing Settings, Pls Reboot.
Open your My Computer, the on menu, select Tool >> Folder Option the Select View Tab,
Uncheck Use Simple File Sharing
2 Adding User Permission
When you create virtual directory on IIS, the actual folder you used with it must have access permission
To do this, follow:
select the properties of your actual folder, then select Sharing Tab
select option Share This Folder
specify the ShareName (commonly folder name itself)
then select Security tab, you will see the Group and Username listed there.
to add ASPNET just click ADD
pop up window will appear "Select User or Group"
Click Advance and Click Find Now
All Users and Group will be listed there, try to find ASPNET and select OK
you will going to back on Security tab and select something like "RAD/ASPNET", under that you will see "Permission for ASP.NET"
for the last step, check Full Control under Allow Column, then OK
3 I Have tried, the aspnet_regiis exe in the framework folder!
Still does not work, Any other options or suggestions please..
Update:
My Hard disk is completely encrypted. Does it have any impact?

Encrypted shouldn't affect.
Try going to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files in a file windows explorer and give all access to your ASPNET and Network accounts.

Related

Windows: XAMPP install folder ini file permission error, Access denied upon configuration save

After installing XAMPP to Windows 10 (all default/recommended installation attributes), I now have an issue changing its configuration after opening it.
Error: Cannot create file "C:\xampp\xampp-control.ini".
Access is denied
Clicking Save to a change in Configuration of Control Panel:
This "Configuration of Control Panel" box opens after clicking the "Config" button at the top right of the running XAMPP app:
I've tried a suggestion to run the XAMPP app with Administrator (elevated) access… but that seems like a major security issue, considering I don't know exactly what XAMPP would or could do with my files that require that permission, whether intended by the people who run XAMPP or not.
I've tried re-installing to another folder, like to C:\Users\Me, or a sub-folder like Documents or a custom one, but I just got different permissions issues that I struggled to figure out.
If you know a solution that worked for you, that avoided running XAMPP with Admin privileges, please let me know. I've gone through a handful of seemingly-related questions here but they seem to be related to MySQL/PHP questions and not Windows file system permissions.
I found a solution after noticing that the file already existed from apparently a past workaround I tried with running XAMPP as Admin... based on the permissions of the file being different than its parent folder. I discovered this by right-clicking the xampp folder or the xampp-control.ini file then selecting Properties and clicking the Security tab, then clicking into each attached user account's permissions.
So, my C:\xampp folder has these permissions: for Admin, basically full access; for my user account, Read, Execute, and Write.
The xampp-control.ini file has only Admin permissions; my user account is not attached to it.
Adding my user account to the xampp-control.ini file's Security, and adding Write permission then allowed XAMPP's config panel to save my changes.
Note that I typed my username into the "Enter the object names to select" box, then clicked Check Names; this auto-populated my username reference (?), though I'm not sure how it would work if it finds multiple results. Then I could click OK to get back to the Permissions box to add "Modify" and "Write" for it. I'm completely OK giving my user account permission to modify and write to this file through the XAMPP app.
Now, that fixes that file for that scenario; now I'm wondering if there will be other permissions issues with other files, because I noticed some other files (that I checked randomly) don't all share the same permissions for my user account!
Maybe I should have instead modified the xampp folder's permissions recursively to give my user account Write and/or Modify access (I'm not sure of the difference, Windows permissions seem far more complicated to understand and use than Linux's and Mac's do).
I think the file permissions were all set by XAMPP during install; I don't know yet that expanding permissions on certain files will not create new problems...
I found a solution after noticing that error, here is my solution
go to xampp installation folder on the c drive
Xampp Destination
then find xammp control panel.exe
Xampp Control Panel
then right click and go to properties(or press ALT+ENTER)
Click Properties
then go to compatibility and enable Run this program as an administrator
Compatibility tab
Your Problem is now fixed

Virtual Shared Driver Indexing problems

We just virtualized a Windows server in Azure and everything in working fine on Client side, but we are not being able to solve the indexing search problem.
When you have a local drive, Windows can index the path and searches works fine using Windows menu/search box in task bar. But for shared drives it seems to fail.
In Windows Explorer the search pretends to work, but it takes forever to find a file or folder. And sometimes it just won't move anywhere. So it is not an option for users since them are used to search using menu bar.
We have tried to change drive properties in Right button to Shared Driver > "Allow files on this drive to have contents indexed in addition to file properties, but it was already enabled.
When we try to disable it, it prompts an error saying that the user doesn't have permission to do it, but it does anyway. And when we try to re-enable, the message prompts again, but it is enabled with no problem at all. But once again, nothing changes and Initial Menu Search just won't work.
Does anyone knows if there is a solution for that?
For me it seems to be an server setup since I see that permission error, but, as far as I know, if the shared driver is already mounted, I can't see a reason why Windows can't index it.
Ps.1: In the shared drive security tab, the System has full permissions.
Ps.2: If there is a solution for this, is that possible to solve it on the Windows server Side so we won't need to access client by client to change it manually?
enter image description here
Please check the following setting and see.
1.First thing is to check network location is being indexed. open File Explorer right-click on the mapped network drive that you need to index, then select the Properties and Make sure that, the Allow Files on this Drive to Have Contents Indexed checkbox is selected.
You have already done this step
2.try to check the search options for network drive in file explorer, go to view tab>>click on Options Icon and choose the change folder and search option menu it will open the folder options dialog box and select search tab and make sure first option is not selected
3.check server side Indexing
4.we need to make sure search service needs to be running.
Open services.msc check for the wndows search service and try to restart the service.
5.Go to Settings on the Windows 10 desktop, then click on Search, followed by Searching Windows scroll down and try to run the indexer troubleshooter
Reference https://learn.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/fix-problems-in-windows-search

IIS hanging forever local website

I'm trying to set up the IIS so I can access my local web application project at dev.example.com. I have the physcical path set to the root of my web app, and the binding as shown in the picture below.
I have added this to the hosts file
But when trying to access it in chrome it just hangs forever.
Is there something I'm missing?
I had to set the permissions of my application pool identity
ApplicationPoolIdentity is actually the best practice to use in IIS7. It is a dynamically created, unprivelaged account. To add file system security for a particular application pool see IIS.net's "Application Pool Identities". The quick version:
If you application pool is named "DefaultAppPool" (just replace this text below if it is named differently)
Open Windows Explorer
Select a file or directory.
Right click the file and select "Properties"
Select the "Security" tab
Click the "Edit" and then "Add" button
Click the "Locations" button and make sure you select the local machine. (Not the Windows domain if the server belongs to one.)
Enter "IIS AppPool\DefaultAppPool" in the "Enter the object names to select:" text box. (Don't forget to change "DefaultAppPool" here to whatever you named your application pool.)
Click the "Check Names" button and click "OK".
I found the answer here
IIS7 Permissions Overview - ApplicationPoolIdentity

Permission denied when trying to import a CSV file from PGAdmin

I'm using PGAdmin 1.14.3.
When I try to execute an import command:
COPY grad(country_code, postal_code, place_name, admin_name1, admin_code1, admin_name2, admin_code2, admin_name3, admin_code3, latitude, longitude, accuracy)
FROM 'C:\\Users\\denis\\Desktop\\BP2Project\\USA\\US.txt';
I get a
ERROR: could not open file
"C:\Users\denis\Desktop\BP2Project\USA\US.txt" for reading:
Permission denied SQL state: 42501
I did look up other similar questions and none of them solved my issue.
I logged in as user "postgres" who is the superuser. I don't see why I'm missing permissions. I'm on Windows 7.
The permissions article mentioned in the answer by Houari and Flimzy is a good reference material, but a direct answer (the quick fix I used) is:
Right click the folder containing the data file(s) that permission was denied to and then click Properties.
In the Folder's Properties window, select the Security tab.
Click the Edit button.
In the "Permissions for the folder" window that opened, click the Add... button.
Type Everyone into the "Enter the object names to select" text area box.
Click OK and the window will close.
Verify that the default Read & Execute permissions were set to Allow via the check checkbox in the previous window.
As JLB notes, Write permission is needed if dumping from PostgreSQL, opposed to copying into it.
Click OK and the window will close.
Click the Apply button in the Folder Properties window.
Now you can run the SQL COPY statement that needs to access those files.
Once done, return to the Folder's Properties window.
Click the Edit button.
Select the Everyone entry in the "Group or user names:" field.
Click the Remove button.
Click OK on the remaining open windows.
The permissions have now been returned to what they were.
The user Postgres must have read access on the file from which you are about to copy.
Look at this article to see how to modify files' security access on Windows.
Ok, this is how got COPY command working,to export a table to CSV, step by step.
Pls note that I am using pgAdmin 111.
Create the target folder you want to export a table to. E.g C:\myExports
Set a read/write permission on this folder following the steps below :
Right click the folder containing the data file(s) that permission was denied >to and then click Properties.
In the Folder's Properties window, select the Security tab.
Click the Edit button.
In the "Permissions for the folder" window that opened, click the Add... button.
Type Everyone into the "Enter the object names to select" text area box.
Click OK and the window will close.
Verify that the default Read & Execute permissions were set to Allow via the >check checkbox in the previous window.
Click OK and the window will close.
Click the Apply button in the Folder Properties window.
This is the tricky part, inside myExports folder create a blank CSV file with your desired name.E.g employee.csv
Then run the Copy command like this :
copy employee to 'C:\myExports\employee.csv' delimiter ',' csv;
employee is the table name in this example..
Hope this helps.
If you don't want to give permissions to Everyone, you can add permissions to the account that started the service. In the Control Panel - Administrative Tools - Services, copy the account name in the 'Log On' tab. (On my system the account is called 'Network Service'.) Then share the folder with the CSV-file with this user as shown in the answer above.
To solve this problem you must give permission to the CSV file because that CSV file present in a COPY command are read directly by the server, but not client application. So to make this file accessible to a server we must give full read-write permission so that Postgresql user can read and write on that file.
Reference: article showing step by step procedure.
I just ran into this error and even after adding postgres to permissions on the file folder and the file itself, it still didn't work. So, I put the file in a public folder. On Windows this was the path: "C:\Users\Public\Documents\census.csv." It worked!
Responses to this problem on different threads go something like this
1. "Tell me exactly what command you used"
2. "Make sure you have right permissions"
3. "Just use /copy"
I just tried giving permissions to Everyone on the cvs file I am trying to copy from, and it is still giving me the permission denied error. I think this functionality is broken and has been broken for multiple consecutive releases over multiple consecutive versions of Windows.
for me and I've just spent some long hours on this.
I have a central db residing on a HP box running 14.04 postgresql-9.5 pgAdmin3 postgis-2.2, shares are made through a tweeked Samba share. My clients are using a mixture of windows 10.1, 7, 8.1 and I have one ubuntu 14.04 desktop.
I'm working with large tables updating records and normalising data and have built the routines around SQL copy statements from CSV files which were made from the core COPY public.table_1 TO (the share folder I'd set up in Samba https://www.youtube.com/watch?v=ndAYZ0DJ-U4) '/srv/samba/share/[filename].csv'
I can then update the database once the tables have been amended with COPY table_1 from '/srv/samba/share/test.csv' USING DELIMITERS ',' WITH NULL AS '' CSV HEADER; from any of my clients.
The key as far as I have been able to determine is that the clients doing the updating must be superusers, also everything must tie up in terms of users as there are 4 servers working together here Postgresql, Samba, UNIX and WINS
All of my users are registered on each of the servers with the same username and password homogeneity is the main factor.
I had tried for a long time moving things about and trying various naming conventions but in the end it was http://www.postgresql.org/message-id/CFF47E56EA077241B1FFF390344B5FC10ACB1C0C#webmail.begavalley.nsw.gov.au that sorted me out it was like a big switch clicking in. chown 777 on your shares and group management was an important learning curve but., the hours I've spent on this will reap rewards down the line... Loving Ubuntu loving life and loving the spirit of open source but that just might be sleep deprivation kicking in... IT WORKS
I am trying to execute SQL commands directly from a file in psql 14, and landed the same error.
The reason is that "postgres" user is different from the 'admin' or the main user of the operating-system. So, this main user denies "postgres" to access files from its file system.
Although there is a way to bypass it.
Windows lets any user access the files in 'C:\Users\Public' and Linux distros allow files in '/tmp' folder to do the same.
So, whatever files you are trying to access from postgres' terminal, keep the files in
'C:\Users\Public' for Windows
'/tmp' in Ubuntu
Read from the orginal source of this answer
use \copy command from psql instead with this config:
sudo psql -U postgres -d <your-db> -c "\copy <your-query-or-table> TO '<pat-to-save-file>' WITH (FORMAT CSV)"

Windows 7 - Can't update my program's files in C:\Program Files

I have an addin program that works with MS Word (version 2007). It is located in the C:\Program Files location. I installed Windows 7 and then went to make a routine change to my files in this location and it would only bring up a read only file. How can I grant myself permission to write to my own program? I cannot change this location or use any other workaround. I have this product out to 25 different companies and I can't change the programming to work from any other location. Thanks
You could also embed a manifest in your EXE that makes your program require adminrights on Windows 7 / Vista.
On Windows Vista, UAC means that users run without admin rights and don't have write access to the program files directories.
The correct solution is to write to a folder for which standard users do have write permissions.
The solution you are looking for is to make your app's folder within program files writeable to all users. You can do this by adding a DACL when installing. It is extremely bad practice to allow standard users to write inside the program files directory and I urge you instead to re-code your app so that it does not need to write there.
Assuming you're doing this as part of modifying the config (and not when your application is running for regular users)...
Your user account probably doesn't have the correct permissions to write/modify the file. Assuming your account is an administrator account, right-click the file, select "Properties". Click the "Security" tab. Click edit and give your user account Full Control.
If you can't do this, it's probably because the ownership of the file doesn't allow you. If this is the case, click on "Advanced", go to the "Owner" tab, and click "Edit".
However, if it needs these permissions when it's running, you should instead be using the %AppData% folder.

Resources