Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

telerik -- supercharge your DNN websites
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Iframe Module [...  DataProvider.Instance in Controller.vb file is flagged as a warning
Previous Previous
 
Next Next
New Post 3/4/2008 6:38 PM
Resolved
User is offline Sandwich Snob
11 posts
Must... learn... DNN.
10th Ranked


DataProvider.Instance in Controller.vb file is flagged as a warning 

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/4/2008 11:50 PM
User is offline Stefan Cullmann
1489 posts
6th Ranked








Re: DataProvider.Instance in Controller.vb file is flagged as a warning 
  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?


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com

forms & Lists (UDT5.0) will be the next major release of the User Defined Table project.
A first Preview is available, though it requires DotnetNuke 5 (Beta 5).

Need to import external data to a UDT? Try http://www.codeplex.com/Csv2UDTImport

 
New Post 3/5/2008 9:10 PM
User is offline Sandwich Snob
11 posts
Must... learn... DNN.
10th Ranked


Re: DataProvider.Instance in Controller.vb file is flagged as a warning 

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 1:22 AM
User is offline Stefan Cullmann
1489 posts
6th Ranked








Re: DataProvider.Instance in Controller.vb file is flagged as a warning 
Modified By Stefan Cullmann  on 3/6/2008 5:37:57 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.


Stefan Cullmann - stefan.cullmann [at] dotnetnuke.com

forms & Lists (UDT5.0) will be the next major release of the User Defined Table project.
A first Preview is available, though it requires DotnetNuke 5 (Beta 5).

Need to import external data to a UDT? Try http://www.codeplex.com/Csv2UDTImport

 
New Post 3/6/2008 10:32 AM
User is offline Sandwich Snob
11 posts
Must... learn... DNN.
10th Ranked


Re: DataProvider.Instance in Controller.vb file is flagged as a warning 

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

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Iframe Module [...  DataProvider.Instance in Controller.vb file is flagged as a warning
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Intura Vision / Intura Enterprise
Point-of-Sale and business management applications targeted towards quick service, fast casual and delivery-based restaurant concepts.
www.intura.com
Dnaxp.Net
Dnaxp.Net offers a comprehensive base of information, resources, and support for DotNetNuke.
www.dnaxp.net
DNNMasters - modules, consulting, development
DNNMasters developers are involved in DNN development since DNN 1.0.9 and today we offer a broad range of DNN related products and services including custom development of modules, help with ing third party modules for specific needs, general DNN technical support and administrative services.
www.dnnmasters.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP