1

I saw you answered a question for another user for a similar issue and was hoping you could help.

I'm trying to build a settings page for my module.....the module actually works ok, its just when I added a new settings ascx page I started having problems.

My code behind on the settings page

using System;
using DotNetNuke.Entities.Modules;

namespace Ukiset.Registration
{
    public partial class Settings : ModuleSettingsBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        public override void LoadSettings()
        {
            base.LoadSettings();
        }

        public override void UpdateSettings()
        {
            base.UpdateSettings();
        }
    }
}

My design view on settings.ascx

<%@ Control Language="C#" AutoEventWireup="true"   CodeBehind="Settings.ascx.cs" Inherits="Ukiset.Registration.Settings" %>

This is what i'm getting from the event viewer when it throws an error

<pre>
    AbsoluteURL:/Default.aspx
    DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke
    ExceptionGUID:d1050063-f221-43ad-8118-571e7d9818a4
    AssemblyVersion:
    PortalId:-1
    UserId:-1
    TabId:-1
    RawUrl:
    Referrer:
    UserAgent:
    ExceptionHash:SOKwQeZDhciTuPHTIxGH0w==
    Message:Could not load type 'MySite.Registration.Settings'.
    StackTrace:
</pre>

in my build output path I have pointed it to C:\DNN\MyDNNSite\bin\ yet it still throws this problem, can you help?

VDWWD
  • 35,079
  • 22
  • 62
  • 79

1 Answers1

0

Your problem appears to be a Namespace issue.

MySite.Registration.Settings

vs

Ukiset.Registration.Settings

Do you have "MySite" anywhere in your project? Perhaps you've got an ASCX file that still points to MySite.Registration.Settings instead of Ukiset.Registration.Settings?

Is your development solution/project inside of C:\DNN\MyDNNSite\DesktopModules\ ?

As for the BIN folder, after you compile, are you getting the DLL in the c:\dnn\mydnnsite\bin folder?

Chris Hammond
  • 8,873
  • 1
  • 26
  • 34
  • I put in mysite to make the example code for posting generic.......it is actually Ukiset.Registration.Settings. I changed this to post the example but missed one area....so ukiset should be replaced my MySite in the question. And yes the path of my module when i publish goes to C:\DNN\MyDNNSite\DesktopModules\. And the build path is set to c:\dnn\mydnnsite\bin. This is why im not sure what is happenng. – user1379916 Aug 05 '15 at 12:17
  • So you confirmed the build path, but did you confirm that the DLL exists in that path? – Chris Hammond Aug 05 '15 at 12:44
  • Ok Chris....sorry for the delay I had to get back to my desktop just to confirm. So what I did was copy the dll that is produced in my DesktopModules/MyModule folder into the bin folder of my DNN site. This is a local copy just for development. It will later be packaged via DNN to go to the production site. So this has solved the problem for me thanks to your help. – user1379916 Aug 10 '15 at 11:58