Main Page
 The gatekeeper of reality is
 quantified imagination.

Stay notified when site changes by adding your email address:

Your Email:

Bookmark and Share
Email Notification
ASP.Net 3.5 And SGEN
Purpose
The purpose of this tutorial is to show how to fix an error with ASP.NET (Visual Studio 2008) when your project is using web services. The error that will be addressed here is "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."

Introduction
The error above is generated when the serializer (SGEN) cannot locate resources with regard to web services in a project. In cases when you cannot simply specify "FullTrust" in the security portion of the web.config (that is, it fails to work), there is one other way to solve the error by changing the ASP.Net configuration on the local computer, detailed in the three steps illustrated below.

STEP 1

(Enlarge)
  1. You experience the SGEN error when you try to build the project containing web services. The specific error involves "SGEN" as "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."
STEP 2

(Enlarge)
  1. With local administrator rights on the local computer, open control panel.
  2. Open the Microsoft .Net Framework Configuration that is used by the project; being ASP.Net 3.5 most likely this will be "Microsoft .NET Framework 2.0 Configuration".
  3. NOTE: If you cannot find it on your system (mscorcfg.msc), you may have to install the .NET Framework 2.0 SDK to get it.
STEP 3

(Enlarge)
  1. Here's where you'll need to drill down through several sections to get to what needs to be changed.
  2. Open My Computer.
  3. Open Runtime Security Policy.
  4. Open Machine.
  5. Open Code Groups.
  6. Open All_Code.
  7. Right-Click on LocalIntranet_Zone.
  8. Select Properties.
  9. Open the tab "Permission Set".
  10. Set the drop-down "Permission set:" to "FullTrust".
About Joe
Find Out Now!