Menu

Search

InstantASP Support

Help & Support


Build Errors In VS after installing Active Directory Module


Known Issues

After copying either the InstantForum.NET or InstantKB.NET Active Directory Module into your InstantForum.NET or InstantKB.NET installation  folder you may receive build errors when attempting to compile the solution in Visual Studio.NET. For example…



Cause

This is caused because the web site  & InstantASP.InstantKB.UI or InstantASP.InstantForum.UI projects by default do not have a reference to the InstantASP.LDAP.dll. When you apply the Active Directory code several pages & user controls are replaced which inherit classes from within the InstantASP.LDAP.dll.

Resolution

To resolve build errors you'll need to add a reference to both the web site project and code-behind projects.

Add InstantASP.LDAP.dll references to Web Site

1. Within Visual Studio.NET locate your web site project. Right click the project and choose "Add Reference" as shown below…


2. From within the Add Reference dialog click the "Browse" tab and navigate to the InstantForum2010\Bin or InstantKB2011\Bin folder where you should fine the InstantASP.LDAP.dll as shown below.



Select the "InstantASP.LDAP.dll" and click "OK".  This will add a reference to this assembly from the web site project. 
 
Add InstantASP.LDAP.dll reference to InstantASP.InstantForum.UI or InstantASP.InstantKB.UI

1. Within Visual Studio.NET locate your  InstantASP.InstantForum.UI or InstantASP.InstantKB.UI project. Right click the project and choose "Add Reference" as shown below…


 
2. From within the Add Reference dialog click the "Browse" tab and navigate to the InstantForum2010\Bin or InstantKB2011\Bin folder where you should fine the InstantASP.LDAP.dll as shown below.



Select the "InstantASP.LDAP.dll" and click "OK".  This will add a reference to this assembly from the code-behind project.

Update WinLogin.aspx.vb

Depending on which version of the Active Directory module your using you may need to update the "WinLogin.aspx.vb" file within the web site project to read as shown below….

InstantKB.NET (WinLogin.aspx.vb)

Option Strict On
Option Explicit On
Partial Class WinLogin
    Inherits InstantASP.InstantKB.UI.Base.Page
    Protected Overloads Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
        'setup(MasterPage)
        Me.MasterPageFile = "MasterPage.master"
        ' call base method
        MyBase.Page_PreInit(sender, e)
    End Sub
End Class

InstantForum.NET (WinLogin.aspx.vb)

Option Strict On
Option Explicit On
Partial Class WinLogin
    Inherits InstantASP.InstantForum.UI.Base.Page
    Protected Overloads Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
        'setup(MasterPage)
        Me.MasterPageFile = "MasterPage.master"
        ' call base method
        MyBase.Page_PreInit(sender, e)
    End Sub
End Class

You should now be able to build the solution as before without any build errors…

 That's It!

After making the three changes above the InstantKB.NET or InstantForum.NET solution will build correctly with the Active Directory Module installed within Visual Studio.NET. If you do see any additional build errors or indeed have any questions  please don't hesitate to open a support ticket or contact us.  
 


Optionally provide private feedback to help us improve this article...

Thank you for your feedback!


Comments require login or registration.

Details

Product: InstantKB, InstantForum
Version: All Versions
Type: FIX
Level: Beginner
Article not rated yet.
Article has been viewed 11K times.
Last Modified: 6 Years Ago
Last Modified By: Ryan Healey

Options

Similar Articles


Tags