Windows 8 exception "System.Security.SecurityException" - visual-studio-2012

I am starting to develop windows 8 app. I am new in windows 8 app development. I have one page i.e. MainPage.xaml. I am not able to see the design view. It gives an error.
System.Security.SecurityException
Designer could not be started because of a permissions issue on the drive to which it is installed. Please check the permissions of the folder before trying to start the designer.
at Microsoft.Expression.HostUtility.Platform.AppContainerProcessDomainFactory.CreateDesignerProcess(String applicationPath, String clientPort, Uri hostUri, IDictionary environmentVariables, Int32& processId, Object& processData)
at Microsoft.Expression.DesignHost.Isolation.Primitives.ProcessDomainFactory.ProcessIsolationDomain..ctor(ProcessDomainFactory factory, IIsolationBoundary boundary, AppDomainSetup appDomainInfo, FrameworkName targetFramework, String identifier, String baseDirectory)
at Microsoft.Expression.DesignHost.Isolation.Primitives.ProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary boundary)
at Microsoft.Expression.HostUtility.Platform.AppContainerProcessDomainFactory.CreateIsolationDomain(IIsolationBoundary boundary)
at Microsoft.Expression.DesignHost.Isolation.Primitives.IsolationBoundary.Initialize()
at Microsoft.Expression.DesignHost.Isolation.Primitives.IsolationBoundary.CreateInstance[T](Type type)
at Microsoft.Expression.DesignHost.Isolation.IsolatedExportProvider.Initialize()
at Microsoft.VisualStudio.ExpressionHost.Services.VSIsolationService.CreateExportProvider(IIsolationTarget isolationTarget, ICatalogFactory catalogFactory, IExportFilter filter)
at Microsoft.Expression.DesignHost.Isolation.IsolationService.CreateLease(IIsolationTarget isolationTarget)
at Microsoft.Expression.DesignHost.IsolatedDesignerService.CreateLease(IIsolationTarget isolationTarget, CancellationToken cancelToken, DesignerServiceEntry& entry)
at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)
at Microsoft.Expression.DesignHost.Isolation.IsolatedTaskScheduler.InvokeWithCulture[T](CultureInfo culture, Func2 func, CancellationToken cancelToken)
at Microsoft.Expression.DesignHost.Isolation.IsolatedTaskScheduler.<>c__DisplayClassa1.b__6()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
I have given administrative rights to the folders. But I am not getting why this error is getting?
Can someone please help me to solve this ?

I have just upgraded from Windows 7 to Windows 10
And the first problem i had with Windows 10 is this(besides the one where you need to enable "Developer mode" this is probably only in windows 10), and the trick for me that made this work was running Visual Studio 2013 as Admin
Hope this helps

I upgraded from Win 7 to Win 8.1 and faced with the same issue.
I solved it like this:
open the installation folder of Visual Studio with the explorer
go to Common7 => IDE
look for "VSWinExpress"-File
right-click "execute as admin"
that's it!

I encountered the identical problem recently while developing a Windows Phone 8.1 ARM application, and was stumped until I amalgamated several posts from the Web.
(1) I ran "devenv.exe /resetsettings". This removed the "System.Security.SecurityException" error, but left me with the message "Design view is unavailable for x64 and ARM target platforms".
(2) At this point it seems the Visual Studio Designer does not work when the Solution Platform (the drop-down combo box in the middle of the tool bar) is set to "ARM". The workaround is to temporarily set the Solution Platform to "WIN32", do what you need to, set the Solution Platform back to "ARM", and compile.
Although a slight pain, it now works for me.

Just run Visual Studio as Administrator.
When it asks for permission to run the designer click ok and wait.

I will just try to help with some steps and links as it is not reproduce able on my sid e:)
Steps:
THIS MUST BE DONE AS ADMINISTRATOR
Select the folder in Windows Explorer, right-click and select 'Properties'
Click the 'Security' tab then click the 'Advanced...' button
At the top of the new window there should 'Name' and 'Owner'. Next to owner click the 'Change' link.
In the new window make sure you have your local computer selected under 'From this location:'. If not click 'Locations...' and select your local computer then click 'OK'.
In the textbox under 'Enter the object name to select, type 'Users' and click 'Check Names...'
Click 'OK'
At the top of the page check the option 'Replace owner on subcontainers and objects'. Click 'Apply'. You may be prompted to shut the properties dialog to apply the ownership changes, if so close all dialogs then repeat steps 1 and 2.
On the 'Permissions' tab select 'Users' and click 'Edit'.
Select 'Full Control' then click 'OK'.
When you start VS2012 after this and open a designer it will prompt you that it needs to change permissions, do this and this time it will succeed!
Now support links if the steps don't work
Xaml designer issue
this is not only in windows 8 it happened with me in windows 7 when I was in silverlight but I managed to fix some how .. But now in metro apps I still don't get this error :)
Please try and let me know

Related

settings is not opening in windows 10 after update?

settings is not opening in windows 10 after updating window 10 2004.
I updated my window 10 operating system but after update settings and it's related app is not opening.
FIX: Settings App Not Working In Windows 10
1. Open administrative Windows PowerShell. For this, simply right click Start Button or press W8K + X keys and select Windows PowerShell (Admin). You can also search for Windows PowerShell using Cortana and right click the same from results and select Run as administrator.
Next, in the PowerShell window, type/paste following cmdlet and press Enter key.
Get-AppXPackage -AllUsers -Name windows.immersivecontrolpanel | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml” -Verbose}
3.Let the command complete. Close Windows PowerShell and reboot the machine. After restarting your system, see if you can launch the Settings app now.
hope this method is work properly. If this method is not working please comment either you get proper solution then my request to you please submit your answer it might be help to other people who facing this issue.

Uninstall file in Start Menu applications list isn't always shown

After installing the application, the installer and uninstaller files are properly saved in the "install application folder" and in the "Start menu application folder" rispectively.
For example:
- "install application folder" = "C:\Users\\AppData\Roaming\"
- "Start menu application folder" = "C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\"
Sometimes, though, the uninstaller file is not displayed into the application folder of the Start Menu Installed Applications List (list of installed Applications displayed on the left by pressing the Windows keyboard key).
Unfortunately I can't reproduce the problem. It doesn't appears each time I launch the Installer and I couldn't understand under which circumstances it appears.
Is there a possibility it can be solved by forcing a refresh of the Start Menu Installed Applications List? if this is the case, how can do it?
Thanks in advance to everyone for the possible help
EDIT: no solution but a workaround found here Inno Setup Start menu uninstall shortcut is not shown on Windows 10 2nd answer
Windows 8 and 10 hides shortcuts to uninstallers and help files on purpose, this is by design.
The Windows logo requirements says that you should only provide a single shortcut to your main application in the start menu. Only create multiple shortcuts if you have a suite of applications (like MS Office etc.). These guidelines have been in place for at least 20 years!

Trying to Add Windows Phone 8.1 to a Windows 8.1 (HTML/JS) project (Universal app) fails

Im not sure if i missed some information or small print somewhere, but i downloaded the Windows Phone 8.1 dev tools from here: https://dev.windowsphone.com/en-us/downloadsdk
And that now gives me the option to right click on the project to convert it to a "Universal App", but when i click the "Add Windows Phone 8.1..." link, it says two new projects will be added etc, so I press ok then i get the following error:
What gives? As it says in the title, this is a Windows Store Javascript/HTML (WinJS) project, so i know this is something new for Windows Phone 8.1, but surely the template should have been added no? i am at a bit of a loss, if anyone could point me in the right direction.
Thanks,
Andy
Be sure you've installed the Update 2 for Visual Studio: http://www.microsoft.com/en-us/download/details.aspx?id=42307 At the time of this post, only the RC version is available (and this link is for VS 2013). You may have already done this, but I mention it since you didn't mention it in your original post.

Enable 'Run as an Administrator' for Windows 7/Vista application (VS2012/InstallShield2013)

I'm using VS2012 & InstallShield2013 to generate installer file.
Some of the installed user couldn't run this application on WIn 7 OS. But they can get into the installed directory
and right click 'Run as an Administrator' it works.
The icon on the desktop, when i right right click there is no option like 'Run as an Administrator'.
I checked in the InstallShield directory C:\Program Files\InstallShield\2013LE\Support\
There are three files:
SetupExe.Admin.manifest,
SetupExe.Highest.manifest,
SetupExe.Invoker.manifest
So I followed this article : http://helpnet.flexerasoftware.com/installshield20helplib/Content/helplibrary/SpecifyingRequiredExecution.htm
and selected Required Execution Level 'Invoker' and Include MSI Engine:yes in the 'Release Setup /Single Image'
How can i enable the option to right click 'Run as an Administrator'?
It's important for me to fix this problem, for the users of Win 7 32/64 & Win Vista.
I'm totally confused about these files. Please help me.
The settings you reference in InstallShield will not affect how your application itself runs; instead they only change the privileges setup.exe requires when launched.
As for your application, there are a number of potential moving pieces that can affect whether the "Run as administrator" option shows up in the context menu in Explorer:
If the exe referenced by the shortcut has a manifest that requires administrative access, it will always run elevated, and the Run as administrator option will not appear
If the exe referenced is detected as an installer, Windows may choose to act as though it has a manifest requiring administrative access, and thus the Run as administrator option may not appear
If the Program Compatability Assistant (PCA) has decided the program needs administrative access, ditto
If the shortcut's compatibility settings have been modified to select "Run this program as an administrator", ditto
If UAC is disabled, Explorer may choose not to show Run as administrator
Some of these scenarios may persist across uninstallation and reinstallation; Windows can be very aggressive in its attempts to improve the end-user experience. However in all these cases, the end result is that your application would launch as an administrator.
If you always require administrative access in your application, you are strongly advised to implement the first of these: embed a manifest that includes the requiresAdministrator setting. This is equivalent to what the settings you reference change for setup.exe, but must be done in your application's executable.

Error TF30063: You are not authorized to access ... \DefaultCollection

I'm using TFS Preview (Team Foundation Service) with one of my projects with Visual Studio 2012. I'm also using an on-premises TFS server with most of my projects. When I use my on-premises TFS after using TFS preview and go back to using TFS preview, I get this error:
TF30063: You are not authorized to access MyProject\DefaultCollection.
If I go to Team → Disconnect TFS and then connect to TFS preview again, I'm able to see a "Loading identifiers" loading screen coming up, but in the end I don't get to enter my credentials to TFS preview (my Microsoft account) and as a result, the TF30063 error still occurs.
I suspect this has something to do with my Microsoft account (i.e. Live ID). I'm logged in to Windows with the same Microsoft account that I use at TFS preview. I have logged in to other sites (Windows Development Center, MSDN, etc.) with other Microsoft accounts, but I verified that if I log out of these services and re-login with the correct Microsoft account, I still get the TF30063 error when I try to log in to TFS preview from Visual Studio.
When I came accross this issue none of the provided answers solved this problem or if it did I didn't like recreating the project. The way I ended up solving the issue:
Clicking on the "Connect to Team Projects button" (The plug next to the home button in the Team Explorer tab)
Right click the project you are getting this issue on.
Click Connect.
I guess the "Remember me" cookie timed out but gave me a generic response for trying to push or pull any code.
I solved this issue by using the browser from within Visual Studio, View->Other Windows->Web Browser; Ctrl+Alt+R (or * Ctrl+W, W* in VS versions before VS2010) to navigate to the TFS page and log out of the wrong account and log back in.
For me, the issue was caused by using another live-id to unlock a windows phone for development. Somehow the credentials got cached, it seems.
For me the error came after changing my password for my AD account.
I had to remove the line from credential manager (which contained the previous password.)
Then it worked again.
I have upgraded TFS 2015 to TFS 2017, and then the TF30063 error occured on one of my client machines. None of the solutions here worked...
For me the only solution that worked was running the following command from the Developer Command Prompt:
tf workspaces /collection:https://tfs.xxxxx.com/tfs/DefaultCollection
Of course, you need to adjust the url to the valid one.
Source: https://www.visualstudio.com/en-us/docs/setup-admin/tfs/admin/backup/refresh-data-caches
The TFS Preview login apparently uses Internet Explorer and thus might conflict with other MS Accounts you are using. Fully clearing the IE cache seems to work for me. After the cache clearing, I get to the correct login screen and may enter my credentials as needed.
I tried all of the suggestions here. None worked. This could be my particular situation where I connect some VS instances to our company TFS and some instances to my private TFS.
The only way to solve it for me is to close all VS instances and start a new instance.
Oddly enough, connecting to the internal TFS is never a problem. Connecting to *.visualstudio.com sometimes raises this issue.
In VS 2015 it can be achieved by
Team Explorer > Connect > Manage Connections
and selecting the team project again. In case of there exist more than one account in VS, Team Explorer asks for which account to use to connect to the team project.
I tried the following to resolve this issue. Hopefully one of these will work for you
A - Close VS then start the VS Developer Command prompt as an administrator. Then enter: devenv /resetuserdata
B - Clear the cache in IE (apparently VS uses this to access your account mentioned here)
C - Click View -> Other Window -> Web browser (CTRL+ALT+r) sign in to your old account, log out and sign in to your new one
D - Open the folder containing you solution, delete (backup if you want) the Visual Studio Source Control Solution Metadata File delete the .suo file and open the .sln file in Notepad and delete the below section
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 6
SccEnterpriseProvider = {**********************}
SccTeamFoundationServer = theServer
SccLocalPath0 = .
SccProjectUniqueName1 = pro
SccProjectName1 = myProject.BL
SccLocalPath1 = myProject.BL
.....more stuff.....
EndGlobalSection
The last step was required because, while I had managed to disconnect VS my solution was still trying to connect to the old source control account.
Make sure that Windows Authentication hasn't been disabled for the Website / Application within IIS.
I'm not sure HOW this happened, but I did uninstall Hyper-V today to be able to install VMWare Player and then re-install Hyper-V
Reenabling this allowed everything to work again.
In team explorer I removed project... then in Manage Connections, clicked on 'Connect to a Project...'
In this screen choose your project then click on Connect... this solved my problem.
This happens to me regularly, and none of the solutions described above works every time.
Most of the times the solution where you use the "Connect to Team Projects button" works fine, but sometimes nothing happens when I do this.
Other times I simply have to re-login to http://tfs.visualstudio.com using the Visual Studio built-in browser (Ctrl+Alt+R) or via Internet Explorer.
(As suggested in some of the other answers, for my part this is not caused by multiple live-ids)
None of the current answers worked for me. I found a solution here.
The issue was that my previous credentials were cached by the Windows
OS for the TFS server. While some people might have had success wiping
out the AppData temp folders, that is not required.
You need to update the credentials through Control Panel on the
Windows OS.
For me on Windows 10: Close VS. Go to Control Panel (with small icon
view)-->User Accounts-->Manage your credentials (on the left
column)-->Select "Windows Credentials"-->Scroll down to the "Generic
Credentials" section and look for your TFS server connection. Expand
the pull down and click "Edit". Enter in new network password. Reopen
VS and everything should work again.
Just restarting the visual Studio would do the job. As I did this and it worked like a charm
I have just removed the server from Team Explorer, then added again, and it worked =).
When Visual Studio prompted me for Visual Studio Team Services credentials there are two options:
Use a "Work or School"
Use a "Personal" account
In my situation I was using a work email address, however, I had to select "Personal" in order to get connected. Selecting "Work or School" gave me the "tf30063 you are not authorized to access..." error.
For some reason my email address appears to be registered as "personal" even though everything is setup in Office 365 / Azure as a company. I believe the Microsoft account was created prior to our Silver Partnership status with Microsoft.
Disconnect from Team Fountation Server under Team Menu and reconnect it from Connect Tab under Team Explorer Window
I got this error, after all fiddling work I could do — the disk space was full!
Clearing it fixed my issue.
I was also facing the same issue as you did. Here is what I did to solve:
METHOD 1
Click the 'Connect' icon just next to Home icon in Solution Explorer.
Choose your project > Right Click > Connect.
Try Check-in the project and this time it will happily proceed.
This is what I tried, and I did not need to logout from any sessions from TFS or VS Account.
METHOD 2
Just press refresh on the top of Team Explorer.
Try to Check-in.
This is also easy method.
Hope this helps.
I had to "run as a different user" to get Visual Studio to connect using my TFS account. It seemed to be trying to use my Microsoft account instead.
Text and image from: https://www.visualstudio.com/en-us/docs/connect/connect-team-projects
To change accounts
To run Visual Studio under an account that is different from your logged on Windows account, open the context menu for devenv.exe to access your run as options.
You can locate the executable in the following folder: Drive:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE.
I've experienced this issue after an TFS upgrade, and somehow Visual Studio is caching invalid login credentials. I've found two ways to fix it, first, using this answer I completely reset Visual Studio, then reconnected:
Click on menu Tools → Import and Export Settings → Reset all settings → Next → "No, just reset settings, overwriting all current settings" → Next → Finish.
For some strange reason, after the reset it connected without issue (I didn't even have to re-enter my credentials or reconfigure TFS after the reset).
The second approach was easier. First close all instances of Internet Explorer and Visual Studio, then open Internet Explorer and browse to TFS, login, then open Visual Studio again and attempt to connect to TFS one more time.
I finally found the right answer for me on the web.
For me it happened after I changed my password and Windows cached the TFS password. It is require to be updated manually. This is one way to do it:
Solution found at: developercommunity.visualstudio.com
CREDIT: Lavente Nagy! Thanks so much!
Fix Summary:
I found a solution, and it works on Windows 7/Windows 10 too. The steps are the same:
Close Visual Studio. Go to Control Panel (with small icon view) → User
Accounts → Manage your credentials (on the left column) → Select
"Windows Credentials" → Scroll down to the "Generic Credentials"
section and look for your TFS server connection. Expand the pull down
and click "Edit". Enter in new network password. Reopen Visual Studio and
everything should work again.
Check the information in registry :
HKEY_CURRENT_USER\SOFTWARE\Microsoft\VSCommon\Keychain\Accounts and delete the related keys under Accounts section.
Clear the cache in these paths:
%localappdata%\Microsoft\TeamTest
%localappdata%\Microsoft\Team Foundation
%localappdata%\Microsoft\VisualStudio
%appdata%\Roaming\Microsoft\VisualStudio
Hope this will work.
Note: By doing this may clear all the cookies and caches and load the Visual Studio New.
What isn't officially an answer here, but worked for me (the other answers didn't help):
Click Team Explorer tab -> Connect hyperlink - connect\choose repository. And it works.
Make sure your password hasn't coincidentally expired exactly on the same day you decided to install a new dev machine.
If you can't even log into TFS using the web interface then this may be the case.
Now I got the solution to the problem which I have faced:
The TFS remembered the prior password when I got logged in by using my mobile VPN.
Solution:
Resetting the account that I used to connect using VPN
I get this problem when I am forced by our IT security policy to change my password. After a password change, when I connect to TFS using VS2017, I am no longer authorized to access our TFS server and get the TF30063: You are not authorised to access ...:8080/tfs error message.
However, if I connect using VS2013, I can connect to the server without problems and the access denied error with VS2017 goes away.
It would be a lot easier if the error message were to tell us the username it's trying to access TFS with.
I've been coping with this for a while, and usually logging back in only for the next day to stop again.
I found I had two accounts and removing the unwanted one fixed the issue.
This is under Help > Register Visual Studio
Try making Internet Explorer your default browser temporarily.
In my case I had a proxy. I had edited the devenv.exe.config and set the proxy there. But today I changed the proxy domain password and TFS failed (menu View → Windows → Browser also failed). I could of course have edited the devenv.exe again. But there was a solution to remove it altogether. A brilliant one. It is given here.
Open menu TOOLS* → Extensions & Updates.
Click on Updates... in the left-hand menu
Here it asks for password and restarting Visual Studio. All okay. For more info, look for the answer in the link.
press Win button, then type credential manager and open it .
Add generic credentials.
Go back to team explorer, add the server again.

Resources