Need help fixing the web.config error

I created a project in vs2010 using and C# for .net 4
It runs just fine from my local machine.  I publish and deploy to a web server running IIS 7.  I created a folder under the default website and put all my files there.  Now when I tried accessing this new site and it gives error as attached below.  This is when I noticed that the web.config has the form authentication and the membership....  I just want a public page with none of these stuff.  Can I just delete all of that?  Thank you.
Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: 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.

Source Error: 

Line 16:     <compilation debug="true" targetFramework="4.0" />
Line 17: 
Line 18:     <authentication mode="None">
Line 19:       <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
Line 20:     </authentication>

Source File: D:\inetpub\wwwroot\pp\web.config    Line: 18

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vikram Singh SainiSoftware Engineer cum AD DeveloperCommented:
Yes! You can remove all those membership, authentication and profile elements. It will work successfully. See below:

<?xml version="1.0"?>

    <add name="ApplicationServices"
         connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
         providerName="System.Data.SqlClient" />

    <compilation debug="true" targetFramework="4.0" />

     <modules runAllManagedModulesForAllRequests="true"/>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lapuccaAuthor Commented:
Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.