[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1109
  • Last Modified:

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

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
jeffreyjseaman
Asked:
jeffreyjseaman
  • 2
1 Solution
 
Jerry MillerCommented:
Is your folder named AppCode or App_Code? AppCode won't work and App_Code should.
0
 
Jerry MillerCommented:
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now