+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / adding a .dll reference to global.asax

adding a .dll reference to global.asax

3 posts, 0 answered
  1. Trevor
    Trevor avatar
    18 posts
    Registered:
    05 Oct 2010
    29 Oct 2010
    Link to this post
    Hey guys,

    I need to throw a few things into the Application_Start method in the global.asax file and I'm not sure how to add references to the file.

    My file looks like this
    <%@ Application Language="C#" %>
    <%@ Import Namespace="System" %>
    <%@ Import Namespace="System.Configuration" %>
    <%@ Import Namespace="System.Collections.Generic" %>
    <%@ Import Namespace="MyServicesIWantToAdd" %>

    <script runat="server" >
       
        void Application_Start(object sender, EventArgs e)
        {
            // Code that runs on application startup
        }
    </script>

    Now its able to successfully import the system references, but it errors out when it gets to MyServices. The .dll file for MyServices is in the website's \bin folder. Is there a way (without having to convert this whole thing to a web app) to reference MyServices.dll in the global.asax file?

    Thanks,
    Trev
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    29 Oct 2010
    Link to this post
    Hi Trevor,

    You have to type the namespace to the class you want to use like

    Telerik.Cms.Engine.ContentManager.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Trevor
    Trevor avatar
    18 posts
    Registered:
    05 Oct 2010
    29 Oct 2010
    Link to this post
    Ah, I see... silly question...

    Thanks for the help!
    Trev
Register for webinar
3 posts, 0 answered