Is there a way to manage "MachineToApplication" error without having an access to IIS configurations? - iis

I'm a student and I was given a folder Web folder to use as my project. The problem is what they I try to publish my site to the server I get an error:
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.
Meaning that my Web folder was not configured as an application folder, therefore my project cannot be rendered (if I got this right? was reading a bit from the internet).
My question is, is there a way to handle this error without having an access to IIS server configurations? From code side of my project?
Error I get:
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 29: validate="false" />
Line 30: </httpHandlers>
Line 31: <authentication mode="None" />
Line 32: <compilation targetFramework="4.5">
Line 33: <assemblies>

The answer is no. IIS configuration system relies on such lock down mechanism, which you cannot break.
More information can be found at
http://www.iis.net/learn/manage/managing-your-configuration-settings/understanding-iis-configuration-delegation

Related

HTTP Error 500.19 - Internal Server Error Error Code 0x80070021

I've installed an IIS server on windows 8 and plublished my first site, this is the error I get. Any help would be appreciated.
Detailed Error Information:
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070021
Config Error
This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
Config File
\?\C:\inetpub\wwwroot\ContractorScoping\web.config
Requested URL
http://localhost:80/ContractorScoping
Physical Path
C:\inetpub\wwwroot\ContractorScoping
Logon Method
Not yet determined
Logon User
Not yet determined
Config Source:
68: <validation validateIntegratedModeConfiguration="false" />
69: <modules>
70: <remove name="ApplicationInsightsWebTracking" />
Line 69 is the one highlighted in red
Schoolboy error, forgot to install asp.net on the server
This error comes due to missing IIS Packages. I solved the error with doing these steps:
Click "Start button"
in the search box, enter "Turn windows features on or off"
in the features window, Click: "Internet Information Services"
Click: "World Wide Web Services"
Click: "Application Development Features"
Check (enable) the features. I checked all but CGI.

HTTP Error 500.19 - Internal Server Error issue with iis

I am getting following error from my hosted site
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information
Module ProtocolSupportModule
Notification SendResponse
Handler ExtensionlessUrlHandler-Integrated-4.0
Error Code 0x800700b7
Config Error Cannot add duplicate collection entry of type 'add' withunique key attribute 'name' set to 'X-UA-Compatible'
Config File \\?\C:\inetpub\wwwroot\abc\web.config
Requested URL http://abc:80/Test
Physical Path C:\inetpub\wwwroot\abc
Logon Method Not yet determined
Logon User Not yet determined
Config Source
54: <customHeaders>
55: <add name="X-UA-Compatible" value="IE=edge" />
56: </customHeaders>
I gave the permission to the IIS_USR also in security and allow the windows authentication. Any idea to fix this
It looks like you may have duplicate key's in your configuration file based on: duplicate collection entry of type 'add' with unique key attribute 'name' set to 'X-UA-Compatible'
Search for "X-UA-Compatible" in your configuration file and make sure there is only one entry with this name.
You may also want to read this article: Click Here

dotnetnuke cant open my page

Am trying to learn how to use dotnetnuke so am kinda new to it. I installed it correctly and i set up a user in server management studio. So when i try to open my page localhost\mypage i get these errors:
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
Detailed Error Information:
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x8007000d
Config Error Configuration section not allowed in a <location> tag
Config File \\?\C:\inetpub\wwwroot\ANTONISDB\web.config
Requested URL http://`localhost`:80/dotnetnuke
Physical Path
Logon Method Not yet determined
Logon User Not yet determined
Config Source:
210: </system.web>
211: <runtime>
212: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
Anyone knows whats wrong with this?
Check to make sure the Application Pool for the virtual directory/application is configured to USE ASP.NET 4.0, DNN won't run with .NET 3.5 anymore (starting with Version 7)

Asp.net application error running with Sitecore 6.4.1

I have Sitecore as site root (which is running ok) and under it I need to have a bunch of asp.net applications running.
So far, created a virtual directory for the child application, turned it into an app. But as soon as I browse the child app it comes with this error message.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0246: The type or namespace name 'Sitecore' could not be found (are you missing a using directive or an assembly reference?)
Source Error:
Line 3264: </providers>
Line 3265: </roleManager>
Line 3266: <profile defaultProvider="sql" enabled="true" inherits="Sitecore.Security.UserProfile, Sitecore.Kernel">
Line 3267: <providers>
Line 3268: <clear/>
It seems that the child asp.net app is inheriting Sitecore settings which are coming from Sitecore web.config.
Any ideas?
This should be possible. You'll have to author a web.config for that non-Sitecore application in virtual directory, and overwrite the sections under <system.web> and <system.webserver> which reference Sitecore classes. This includes:
httpModules / httpHandlers (for these you should "remove all" and add those of that web app)
security section (put the default ASP.NET provider classes back)
in Sitecore main web.config add the path of this web app to IgnoreUrlPrefixes setting to let Sitecore know it should not handle requests to those
It might be something else, but you should get the general idea.
This answer is similar to Yan, but is different enough for a separate answer. Hope it helps.
Go into IIS and select the Child Application. Select Modules. Remove all the Sitecore related modules that are present. Don't worry, the parent Sitecore app will still retain these modules.
When you do this, you are actually changing the child app web.config, so you will see the elements removed in the web.config file like so.
<remove name="SitecoreConfigWatcher" />
<remove name="SitecoreHttpModule" />
You also may have to clear out some other inherited settings.
<profile enabled="false"><providers><clear/></providers></profile>
<roleManager enabled="false"><providers><clear /></providers></roleManager>

SharePoint error

I have a Sharepoint site and today when I try to login to the site it gives me the following 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.
Details:
To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
I've got to change this file:
You may also need edit the web.config in the layouts folder of the SharePoint root:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config
And set
<customErrors mode="Off" />
Change the following in web.config and you will be able to see the detailed error.
<customErrors mode="Off"/>
and
CallStack="true"
Make sure you do this in all the WFEs. You will see detailed error. Once you have the detail error, post it here and we will be able to helop you more.
Set the custom error mode to remote only in your web.config file and try browsing the site again. This time you will get the detailed error with the stack trace. You can proceed from there.
Restart your server then try... Because in my case during I install visual studio on my server system, i can't access my site and i got same error what you posted in above, after restarted my server its works fine. that's why i am saying like that...
What i thought is, actually that time the IIS was disturbed by some other installation program.

Resources