Problem loading solution Security exception

25. January 2008

I discovered a problem with loading projects which had been compressed into a zip file. When I try to unzip and open the solution Visual Studio comes up with a Security Exception.

1

I found out that if I marked the solution and all the projects in this solution as Unblock in the properties of the files Visual Studio will then load the project again as normal.

2

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Visual Studio .NET 2005

C# Settings

18. December 2007

How does the settings included in the .NET Framework.

There is two types of settings:

  • User
  • Application

 

User

The user settings can be edited when the application is running.

Those settings are stored in the app.config but if the user edits them they are 'surprisingly' not stored in the app.config again but they under the current user in a user.config file witch only contains the User settings from the app.config.

Location of the user.config file:

During runtime, each individual user (of your computer) will maintain his/her own copy of the app.config file, which will be named user.config. This file can be found within the following directory:


C:\Documents and Settings\USER\Local Settings\Application Data\<Project Name>
In my case, it is:

C:\Documents and Settings\MY USER\Local Settings\Application Data\AppSettingsInCS
Within this folder, you will find another folder, named something like:

AppSettingsInCS.vshost.ex_Url_dcjtbf3vhoeael5lvzjkefwbzccd3hbz

And within this folder, you will find a folder based on the version number of the application (in my case it is 1.0.0.0).

Application

Settings of this type are shared between all users and can't be edited when the application is running.

 

For more info look at the msdn or this page

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Visual Studio .NET 2005

Certificates for WCF - MakeCert.exe

6. December 2007

If you have to create a certificate to use under developing an application here is some good links:

Creating Test Certificates with Makecert.exe

Creating A Private Key-Public Key Pair

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tools, Visual Studio .NET 2005

Visual C# 2005 Keyboard Shortcut Reference Poster

12. November 2007

Here is a poster with the shortcuts for VS 2005. link here

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Visual Studio .NET 2005

UML 2 Shapes for Microsoft Visio 2007

21. October 2007

If you are using Visio to draw UML diagrams you should take a look at this web side link.

You can download the notations here

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Visual Studio .NET 2005, Unified Modeling Language

Making Your Application UAC Aware

20. August 2007

This article is a guide to making applications UAC aware for Vista. An application can be made Vista aware through the use of an embedded manifest.

The Manifest

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
            </requestedPrivileges>
        </security>
    </trustInfo>
</assembly> 

Levels

Level Description
asInvoker Does not require elevation, runs without requesting elevation using privileges of its parent process.
highestAvailable Requests the highest available privilege tokens of its parent process. An administrator account will attempt to elevate to full administrator level, but a standard account will only request elevation to its own highest set of access tokens.
requireAdministrator Requires elevation to full administrator privileges.

 

Embedding the manifest into the file

In this example a manifest file saved as Foobar.exe.manifest is added to an application named Foobar.exe. Note the #1 for application.

mt.exe -manifest "Foobar.exe.manifest" -outputresource:"Foobar.exe";#1    

In this example a manifest file saved as Foobar.dll.manifest is added to a class library named Foobar.dll. Note the #2 for a code library.

mt.exe -manifest "Foobar.dll.manifest" -outputresource:"Foobar.dll";#2   
Using Visual Studio post-build command to embed the manifest

"$(DevEnvDir)..\..\SDK\v2.0\bin\mt.exe" -manifest "$(ProjectDir)Foobar.exe.manifest" -outputresource:"$(TargetPath)";#1 

References

Making Your Application UAC Aware link

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Visual Studio .NET 2005

MSI installer

19. July 2007

Here is a short description of how the MSI installer in Visual Studio works.

Klik Here

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Visual Studio .NET 2005

Remove Source Safe Bingings from Projet and solution

11. July 2007

There is two ways to remove the source safe binding.

  • Use Visual Studio to remove the binding
  • Manual remove.
Use Visual Studio
  • Start visual studio without acces to the source safe server

  • Select the Permanently remoce source control association bindings
  • Klik ok.
Manual remove

1 - Go to the folder containing the solution files and delete the following:
          mssccprj.scc
          MyProject.vssscc
          vssver.scc

2 - Open MyProject.sln in your favorite text editor and remove the following section:
          GlobalSection(SourceCodeControl) = preSolution
                     ...
          EndGlobalSection

3 - Go to the folder containing the project files and delete the following:
          MyProject.vbproj.vspscc
          mssccprj.scc
          vssver.scc

4 - Open MyProject.vbproj in your text editor and remove the following lines:
          SccProjectName = "SAK"
          SccLocalPath = "SAK"
          SccAuxPath = "SAK"
          SccProvider = "SAK"

Now you can open the solution/project with no source control errors.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Visual Studio .NET 2005

Post build. Add assembly to GAC

10. July 2007

In Visual studio under the project click propeties.
Then select the build events and then the post build event command line
Enter:

CALL "%VS80COMNTOOLS%\vsvars32.bat" > NULL
gacutil.exe /if "$(TargetName)"

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Visual Studio .NET 2005 ,