Let me start with I am mostly a Java developer, who is getting back into Visual Studio; so I may be missing something very simple....
Anyway, I am helping another developer updating a legacy ASP.NET application. For the past 15 years, the application has had a single developer, always with a single development workstation. Now we have two developers, and will be adding a third.
So as part of this effort, we have implemented Team Foundation Server, created a single solution to combine the previous multiple projects with unique solution files. However, in the new solution file, the IIS application seems to run fine, but when you
open any .aspx page in Visual Studio 2013 you get two error lines stating the above error.
I have so far verified the following:
-- Project namespace matches the Namespace declaration on the xx.aspx.vb file
-- Inherits attribute on the page directive in xx.aspx matches the project namespace "." class name e.g. project.add_account
A few constraints:
-- For organization reasons, the aspx and related files are in a sub folder called "navigation". This is a sibling folder to the "My Project" folder VS creates. (I can move it, I just want to keep the folder structure)
-- The legacy code/files makes extensive use of the "_" to separate words in the names of files. e.g. add_account. I do not want to even consider renaming all 200+ web pages.
Thank you for the reply, but I was on vacation so I did not get back to you earlier.
I have the project files set to use .Net 4.5.1
The IIS Application Pools are set to 4.0
Lastly, we do not have a reference to HttpContext that I can find in my application. Maybe the third party controls have it, and the error is propagating?
-- The legacy code/files makes extensive use of the "_" to separate words in the names of files. e.g. add_account. I do not want to even consider renaming all 200+ web pages.
That actually should be quite easy; navigate to the method and place the cursor in the name and refactor; VS will check all code and rename the method in all places where it is used.
Only Robinson Crusoe had everything done by Friday.
None
0 Points
2 Posts
Error 104 'Context' is not a member of 'XXXXX'
Jun 24, 2015 02:47 PM|tspear|LINK
Let me start with I am mostly a Java developer, who is getting back into Visual Studio; so I may be missing something very simple....
Anyway, I am helping another developer updating a legacy ASP.NET application. For the past 15 years, the application has had a single developer, always with a single development workstation. Now we have two developers, and will be adding a third.
So as part of this effort, we have implemented Team Foundation Server, created a single solution to combine the previous multiple projects with unique solution files. However, in the new solution file, the IIS application seems to run fine, but when you open any .aspx page in Visual Studio 2013 you get two error lines stating the above error.
I have so far verified the following:
-- Project namespace matches the Namespace declaration on the xx.aspx.vb file
-- Inherits attribute on the page directive in xx.aspx matches the project namespace "." class name e.g. project.add_account
A few constraints:
-- For organization reasons, the aspx and related files are in a sub folder called "navigation". This is a sibling folder to the "My Project" folder VS creates. (I can move it, I just want to keep the folder structure)
-- The legacy code/files makes extensive use of the "_" to separate words in the names of files. e.g. add_account. I do not want to even consider renaming all 200+ web pages.
What am I missing?
Tim
All-Star
18815 Points
3831 Posts
Re: Error 104 'Context' is not a member of 'XXXXX'
Jun 25, 2015 02:49 AM|Nan Yu|LINK
Hi tspear,
Thanks for your post.
According to your description , it seems that you are running your site with 1.1 version of the framework.
The HttpContext.Profile Property is new to .NET V2.0 ,please try to use .net 2.0 .
Best Regards,
Nan Yu
None
0 Points
2 Posts
Re: Error 104 'Context' is not a member of 'XXXXX'
Jul 13, 2015 12:19 PM|tspear|LINK
Nan,
Thank you for the reply, but I was on vacation so I did not get back to you earlier.
I have the project files set to use .Net 4.5.1
The IIS Application Pools are set to 4.0
Lastly, we do not have a reference to HttpContext that I can find in my application. Maybe the third party controls have it, and the error is propagating?
Tim
All-Star
18815 Points
3831 Posts
Re: Error 104 'Context' is not a member of 'XXXXX'
Jul 13, 2015 08:59 PM|Nan Yu|LINK
Hi tspear ,
Please also check similar cases(using controls),link below is for your reference:
http://stackoverflow.com/questions/12798534/context-is-not-a-member-of-in-asp-net-usercontrol .
http://bytes.com/topic/asp-net/answers/568375-context-not-member .
Best Regards,
Nan Yu
Member
20 Points
9 Posts
Re: Error 104 'Context' is not a member of 'XXXXX'
Sep 17, 2015 09:54 PM|YangBei|LINK
Hi,
Please show me your error in detail. you can copy the full exception info from vs2013. help us address the problem.
Thanks.
Contributor
3054 Points
1018 Posts
Re: Error 104 'Context' is not a member of 'XXXXX'
Nov 30, 2015 07:42 AM|wim sturkenboom|LINK
Not addressing your main issue.
That actually should be quite easy; navigate to the method and place the cursor in the name and refactor; VS will check all code and rename the method in all places where it is used.