Heh, yeah, I've seen both of those posts. My module is public and it's not a scope issue with variables.
I've even checked that the servers are supporting my target framework.
According to your description, I suggest that you provide detailed code for ”my_module“ and inline code for your aspx page, which will help us solve your issue more easily.
Best Regards,
YongQing.
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
12 Points
112 Posts
ASPX Inline code can't access Module.
Sep 08, 2019 03:09 AM|Galaxy_Stranger|LINK
In my web application, I call a VB.NET Module inline. It works fine with my compiler.
When I publish to two other development web servers, I get:
Compiler Error Message: BC30451: <my_module> is not declared. It may be inaccessible due to its protection level.
when I reference it in an IF statement on the .aspx page. I've tried putting it into a Namespace, but that didn't work either.
Is there some sort of Publishing or IIS setting that I need to change when I publish?
Contributor
3710 Points
1043 Posts
Re: ASPX Inline code can't access Module.
Sep 09, 2019 02:25 AM|Yongqing Yu|LINK
Hi Galaxy_Stranger,
For this error message, you can try to fix it by adding Public to the default Module.
Or you can also refer to these links :
https://stackoverflow.com/a/11876035
https://stackoverflow.com/a/40445262
Best Regards,
YongQing.
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
Member
12 Points
112 Posts
Re: ASPX Inline code can't access Module.
Sep 09, 2019 05:12 AM|Galaxy_Stranger|LINK
Thanks for the reply!
Heh, yeah, I've seen both of those posts. My module is public and it's not a scope issue with variables.
I've even checked that the servers are supporting my target framework.
Contributor
3710 Points
1043 Posts
Re: ASPX Inline code can't access Module.
Sep 09, 2019 08:47 AM|Yongqing Yu|LINK
Hi Galaxy_Stranger,
According to your description, I suggest that you provide detailed code for ”my_module“ and inline code for your aspx page, which will help us solve your issue more easily.
Best Regards,
YongQing.
Please remember to click "Mark as Answer" the responses that resolved your issue.
If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.