Previously the program was written on VS2005, now I use VS2010 to run the program normally but when I publish the web site I get an error:
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
error CS0433: The type 'webapp4U.UI.Controls.Controls_MenuLeft' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\nhadat_thi2\42a77785\d1e96df3\App_Web_danhmucbds.ascx.cc671b29.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary
ASP.NET Files\nhadat_thi2\42a77785\d1e96df3\App_Web_quangcaoleft.ascx.cc671b29.dll'...
how do I fix the error? You see the attached file:
The error means IIS is not configured correctly or you published the application to a child folder of another application. Create a virtual directory or application in IIS then publish your application.
It seems to me that the problem is with the Usecontrol using a refernce to the .NET DLL for the aspx page that is also using the DLL too that is hosting the Usercontrol. .You're going to have to make the UserControl use the same refernce to the DLL as the
aspx page is using
.NET is telling you that there is an ambiguous refernce is being made to the DLL, and .NET can't make the decision as to what path to take in order to use the DLL
If you find the post has answered your issue, then please mark post as 'answered'.
I am using Windows 7 Ultimate 64 bit and SQL Server 2005, I think it is not an IIS error because when I press F5 in VS 2010 the program runs normally but when I press publish Publish web site I get an error. I cannot install Net 2.0 and Net 4.0, when I install
Net 2.0 error: You must use "Turn window features On or Off" in the Control Panel to install or configure Microsoft .Net Framework 2.0 SP2. When I installed Net 4.0 the error message: Sam or higher version of .Net Framwork 4 has already been installed on this
computer. I go to Control panel-> Programs and features-> Turn windows features On or Off. I do not see Net 2.0 and Net 4.0 to turn On, according to you need to install Net 2.0 and Net 4.0, previously VS 2005-based writing program using Net 2.0, now I switched
VS 2010 using Net 4.0, while Net 2.0 error message, you see the attached image file http://www.mediafire.com/view/j19eosbedbuunlc/ControlPanel.jpg/file
and some other errors:
Message 1 Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:configuration'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 2 Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:configSections'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 3 Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:sectionGroup'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 4 Could not find schema information for the attribute 'name'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 5 Could not find schema information for the attribute 'type'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 6 Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:sectionGroup'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 7 Could not find schema information for the attribute 'name'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 8 Could not find schema information for the attribute 'type'. E:\NhaDat2010\Backup\NhaDat\Web.config
...
Error 105 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. E:\NhaDat2010\Backup\NhaDat\Web.config
58
Error 105 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. E:\NhaDat2010\Backup\NhaDat\Web.config 58
This error commonly points to IIS configuration. Usually the web application is published to a folder that is not configured as a virtual directory or an application, We also see this error when publishing to a folder within an existing application that
again is not a virtual directory or application.
The other error generally happen when there are errors in the code.
Other errors I fix and these 2 errors I haven't fixed yet:
Error 1: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Error 2: error CS0433: The type 'webapp4U.UI.Controls.Controls_MenuLeft' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\nhadat_thi2\42a77785\d1e96df3\App_Web_danhmucbds.ascx.cc671b29.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary
ASP.NET Files\nhadat_thi2\42a77785\d1e96df3\App_Web_quangcaoleft.ascx.cc671b29.dll'...
You can say step by step help me fix virtual directory IIS. I have already done but it is not possible, you can see my image file. http://www.mediafire.com/view/8znvv1re2y8wixn/virtual_directory_IIS6.jpg/file
Member
6 Points
85 Posts
Why can't I Publish web site error CS0433: The type 'webapp4U.UI.Controls.Controls_MenuLeft' exis...
Aug 06, 2019 09:09 AM|dongtrien|LINK
Previously the program was written on VS2005, now I use VS2010 to run the program normally but when I publish the web site I get an error:
It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
error CS0433: The type 'webapp4U.UI.Controls.Controls_MenuLeft' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\nhadat_thi2\42a77785\d1e96df3\App_Web_danhmucbds.ascx.cc671b29.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\nhadat_thi2\42a77785\d1e96df3\App_Web_quangcaoleft.ascx.cc671b29.dll'...
how do I fix the error? You see the attached file:
http://www.mediafire.com/file/q583bdw8nx4lxqx/Web.config/file
http://www.mediafire.com/file/4161930py8agvwg/App_Web_sej5mdlr.0.cs/file
All-Star
53081 Points
23655 Posts
Re: Why can't I Publish web site error CS0433: The type 'webapp4U.UI.Controls.Controls_MenuLeft'...
Aug 06, 2019 10:12 AM|mgebhard|LINK
The error means IIS is not configured correctly or you published the application to a child folder of another application. Create a virtual directory or application in IIS then publish your application.
https://docs.microsoft.com/en-us/iis/get-started/planning-your-iis-architecture/understanding-sites-applications-and-virtual-directories-on-iis
https://docs.microsoft.com/en-us/iis/configuration/system.applicationhost/sites/site/application/virtualdirectory
Participant
850 Points
492 Posts
Re: Why can't I Publish web site error CS0433: The type 'webapp4U.UI.Controls.Controls_MenuLeft'...
Aug 06, 2019 10:24 AM|AddWeb Solution|LINK
Hello, dongtrien
Troubleshoot your problem, please refer below microsoft official document it will help you.
https://docs.microsoft.com/en-us/iis/publish/troubleshooting-web-deploy/troubleshooting-common-problems-with-web-deploy
Thanks.
Contributor
4963 Points
4209 Posts
Re: Why can't I Publish web site error CS0433: The type 'webapp4U.UI.Controls.Controls_MenuLeft'...
Aug 06, 2019 10:30 AM|DA924|LINK
It seems to me that the problem is with the Usecontrol using a refernce to the .NET DLL for the aspx page that is also using the DLL too that is hosting the Usercontrol. .You're going to have to make the UserControl use the same refernce to the DLL as the aspx page is using
.NET is telling you that there is an ambiguous refernce is being made to the DLL, and .NET can't make the decision as to what path to take in order to use the DLL
Member
6 Points
85 Posts
Re: Why can't I Publish web site error CS0433: The type 'webapp4U.UI.Controls.Controls_MenuLeft'...
Aug 07, 2019 04:40 AM|dongtrien|LINK
I am using Windows 7 Ultimate 64 bit and SQL Server 2005, I think it is not an IIS error because when I press F5 in VS 2010 the program runs normally but when I press publish Publish web site I get an error. I cannot install Net 2.0 and Net 4.0, when I install Net 2.0 error: You must use "Turn window features On or Off" in the Control Panel to install or configure Microsoft .Net Framework 2.0 SP2. When I installed Net 4.0 the error message: Sam or higher version of .Net Framwork 4 has already been installed on this computer. I go to Control panel-> Programs and features-> Turn windows features On or Off. I do not see Net 2.0 and Net 4.0 to turn On, according to you need to install Net 2.0 and Net 4.0, previously VS 2005-based writing program using Net 2.0, now I switched VS 2010 using Net 4.0, while Net 2.0 error message, you see the attached image file http://www.mediafire.com/view/j19eosbedbuunlc/ControlPanel.jpg/file
and some other errors:
Message 1 Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:configuration'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 2 Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:configSections'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 3 Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:sectionGroup'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 4 Could not find schema information for the attribute 'name'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 5 Could not find schema information for the attribute 'type'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 6 Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:sectionGroup'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 7 Could not find schema information for the attribute 'name'. E:\NhaDat2010\Backup\NhaDat\Web.config
Message 8 Could not find schema information for the attribute 'type'. E:\NhaDat2010\Backup\NhaDat\Web.config
...
Error 105 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. E:\NhaDat2010\Backup\NhaDat\Web.config 58
All-Star
53081 Points
23655 Posts
Re: Why can't I Publish web site error CS0433: The type 'webapp4U.UI.Controls.Controls_MenuLeft'...
Aug 07, 2019 10:44 AM|mgebhard|LINK
This error commonly points to IIS configuration. Usually the web application is published to a folder that is not configured as a virtual directory or an application, We also see this error when publishing to a folder within an existing application that again is not a virtual directory or application.
The other error generally happen when there are errors in the code.
Member
6 Points
85 Posts
Re: Why can't I Publish web site error CS0433: The type 'webapp4U.UI.Controls.Controls_MenuLeft'...
Aug 08, 2019 02:34 AM|dongtrien|LINK
Other errors I fix and these 2 errors I haven't fixed yet:
Error 1: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Error 2: error CS0433: The type 'webapp4U.UI.Controls.Controls_MenuLeft' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\nhadat_thi2\42a77785\d1e96df3\App_Web_danhmucbds.ascx.cc671b29.dll' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\nhadat_thi2\42a77785\d1e96df3\App_Web_quangcaoleft.ascx.cc671b29.dll'...
You can say step by step help me fix virtual directory IIS. I have already done but it is not possible, you can see my image file. http://www.mediafire.com/view/8znvv1re2y8wixn/virtual_directory_IIS6.jpg/file
Member
6 Points
85 Posts
Re: Why can't I Publish web site error CS0433: The type 'webapp4U.UI.Controls.Controls_MenuLeft'...
Sep 10, 2019 08:31 AM|dongtrien|LINK
Does anyone know this error ? How do I edit it ? Just help me