Aspdotnet-Suresh

aspdotnet-suresh offers C#.net articles and tutorials,csharp dot net,asp.net articles and tutorials,VB.NET Articles,Gridview articles,code examples of asp.net 2.0 /3.5,AJAX,SQL Server Articles,examples of .net technologies

The requested page cannot be accessed because the related configuration data for the page is invalid problem in IIS

May 21, 2011
Introduction:

In this article I will explain how to solve the requested page cannot be accessed because the related configuration data for the page is invalid problem in IIS7.
 
Description:

Previously I explained how to solve
Login failed for user in IIS. Recently I started working with IIS7 at that time I face some of strange problems to rectify those errors I did some modifications in IIS. After seen those errors I decided to write this post to help people who are need with this error.  I did one sample application and deploy application in IIS. I started running my deployed application at that time I get error like this 

The requested page cannot be accessed because the related configuration data for the page is invalid

We can solve this problem in two ways. I will explain two ways

First Way

We need to change the config section applicationHost file

First Open folder path based on this

C:\Windows\System32\inetsrv\config

After open this path we will find applicationHost file in this path like this


Now select applicationHost file and right click on applicationHost file and open with Notepad to modify config section.

After open applicationHost file with Notepad

 Go to <configSections> under that go to <sectionGroup name="system.webServer">


<section name="handlers" overrideModeDefault="Deny" /> change this value from "Deny" to "Allow"  
<section name="modules" allowDefinition="MachineToApplication" overrideModeDefault="Deny" /> change this value from "Deny" to "Allow"  
After change those values save your applicationhost file and run your application it will work for you.

If above method work then fine other wise use another way.

Second Way

Open Control Panel --->  Programs ---> Turn Windows features on or off

Now click on Turn Windows features on or off one window will open in that

Select Internet Information Service ---> Select World Wide Web Services ---> Select Application Development Features ---> now tick(select) Asp.net


Whenever we select Asp.net this will adds relevant mappings to handle ASP.NET extensions correctly


I hope it will help you to solve your problem. Happy Coding

If you enjoyed this post, please support the blog below. It's FREE!

Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email.

subscribe by rss Subscribe by RSS subscribe by email Subscribe by Email

19 comments :

Anonymous said...

when i try to add web service in my console application ,gettting error.

Anonymous said...

and error is:
There was an error downloading 'http://localhost/webservice/Service.svc'.
The request failed with HTTP status 404: Not Found.
Metadata contains a reference that cannot be resolved: 'http://localhost/webservice/Service.svc'.
The remote server returned an unexpected response: (405) Method Not Allowed.
The remote server returned an error: (405) Method Not Allowed.
If the service is defined in the current solution, try building the solution and adding the service reference again.

Unknown said...

Hi Suresh Dasari,
Thanks for the info. The second way solved my problem. I was creating a webservice. First gave me error WAS or W3SVC not found. then I added these features from "Turn windows features". Then i had problem with http port 80 being used by some other process. So binding to 8080 for now. Then i got the problem of app.config has related config data invalid. Then I saw your post. That solved it.

Anonymous said...

Thank you for this post!!it helped me...

Anonymous said...

Munna Kumar Singh:
------------------------------------

I too had the similar issue and i fixed it by commenting some sections in web.config file.

The project was earlier built and deployed in .Net 2.0. After migrating to .Net 3.5, it started throwing the exception.

*Resolutions:*
--------------

If your configuration file contains "<*sectionGroup name="system.web.extensions*>", comment it and run as this section is already available under Machine.config.

Anonymous said...

The second method solved my problem. Thanks a lot

kiran said...

hai suresh thanks for your post, successfully cleared

Unknown said...

Hi suresh

I have used both of the ways but still facing same error.....

Unknown said...

Hai suresh,

I have added some changes in web.config files but raise to some error in local like


HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

Please help me.....

Anonymous said...

Thanks it's working fine

Unknown said...

Thanks suresh

Unknown said...

thanx a lot.really helpful.. :)

Krishna Sinha said...

It worked for me ..... after I implemented both the changes.

Rajkumar said...

Hi Suresh,

I had been facing the same issue for 2 days.
Finally your solution worked for me.

Thanks
Rajkumar

Anonymous said...

Thanks suresh

Unknown said...

thank you

Unknown said...

Thank u very much, This is worked for me.Thanks a lot.

Unknown said...

I used both the way but still facing the issue.

Unknown said...

I used both the way but still facing the issue. Can you suggest?

Give your Valuable Comments

Note: Only a member of this blog may post a comment.

© 2015 Aspdotnet-Suresh.com. All Rights Reserved.
The content is copyrighted to Suresh Dasari and may not be reproduced on other websites without permission from the owner.