ASP.NET & IIS7 : losing access rights all of a sudden - asp.net

I'm working locally on an ASP.NET website under Windows 7, and I experience stange behaviours sometimes ...
I've been working several days with several Visual Studio opened, working on the website, then I switched to compiling and deploying some others apps until yesterday, and today, I had to get back working on the website.
So I launched a browser and entered the url "//localhost/" as usual ...
Unexpectedly, IIS tells me :
HTTP Error 500.19 - Internal Server
Error
Error Code 0x80070005
Config Error Cannot read configuration
file due to insufficient permissions
Config
File \?\C:\DVP-WP\SQ2sln_web\web.config
Well, 2 days ago, web.config was accessed without trouble !
What happened? Of cours, I cannot remember having changed anything regarding ACL or accounts or .. just writing c# code and asp.net and compiling !!!
Why does this happen ?
STEP2: So I went to the folder where the website files are located and applied some security:
I specify machine\IIS_IUSR to have read access to the folder website folder ("SQ2sln_web")
... OK , II7 now servers the aspx pages I request at the root level ... but not the css file!
HTTP Error 401.3 - Unauthorized
Requested URL
[...] localhost:80/soquiz.css
Physical Path
C:\DVP-WP\SQ2sln_web\soquiz.css
Logon Method Anonymous
Logon User Anonymous
So I set some specific rights to the file itself (see picture at http://soquiz.com/resources/documents/acl%20problem%20file%20specific.gif)
... but it did not solve the problem
1) Does anyone know WHY or HOW access rights change ?
2) Does anyone know why setting specific acl to one file do not work ?
Thank you!

I think you need to check the account that your application pool is running under as well.

Related

HTTP Error 500.19 - Internal Server Error while attempt to browse web application

On my attempt to access my site from IIS, i am getting following error.
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Module: IIS Web Core
Notification: Unknown
Handler: Not yet determinedError Code
Error Code: 0x80070005
Config Error: Cannot read configuration file due to insufficient permissions
Logon Method:Not yet determined
Logon User:Not yet determined
I am not sure what to do. I have already given full control to mycomputerName\ISS_IUSRS for applicationHost file in C:\Windows\System32\inetsrv\config. Also, I have given full control to mycomputerName\ISS_IUSRS for applicationHost file to my solution folder and web.config file. However, when I click on my application from IIS and attempt to browse it by clicking on manage Application\browse, I am still getting this error.
If anyone could help me, that would greatly be appreciated,
Thanks
This problem mostly occurs when the IIS application don't have the permission to the read the application configuration files. IIS application uses the IIS_IUSRS user to read the Web application.
The IIS_IUSRS user will have default read and execute access for the folder C:\inetpub\wwwroot\ once when you install the IIS. Kindly copy your Web Application folder to the above mentioned directory and give the read access or full control(if the IIS_IUSRS don't have the read and execute permission) for the IIS_IUSRS to your application folder.

500.19 - Internal Server Error ISS website

I tried creating new web applications...
I have been using VS 2010 for developing website
I make use of wsp builder to package all my dlls, pages, scripts and images into a solution package and deploy it in the web applications.
I am trying to get a MVC Web App running in my IIS. Unfortunately, I am absolutely stuck on this error:
HTTP Error 500.19 - Internal Server Error
The Request page cannot be accessed because the related configuration data for
the page is invalid.
Module: IIS Web Core
Notification: Unknown
Handler: Not yet determined
Error Code: 0x80070005
Config Error: Cannot read configuration file due to insufficient permissions
Config File: \\?\C:\Users\dev.fuji\Desktop\Mywebiste\web.config
Request URL: http://xxx.xxx.xxx.xxx
Logon Method: Not yet determined
Logon User: Not yet determined
Config Source
-1:
0:
I am not quite sure what else to do. Why I got this error, I search even youtube but everyone get it worked but why not me.. I do almost exactly they done.
MAYBE** because before this the server already done by someone else in my place... I new worker in my it department...so I miss the installment part in video.. Is that what make the error? Do I have to reinstall my iis??
If anyone has any information or would be able to help me work through this it would be much appreciated. Thanks!
Your config file shouldn't be located on the dev desktop.. it should be within your website, and that website should be located somewhere within IIS (default location is c:\inetput\wwwroot\). Start there, if you have any questions, I'd say give this URL a shot first: http://www.iis.net/learn/get-started/getting-started-with-iis/create-a-web-site

Folder accessing error in ASP.NET

I am working on a asp.net website which is created by someone else.
Some files are exist in root folder and some are exist in one sub folder.
I can access all files from root folder in the browser, however when try to access the pages from sub folder is shows following error
Access is denied.
Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.
Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance.
I unable to point out the issue. I checked the web.config file, but didnt get anything related to that folder. I know it is difficult to find the exact issue in my case, but I would appreciate if anyone can give me possible reasons or clues so that i can try.
Thanks in Advance.
EDIT
There is a sub folder web.config with the following content
However, even if I login with "administrator" it fails.
I got the issue, actually previously it was Forms authentication which I commented out.
Is there a web.config file in the sub-folder? These can apply local restrictions.
Other questions that it would be good to know the answer to:
What authentication scheme (forms, windows etc) are you using?
What sort of content are you trying to access (static content or aspx)
what version of IIS are you using?
This sounds like an ACL problem to me. More information, as Xhalent asks, would be useful. Does the user that IIS is using have access to all of the files on the file system?

Quick Question About IIS 7 Asp.Net Setup

I have been trying to configure a small website on a Windows Server 2008 running IIS 7. Unfortunately, when trying to load the website I keep getting the error: Server Error 401 - Unauthorized: Access is denied due to invalid credentials.
The permissions on the website folder include read, write, and execute for user ASP.NET v4.0. I even clicked "Check names" before adding the user to folder, to make sure that I spelled everything correctly. But the error continues to show. Also, I noticed that everything works okay if I add "Users" to the permissions for the folders containing the website, but I don't see why this should be necessary. I only want to give ASP.NET v4.0 access to the folder.
Some other noteworthy points include that I'm using the ASP.NET v4.0 application pool, that the managed pipeline is integrated, and that load user profile is set to true.
If anyone has any ideas, I'd appreciated the help. I'm stumped!
EDIT: Does it matter that the website is on the d: drive? I just assumed this wasn't important...
I find I always need to give IIS_IUSRS access.
I'd recommend you to use the Process Monitor to detect which user is actually accessing the file.
Here you'll find an explanation about how to achieve that.
Open IIS7 on the server. Highlight the site, and double-click on the Authentication icon in the Security Section. Check that Anonymous Authentication is enabled.
Some troubleshooting links for this particular issue:
http://support.microsoft.com/kb/902160
http://support.microsoft.com/kb/907273

Handler not yet determined error

I don’t know anything about deploying a website, so I probably made some stupid mistake.
Anyways, I opened IIS 7 manager, created new virtual directory ( via Add Application ) and pointed it to physical directory where Visual studio saved my Web project. But when I tried to request an .aspx page, browser reported the following error (I won’t post the whole error, but just the interesting bits):
Handler: Not yet determined
Config Error: Cannot read configuration file due to insufficient permissions
Logon User: Not yet determined
A) why is handler not yet determined? As far as I know, IIS7 does have Asp.Net handler registered?!
B) Why wouldn’t IIS have sufficient permissions? Does that mean I should give IIS higher privileges? Or does Asp.Net runtime have insufficient permissions?
C) Could the error also be due to the fact that perhaps it expected the user to authenticate itself? I’m assuming this due to Logon user not yet being determined?
D) And finally, any ideas how to make it work?
thanx
error code:0x8007000d
I started playing with permissions and all the stuff about access issues to web.config or applicationhost.config anyway those did not change the error.
while I was playing with my web.config I deleted rewrite tags from my config file and error changed. then I installed "web platform installer" and installed url rewrite module for IIS and played with some configuration now my site is working. it took about one day to find out this issue I hope it helps someone.
Does the identity of your IIS application pool have sufficient rights to access the folder that is hosting your site?

Resources