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
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. |
|||
|
|||
19 comments :
when i try to add web service in my console application ,gettting error.
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.
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.
Thank you for this post!!it helped me...
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.
The second method solved my problem. Thanks a lot
hai suresh thanks for your post, successfully cleared
Hi suresh
I have used both of the ways but still facing same error.....
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.....
Thanks it's working fine
Thanks suresh
thanx a lot.really helpful.. :)
It worked for me ..... after I implemented both the changes.
Hi Suresh,
I had been facing the same issue for 2 days.
Finally your solution worked for me.
Thanks
Rajkumar
Thanks suresh
thank you
Thank u very much, This is worked for me.Thanks a lot.
I used both the way but still facing the issue.
I used both the way but still facing the issue. Can you suggest?
Note: Only a member of this blog may post a comment.