Solved

.Net variable is not declared. It may be not accessible due to its protection level

Posted on 2012-04-06
2
1,014 Views
Last Modified: 2012-06-27
I have a masterpage.master.vb line of code that calls the App_Code/Variables.vb code directory and code.

Error Message Received: DisplayedMessages is not declared. It may be inaccessible due to its protection level.

Masterpage.master.vb line of code:
(DisplayedMessages) is the variable that is declared as a public in the App_Code/Variables

Catch ex As Exception
            DisplayedMessages = "The Permissions Access was denied:" & ex.Message.ToString
            ErrorMessage = ex.ToString
            LogErrors(ScreenName, ErrorMessage, Session("UserID").ToString)


AppCode/Variables.vb

Public Module Variables
    Public DisplayedMessages As String
 End Module
AppCodeError.jpg
0
Comment
Question by:jeffreyjseaman
  • 2
2 Comments
 
LVL 18

Expert Comment

by:Jerry Miller
ID: 37818142
Is your folder named AppCode or App_Code? AppCode won't work and App_Code should.
0
 
LVL 18

Accepted Solution

by:
Jerry Miller earned 500 total points
ID: 37818151
If your foler is named correctly, you may want to check out this link.

http://vishaljoshi.blogspot.com/2009/07/appcode-folder-doesnt-work-with-web.html
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
WPF - Tooltips for ComboBox items 5 37
Saveas need to save a copy 16 26
Linq Help 1 35
Please explain "Multi-Tenant Services" 5 64
The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now