Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsIFrameIFrameDataProvider.Instance in Controller.vb file is flagged as a warningDataProvider.Instance in Controller.vb file is flagged as a warning
Previous
 
Next
New Post
3/4/2008 10:38 PM
 

I have DNN 4.5.5.
I develop in Visual Web Developer.
I recently upgraded the iFrame module from 3.2.3 to 4.3.0.

Before the upgrade I got no errors or warnings when I performed a build on my web site.  After the iFrame upgrade, I get the following warning when I run a build:

"Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated."


This warning appears in the file \App_Code\IFrame\Controller.vb at line 199, column 40.

An excerpt from the Controller.vb file is shown below.


193        ''' <summary>
194        ''' Gets the single instance of the current <see cref="DataProvider"/>.
195        ''' </summary>
196        Protected ReadOnly Property DataProvider() As DataProvider
197            Get
198                If Me._dataProvider Is Nothing Then
199                    Me._dataProvider = DataProvider.Instance
200                End If
201                Return Me._dataProvider
202            End Get
203        End Property


The warning is flagged at DataProvider.Instance in line 199.

I'm not a programmer of your level, so I don't understand the warning, and I don't know if something related to the iFrame will not work as a result.  Does something else need to be installed?  How do I fix this?

Thanks,
SK

 
New Post
3/5/2008 3:50 AM
 
  1. I can not reproduce on DNN4.8.1 / VS2005.
  2. As IFrame is a WSP module, even no build is needed. Ignore that warning.

Maybe VWD doesn't realize that DataProvider.Instance points to DotNetNuke.Modules.IFrame.DataProvider.Instance?

 
New Post
3/6/2008 1:10 AM
 

Thanks, Stefan.

If I have to ignore the warning I will, but the engineer in me would like to find out if this is just a glitch with VWD, or a problem resulting from performing an upgrade.  I have some very important stuff going on in several iFrames, so if this is a potential site crasher, I need to know now.

I'm not really a programmer, so please forgive me if I sound stupid regarding the following text.

So... I looked for a class or a namespace called either:

DotNetNuke.Modules.IFrame.DataProvider.Instance

or

DotNetNuke.Modules.IFrame.DataProvider


There was nothing close in the Controller.vb file.  What I did find, related to the iFrame, was:

Imports DotNetNuke.Modules.IFrame.Domain
Imports DotNetNuke.Modules.IFrame.Data


Now VWD recommends a possible solution to line 199.  It suggests changing:

Me._dataProvider = DataProvider.Instance

to

Me._dataProvider = Data.DataProvider.Instance


In the namespace DotNetNuke.Modules.IFrame.Data, in the file DataProvider.vb, there is a property called Instance, shown below.


#Region "| Properties |"

        ''' <summary>
        ''' Gets the single instance of the <c>DataProvider</c> object.
        ''' </summary>
        Public Shared ReadOnly Property Instance() As DataProvider
            Get
                If _provider Is Nothing Then
                    _provider = CType(Reflection.CreateObject(ProviderType, ProviderNamespace, ""), DataProvider)
                End If
                Return _provider
            End Get
        End Property

#End Region




If I try the suggested change, the warning goes away, but since I don't really understand what this change means, or if it is even correct, I didn't save the changes.

What do you think?  Is there something different between my DNN 4.5.5 and your DNN 4.8.1 that is causing this warning?

SK

 
New Post
3/6/2008 5:22 AM
 

You make it worse!,

Just change

199                    Me._dataProvider = DataProvider.Instance

to

199                    Me._dataProvider = DotNetNuke.Modules.IFrame.Data.DataProvider.Instance

and even the stupids IDE should stop any warning.


Update: Sorry, I was to quick reading your last post. The suggestion of VWD is ok. IMHO all code is equal, and everytime the code inside DataProvider.vb is called. I would not call it a glitch - there is none, and it is not a potential site crasher at all.

What really has changed is the type of the module, it is source only and come without any assemblies. If you build inside VWD, you actually just provide a "test compile run".  however you can also adopt any changes with NotePad, save it and these changes are adopted directly without any (external) build needed. The ASP.NET 2.0 engine compiles on the fly.

 
New Post
3/6/2008 2:32 PM
 

Thank you, Sir.  My IDE and I feel much better.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsIFrameIFrameDataProvider.Instance in Controller.vb file is flagged as a warningDataProvider.Instance in Controller.vb file is flagged as a warning


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out