503 Service Unavailable...Trying to Read Configuration data from file - iis-7

I tried to go to one of my local websites and encountered this error in the event log: "The worker process for application pool 'My Website' encountered an error 'Cannot read configuration file ' trying to read configuration data from file '\\?\', line number '0'. The data field contains the error code."
I received a 503 Service Unavailable on the website and the app pool is stopped.

The solution was to go to C:\inetpub\temp\appPools. In my case, there was a shortcut with the name of my website that doesn't go anywhere. I deleted the shortcut and restarted the website. A folder with the name of the website is created with a .config file inside of it. After that, the website works and the app pool continues running.
This was a strange error. I hope this will help anyone else who encounters it.

Related

HTTP Error 500.19 Can't change IIS permisssions

The Issue
I have cloned down an exiting web forms project and when I try to build, I get the error;
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Below this error, the "Detailed Error Information:" section provided a config file path that seems to point to the correct place, accept to the machine of the previous contributor of the solution.
Below is the approach I took to try resolving this issue
Initially, from this, I tried finding out where this incorrect file path is coming from but came across nothing even vaguely relative so I tried googling the error itself.
I came across this question:
How do I resolve "HTTP Error 500.19 - Internal Server Error" on IIS7.0
An answer provided by Bruce mentioned to:
"Check the directory and see if that user has appropriate rights to
it".
In an attempt to do this, I had a quick google and same across the following question: The requested page cannot be accessed because the related configuration data for the page is invalid error
From intermension's answer, I gathered that it was "ApplicationPoolIdentity" that was not assigned the correct permissions so in ettempting to resolve this, I visited the following link. IIS7 Permissions Overview - ApplicationPoolIdentity
I followed Jon Adams' steps successfully as shown here:
This was unsuccessful and I'm unsure of where to go now.
Thank in advance! :)
You can follow there steps:
Check which application pool your website is using
Change it to use ApplicationPoolIdentity if it is not.
Go to your website directory and search for Application Pool Identity user which has format IIS AppPool{AppPool Name} e.g. IIS AppPool\DefaultWebsite and give it read permissions
In IIS Manager select your website in the left pane and then in right pane double click the HandlerMappings icon to ensure that handlers list show up.

Server error when copying ASP.NET code to another host

Sorry for the simple question.
I have moved a site to a host by simply copying the code but even the first login page fails if I include the following :-
In Web.config file..if I add the following
or...
Aspx page..if I include a reference to a class file ( which does exist in the app_code directory )
Sign In <%If clsGeneral.str(Request("timeout")) = "t" Then Response.Write(" - YOUR SESSION EXPIRED")%>
I get the error...
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
etc...
Copying an application from one host to another is only simple in the file copy. There are a number of issues that may arise from the application running on the "new" server. For example, is the server running the same version of IIS? Is IIS configured properly for this application? Etc ... to see what error the application is throwing, inspect the Application Log in the event viewer on the server. This will give you some hint as to what the issue is. Without that information, there's really no place you can start, except maybe turning off the custom error or error suppression to see the error details in the browser. But I would recommend that you inspect the Application event log on the server.

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

IIS 7 not showing virtual directory mapped to another machine

I have an issue with IIS7 when mapping virtual directories to another machine.
This is my setup:
my Web APP is running on the web server (let's call it WEBSERVER). Windows Server 2008, IIS 7.
I got some assets/images in an assets server (let's call it ASSETSSERVER). Windows Server 2003, on the C:\Assets folder, shared as \\ASSETSSERVER\Assets
Servers are in a workgroup, not a domain. This is something beyond my control, which I can't change.
Following the recommendation of our network team, I configured the app pool to run under the user WEBSERVER\portaluser
In my web app, I define a virtual directory. I map it to \\ASSETSSERVER\Assets. In the log in credentials, I specify the user ASSETSERVER\assetsuser (which exists). The 'Test credentials' buttons show that i am authenticated OK and that I have authorisation.
At first, I got a 500.19 error telling me I could not log in. This post revealed the solution: I had to create a WEBSERVER\assetsuser user with same password (counter-intuitive, but it worked).
After that, my assets still refuse to display. I now get a message similar to this:
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: An error occurred loading a configuration file: Failed to start monitoring changes to '\\ASSETSERVER\assets'.
Source Error:
[No relevant source lines]
Source File: \\ASSETSERVER\assets\web.config Line: 0
I have done some extensive googling, and I have tried the following:
Modified the local policy to allow WEBSERVER\portaluser to impersonate other accounts after login, as suggested here (it's for Windows 2000 Server but it was worth a try!)
Added permissions to everyone to the \\ASSETSSERVER\assets, as indicated here (bottom answer)
Added read/execute/list permissions to the c:\ drive in ASSETSSERVER to the ASSETSSERVER\assetsuser user, as suggested here (method 3)
I edited the registry key to stop IIS from monitoring the folders for changes, as indicated here (the writer claims that it's not related to IIS but I am quite certain that IIS does monitor the folders for changes in web.config)
I have configured allowsubdirconfig="false" in applicationHost.config as indicated here
None of these solutions have worked, and I am running out of ideas of what to try. It seems like I'm so close yet so far. Any suggestions?
After several of work I found the solution to this issue.
It was as simple as creating a user called "portaluser" (the same as my app pool identity user) in ASSETSSERVER.
This is counter-intuitive: I explicitly told IIS7 to connect to ASSETSERVER as the assetsuser server, but it was still using portaluser to check for the existence of web.config (and monitor for changes).
Having seen that, I decided to use the same account to run the app pool and to connect to the remote virtual directory. I just used 'assetsuser' instead of 'portaluser'
Hope this helps

ClickOnce Error 403: Forbidden

A customer gets a 403 error when trying to install our VSTO ClickOnce application. We are hosted on GoDaddy IIS7.
"Downloading (one of our files ending in .deploy) did not succeed. System.Net.WebException: The remote server returned an error (403): Forbidden."
FWIW I've made sure all files needed for the installation are present in the remote directory. The publish from Visual Studio succeeds without any errors.
The installer is hosted on GoDaddy, and it has all the correct ClickOnce MIME types set. We didn't modify any of these.
BTW, could not find the ClickOnce error log! Searching online reveals that the log is located in Temporary Internet Files by default, but it was not there. We don't have our own custom log file location set, and we'd prefer not to set up a custom location for the customer's log if we can just grab the default one instead. It doesn't sound as though the log file provides any additional information beyond the stack trace revealed by the "Details" button in the error dialog, anyway.
Sounds like there is no read access to this file for your customers.
Try to download the file directly.

Resources