Giter VIP home page Giter VIP logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
assigning this issue to release 1.3.1

Original comment by [email protected] on 17 Aug 2008 at 5:20

  • Added labels: Milestone-Release1.3.1

from aspnetserve.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
After long investigation, I see no easy way to _properly_ remove the GAC 
dependency.
So, for the time being, I am putting this ticket on hold.

As a interim solution checkout:
http://jason.whitehorn.ws/2008/08/24/aspNETserve+Without+GAC+Install.aspx

Original comment by [email protected] on 24 Sep 2008 at 2:47

  • Changed state: OnHold
  • Removed labels: Milestone-Release1.3.1

from aspnetserve.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
To get around the GAC, see the hack used by the latest Cassini drop:
http://blogs.msdn.com/dmitryr/archive/2008/10/03/cassini-for-framework-3-5.aspx

In particular, check out CreateWorkerAppDomainWithHost in Server.cs. Here's the 
bit 
which may help you as well:

/* 
********************************************************************************
**
 *
 * Copyright (c) Microsoft Corporation. All rights reserved.
 *
 * This source code is subject to terms and conditions of the Microsoft Public
 * License (Ms-PL). A copy of the license can be found in the license.htm file
 * included in this distribution.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * 
********************************************************************************
**/

static object CreateWorkerAppDomainWithHost(string virtualPath, string 
physicalPath, 
Type hostType) {
    // this creates worker app domain in a way that host doesn't need to be in GAC 
or bin
    // using BuildManagerHost via private reflection
    var uniqueAppString = string.Concat(virtualPath, physicalPath).ToLowerInvariant
();
    var appId = (uniqueAppString.GetHashCode()).ToString("x", 
CultureInfo.InvariantCulture);

    // create BuildManagerHost in the worker app domain
    var appManager = ApplicationManager.GetApplicationManager();
    var buildManagerHostType = typeof(HttpRuntime).Assembly.GetType
("System.Web.Compilation.BuildManagerHost");
    var buildManagerHost = appManager.CreateObject(appId, buildManagerHostType, 
virtualPath, physicalPath, false);

    // call BuildManagerHost.RegisterAssembly to make Host type loadable in the 
worker app domain
    buildManagerHostType.InvokeMember(
        "RegisterAssembly",
        BindingFlags.Instance | BindingFlags.InvokeMethod | BindingFlags.NonPublic,
        null,
        buildManagerHost,
        new object[] { hostType.Assembly.FullName, hostType.Assembly.Location });

    // create Host in the worker app domain
    return appManager.CreateObject(appId, hostType, virtualPath, physicalPath, 
false);
}

Original comment by azizatif on 21 Nov 2008 at 12:44

from aspnetserve.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.