Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to sending a mail using my asp.net application,I got error in controls ,The error is
Warning	1	C:\Documents and Settings\KONDAPANENI\My Documents\Visual Studio 2008\Projects\SendMail\SendMail\SendMail\ContactUs\Controls\ContactControl.ascx: ASP.NET runtime 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. (C:\Documents and Settings\KONDAPANENI\My Documents\Visual Studio 2008\Projects\SendMail\SendMail\sendmail\contactus\web.config line 46)	

How to solve this problem
Posted
Updated 30-Jun-12 22:32pm
v2

1 solution

One of the reason is already listed in error itself: This error can be caused by a virtual directory not being configured as an application in IIS
Configure the website properly and check. In case it is configured correctly, this also happens when you have more than one Web.Config file in your application root folder. Just check if you have more than one. If so, remove the duplicate copies.

Read a similar issue resolved here:ASP.NET 2.0 & "allowDefinition='MachineToApplication'" error message[^]

Other useful link that has similar issue discussed: http://forums.asp.net/p/769696/769696.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900