Have Configuration Error

Posted by Naeem2049 under ASP.NET on 2/19/2011 | Points: 10 | Views : 1653 | Status : [Member] | Replies : 16
Hi All,

I have Website application in Visual Studio 2008... When i Build/Run this web application it will give this Configuration Error:

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 52: ASP.NET to identify an incoming user.
Line 53: -->
Line 54: <authentication mode="Windows">
Line 55: <forms loginUrl="~/Authenticate/Login.aspx" name=".ASPXFORMSAUTH" defaultUrl="~/Admin/Home.aspx"/>
Line 56: </authentication>

==============================
Please help me in this........

Thanks

NAEEM




Responses

Posted by: Madhu.b.rokkam on: 2/19/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
It may happen when the ASP.NET account (the account .NET uses to run web sites) does not have read access to your web.config file. check that.

Thanks and Regards
Madhu

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 2/19/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Hi,

Follow these steps and try once
1. run Internet Information Service.
2. right-click on your virtual directory and then select Properties.
3. Choose Directory tab.
4. Near Application name textbox. click on the Create button.
5. Then set Execute Permissions to Scripts only.

Thanks
Karthik
www.f5Debug.net

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naeem2049 on: 2/20/2011 [Member] Starter | Points: 25

Up
0
Down

Hi All,

I am running web application on my system not at server.....

Still not find the exact solution of the problem....

Please help to solve this issue...

Thanks for Help

NAEEM

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 2/20/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
How many web config's do you have in your project ?

Do you have a web config in the Root of your application ?



Thank you for posting at Dotnetfunda
[Administrator]

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naeem2049 on: 2/21/2011 [Member] Starter | Points: 25

Up
0
Down

Hi,

I have Three web Config files in the root of My application...

Because i have few folders also in the root of application .....

Two web config files are in two different folders in the root and one web config file is in the main root of the Application..

Please Help me in this problem....

Thanks for advance help...

NAEEM



Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Karthikanbarasan on: 2/21/2011 [Member] [Moderator] [Microsoft_MVP] [MVP] Silver | Points: 25

Up
0
Down
Check your webconfig file in the root folder.. if the configuration tags are appropriate!!!

Thanks
Karthik
www.f5Debug.net

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 2/22/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
That is exactly the problem, you cant have web configs lying around. the top level one will cancel the low level one. try remove them one by one . Start from the high level


Thank you for posting at Dotnetfunda
[Administrator]

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naeem2049 on: 2/22/2011 [Member] Starter | Points: 25

Up
0
Down

Hi,

When i try to remove web.config files one by one Application is not working some controls are dependent on those web.config files which i have been removed...

Every web .config file have connection string...??
Still searching for solution....???

Please Help its urgent....

Thanks advance to all...

Regards

NAEEM


Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 2/22/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
Atleast i pointed you to the problem. You see every application my have its own web config , if you have application 1, then there must be a folder in application 1 and that should only have one web config so in that way they will not conflict. Refrain for adding an application files just anywhere. Please send me a screenshot of your directory structure and point out the number of web config's


Thank you for posting at Dotnetfunda
[Administrator]

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naeem2049 on: 2/23/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Vuyiswamb,

Attached is my application root directory.....

Please check this out.

Waiting for your kind reply

Thanks

NAEEM
 Download source file

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 2/23/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
ok i now see.

To resolve this , you need to take the Configurations that are important for the "Administration" and "Website" and add then to the web config that is in the Root of the project. If you like, you can send me those web config's and i will help you combine them and delete the one's inside the individual folders and leave the one on the Root. if you are sending the web config's mark them for me so that i can know which one is which one.



Thank you for posting at Dotnetfunda
[Administrator]

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/23/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Thanks for sharing the resolution :)

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 2/24/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
if this is a Solution please mark is as "Resolved"

Thank you for posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naeem2049 on: 2/24/2011 [Member] Starter | Points: 25

Up
0
Down

Hi Vuyiswamb,

I send you the web.config files of all web root directory ...... Mentioning the names of all web.config ......

Please check the Attachment.....

Waiting for your reply.....

Thanks

NAEEM
 Download source file

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 2/25/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
Good morning

i have looked at the Web configs you sent me and it was clear that you onlu needed one web config that is on the Root of your application. i have combined the web configs into one and i have attached it and you can backup the others and remove them from your application. I see you had two connection string that looked the same, so you only need one not more than one.

Hope i have solved your problem

Thank you for posting at Dotnetfunda

Vuyiswa Maseko

 Download source file

Thank you for posting at Dotnetfunda
[Administrator]

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naeem2049 on: 2/27/2011 [Member] Starter | Points: 25

Up
0
Down

Hi Vuyiswamb,

I follow you guidelines n remove all web config files in the root ... Only one web.config file in the main root of the application is remaining... I also copy paste the complete source sent by you in the main web.config file....

Now when i run the application it will give the following Error :

Server Error in '/BookMall' Application.
--------------------------------------------------------------------------------
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /BookMall/Authenticate/Login.aspx

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

Advance Thanks for Help
NAEEM

Naeem2049, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response