Request for the permission of type 'System.Security.Permissions.FileIOPermission.. failed - web-services

I am getting this error when calling a web service method which writes to a file on the local drive on Windows 2003.
"System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
I have done these steps:
website runs in an appPool using the localSystem identity
website impersonates a user in the admin group.
the web service assembly has full trust
the url of the web service has full trust in the machine's web.config.
the folder's written to security has the impersonated user
So why is this web service still complaining about FileIOPermission? Fulltrust includes FileIOPermission.

After a lot of troubleshooting, it boiled down to a mistake I made in web.config where the location tag had a path of www.example.com but in IIS it was example.com!

Right click on Project-> Properties -> Security Tab -> Enable Click Once Settings
Click on 'Calculate Permissions'.
Click 'Yes' on 'Full Trust Required' message.
Then the issue was solved.

Finally we have found the issue. After building the files in Windows we put them in a zip file. When the files are added to the zip windows adds a blocking property to all files which remains after unzipping the folder. These caused the files to not be able to run properly. The "block" property can be removed by right-clicking on the files (one at the time), select "Properties" and then clicking the "Unblock" button at the bottom. Here is an example picture:
https://www.howtogeek.com/wp-content/uploads/2011/08/image10.png
To prevent windows from adding this blocking property, one can look at the following thread:
Can I stop windows from “Blocking” zip files

Maybe it's no longer relevant, but I solved like this:
Project > Properties > Security > Enable ClickOnce security settings - Uncheck

Related

Google Cloud doesn't allow me to create my first project with admin role

I'm trying to create my first project in google cloud with organization's administrator account. I have access to the administrator's email and passwords and I am logging in with that account to do so. The problem is that when I click on create new project I receive the following error:
There was an error while loading /home/dashboard?project=proven-now-305315&authuser=1.
You are missing at least one of the following required permissions:
Project
resourcemanager.projects.get
Check that the project ID is valid and you have permissions to access it. Learn more
Send feedback
The detail is that in my resource administration panel I already gave the permission that they ask me to the resource as shown in the following image:
As I have read, the project IAM Admin role should grant the resourcemanager.projects.get role and as you can see in the image the resource rcv # .. which is the administrator has it activated, however I keep trying to create a new project and it doesn't allow me to do it. Any idea?
In case anybody else, like me, reaches this answer, I want to point out that the accepted answer is correct, but for me I had to also make sure that within the settings, I ensured that Project Creation Settings on the right pane and under the section of Cloud Resource Manager Api Settings was set to on. It was turned off by default. Many people on my team overlooked this as it is significantly smaller text.
This may be an option that was not present before or it was turned on by default in the past. For us, it was turned off.
Please refer to the included image for a visual representation of the
settings that need to be turned on.
The problem was for some reason the Google Cloud was disable for all users, I solved following this instructions. Solved with this!
To activate this service, please follow the steps:
Access the admin console and go to Apps -> Additional Google Services
Look for the service “Google Cloud Platform” and click on the box next to it
In to top right corner click in “ON”
Confirm you want to turn it on in the pop-up box.

macOS Catalina screen recording permission

I am working on a screen recording app using C++ in XCode. The problem is that when I compile and start the app I always have to give permission for screen recording in "Settings > Privacy".
Is there a way to always grant the permission in XCode or sth similar? It is really annoying when developing/testing the app to always manually grant the permission when re-compiling.
Sign your debug builds Luke
In order to grant macOS "Screen Recording" permission for development (or any other permission like microphone or camera access) you must sign your debug builds with your AppleID certificate. This applies for Swift/C++/Objective-C or any other language.
It's easy and free to do:
Simply click at your project
Go to "Signing & Capabilities"
Select "Development" in "Signing Certificate"
Pick your certificate in the "Team" (if you don't have any there will be an "Add Team" button which lets you download a free one after providing your AppleID)
After that your build settings should look like that:
(you may need to go use Product -> Clean Build Folder and rebuild)
If permissions appears revoked...
Also if the system still doesn't give you permissions you need to go to system Settings -> Security & Privacy -> Privacy and under an appropriate category you need to REVOKE the permission and grant it again after rebuild. This will prompt for app quit - do it and run the application again. From now on it will always have permissions.

TFS 2015 not able to queue build using TFS2010 controller

we have upgraded from TFS2010 to TFS2015.
And connected the TFS2010 XAML build controller to TFS2015.
when we try to queue the build , we are not able to see the build controller in the drop down of build controller.
we could see that the Build controller registered and in running state.
I am getting error "TF900560: Could not start build: Object reference not set to an instance of an object.
"
This issue was caused because we have used the TFS controller which is cloned from the current production. Therefore, it is always suggested to reconfigure the build controller rather than using a cloned one.
Please check below items to narrow down the issue:
Check your TFS server an agent server to make sure the machines are
not running out of disk space. In this case, you can try clearing up some space on the servers.
Change the agent service account as another user account which has
admin privileges.
Restart the TFS and Agent servers.
UPDATE1:
Seems it should be the permission issue, just try to compare the permissions of Contributors and Project Administrators groups , then set the correct permission for Contributors group.
You can also try to clean the caches for your IE or change another browser even client to check that again.
UPDATE2:
As you mentioned in below comments "few users from same contributors group are able to queue the build".
So you can compare the permission settings between the vaild and invalid users in Contributors group. Then debug accrodingly. (Switch to Users tab in below screenshot --> Select the specific user to check the permission settings)

Lock oracle apex application

It is possible to lock pages of an application in oracle apex(5.0). But I want to lock the entire application or entire pages in an application. How can I do this without visiting each page?
Edit: I want to restrict other developers from accessing this application, so that nobody else can make any changes without permission.
You can lock the application in application properties: Edit application properties -> Availability -> Build status, set value Run Application Only. After that developers can't change the application. On attempt to edit, you will see the following:
To unlock application: go to Application Builder -> Workspace Utilities, in a side menu choose Build and App Status. A list of application appears. Choose an application and change its build status.
I think that you mean that you want to apply an "authorization scheme" to the entire application, which you can do by creating your own authorization scheme, then from the application's home page click the "Edit Application Properties" button, "Security" tab, then "Authorization".

Opencart You don't have permission to access /admin/index.php on this server

I have a problem when I click on "save" button in opencart "admin->system->setting", the error is:
Forbidden, You don't have permission to access /admin/index.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
What can I do to correct this error?
Go to your project directory and right click admin folder and then click on Get Info:
After that double click on Lock icon and change the access to Read & Write
And then save the changes
Now refresh the url in browser your issue will be solved
** -> It's mac setup may be window will be same**
Check for the server mod security rules. (this worked for me)
Check from the install.txt file from the Opencart upload folder for the permissions and apply those in the appropriate place.