Unable to modify or recompile

Jul 3, 2010 at 5:58 AM

Hi there !

First of all ,Thanks for the nice work , I Tested and used your DLL , And works fine .

But if you add the "Weblight" project to your solution , Even without any changes , All the time raise an error (for instance :Collapsible panel). The error  comes from

ResourceController.cs    Line: 58 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 56:         {
Line 57:             ConfigurationManager cm = ConfigurationManager.GetConfiguration();
Line 58:             ControlConfiguration ctrlConfig = ConfigurationManager.GetControlConfig(cm.ControlConfigurations, controlName);
Line 59:
Line 60:             if (ctrlConfig == null)

Please take a look at this , I didn't figured out why is that ? I need to do some changes in style-sheets of some controls , as i said even without changing just recompiling I get this error .

Thanks again for your nice work.

Jul 7, 2010 at 10:01 AM
No answer ? Evey time i recompile , the assembly doesn't work which is sad :(
Coordinator
Aug 11, 2010 at 11:43 AM

Hi Mostafa,

Thanks for your words of appreciation.

The error is a runtime exception. Please check if you have configured the weblightConfiguration configuration section in your web.config

Here is the web.config from the sample project :

<?xml version="1.0"?>
<configuration>
    <configSections>
        <section name="weblightConfiguration" type="WebLight.Configuration.ConfigurationManager, WebLight"/>
    </configSections>
    <weblightConfiguration loadJQuery="false">
        <controls>
            <control name="autocomplete" loadCSS="true"/>
            <control name="collapsiblepanel" loadCSS="true"/>
            <control name="hijricalendar" loadCSS="true"/>
            <control name="imagedropdown" loadCSS="true"/>
            <control name="livevalidator" loadCSS="true"/>
            <control name="messagebox" loadCSS="true"/>
            <control name="valuespinner" loadCSS="true"/>
        </controls>
    </weblightConfiguration>
    <system.web>
        <compilation debug="true"/>
        <httpHandlers>
            <add verb="*" path="HijriCalendar.ashx" type="WebLight.Handlers.HijriCalendarHandler, WebLight"/>
            <add verb="*" path="CaptchaImageHandler.ashx" type="WebLight.Handlers.CaptchaImageHandler, WebLight"/>
        </httpHandlers>
        <pages>
            <controls>
                <add assembly="WebLight" namespace="WebLight.Web.Controls" tagPrefix="weblight"/>
            </controls>
        </pages>
    </system.web>
</configuration>

Try this out and let me know if you need any assistance. Also, if you are looking for any new controls, please let me know.

--
Adnan Rashid