Iis ошибка сервера в приложении

I am trying to deploy an asp.net application in our server while I am receiving the following error.

Server Error in '/' Application. 
________________________________________
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 63:             ASP.NET to identify an incoming user. 
Line 64:         -->
Line 65:                  <authentication  mode="Windows"/>
Line 66:                  <!--<forms loginUrl="~/SCR.UI/Login1.aspx"/>
Line 67:                  </authentication>-->
Source File: D:BarclaysPayamentManagementSystemscr.uiweb.config    Line: 65

What is the reason and how to resolve it?

Please help


Matthew Scharley's user avatar

asked Jun 30, 2009 at 11:32

priyanka.sarkar's user avatar

priyanka.sarkarpriyanka.sarkar

25.6k43 gold badges126 silver badges173 bronze badges

1

You may get this error when trying to browse an ASP.NET application.

The debug information shows that «This error can be caused by a virtual directory not being configured as an application in IIS.»

However, this error occurs primarily out of two scenarios.

  1. When you create an new web application using Visual Studio .NET, it automatically creates the virtual directory and configures it as an application. However, if you manually create the virtual directory and it is not configured as an application, then you will not be able to browse the application and may get the above error. The debug information you get as mentioned above, is applicable to this scenario.

To resolve it, right click on the virtual directory — select properties and then click on
«Create» next to the «Application» Label and the text box. It will automatically create the «application» using the virtual directory’s name. Now the application can be accessed.

  1. When you have sub-directories in your application, you can have web.config file for the sub-directory. However, there are certain properties which cannot be set in the web.config of the sub-directory such as authentication, session state (you may see that the error message shows the line number where the authentication or session state is declared in the web.config of the sub-directory). The reason is, these settings cannot be overridden at the sub-directory level unless the sub-directory is also configured as an application (as mentioned in the above point).

Mostly, we have the practice of adding web.config in the sub-directory if we want to protect access to the sub-directory files (say, the directory is admin and we wish to protect the admin pages from unauthorized users).

RBT's user avatar

RBT

23.7k21 gold badges158 silver badges240 bronze badges

answered Jun 30, 2009 at 14:34

Árvíztűrő tükörfúrógép's user avatar

1

I had this error when the .NET version was wrong — make sure the site is configured to the one you need.

See aspnet_regiis.exe for details.

answered Jun 30, 2009 at 11:37

Dror's user avatar

I had this error with VS 2015, in my case going to the project properties page, Web tab, and clicking on Create Virtual Directory button in Servers section solved it

answered Feb 26, 2016 at 6:48

mohas's user avatar

mohasmohas

1,8911 gold badge16 silver badges20 bronze badges

It sounds like the admin has locked the «authentication» node of the web.config, which one can do in the global web.config pretty easily. Or, in a nutshell, this is working as designed.

answered Jun 30, 2009 at 11:57

Wyatt Barnett's user avatar

Wyatt BarnettWyatt Barnett

15.5k3 gold badges33 silver badges53 bronze badges

I just had the same issue on visual studio 2012. For a internet application project.
How to resolve “Server Error in ‘/’ Application” error?

Searching for answer I came across this post, but none of these answer help me.
Than I found another post here on stackoverflow that has the answer for resolving this issue.
Specified argument was out of the range of valid values. Parameter name: site

Community's user avatar

answered Oct 4, 2014 at 12:06

Tigrito's user avatar

When you create an new web application using visual studio.net, it automatically creates the virtual directory and configures it as an application. However, if you manually create the virtual directory and it is not configured as an application, then you will not be able to browse the application and may get the above error.

answered Oct 1, 2015 at 15:11

toqeerawan's user avatar

I also got this error when I moved an entity framework edmx file into a «Models» sub-folder. This automatically changed the metadata in my connection string setting in my app.config.

So before the connection string changed… it looked something like this:

<connectionStrings>
    <add name="MyDbEntities" connectionString="metadata=res://*/MyDb.csdl|res://*/MyDb.ssdl|res://*/MyDb.msl; ...
</connectionStrings>

And after… it added the «Models» subfolder name (btw… it also added «Models» to the namespace for the EF classes generated) and the connection string now looks something like this:

<connectionStrings>
    <add name="MyDbEntities" connectionString="metadata=res://*/Models.MyDb.csdl|res://*/Models.MyDb.ssdl|res://*/Models.MyDb.msl; ...
</connectionStrings>

I have a website project that references this Entity Framework DB project. But its web.config did not have the updates to the connection string… and that’s when I started getting the compilation error being discussed here.

To fix this error, I updated the connection string in the web.config in the website project to match the app.config in my EntityFramework project.

answered May 29, 2018 at 14:47

Denis M. Kitchen's user avatar

Denis M. KitchenDenis M. Kitchen

1,1022 gold badges14 silver badges24 bronze badges

vs2017 just added in these lines to csproj.user file

    <IISExpressAnonymousAuthentication>enabled</IISExpressAnonymousAuthentication>
    <IISExpressWindowsAuthentication>enabled</IISExpressWindowsAuthentication>
    <IISExpressUseClassicPipelineMode>false</IISExpressUseClassicPipelineMode>

with these lines in Web.config
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" maxRequestLength="1048576" />
<identity impersonate="false" />
<authentication mode="Windows" />
<authorization>
  <allow users="yourNTusername" />
  <deny users="?" />
</authorization>

And it worked

answered Sep 4, 2019 at 9:57

mylesdolan's user avatar

I opened the Properties window for the website project in question and changed Windows Authentication to «Enabled» and that resolved my issue in VS 2019.

answered Mar 9, 2020 at 18:01

Ropeh's user avatar

RopehRopeh

436 bronze badges

The error message is quite clear: you have a configuration element in a web.config file in a subfolder of your web app that is not allowed at that level — OR you forgot to configure your web application as IIS application.

Example: you try to override application level settings like forms authentication parameters in a web.config in a subfolder of your application

answered Jun 30, 2009 at 11:37

chris166's user avatar

chris166chris166

4,7694 gold badges24 silver badges25 bronze badges

2

Server Error in ‘/’ Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its
dependencies) could have been removed, had its name changed, or is
temporarily unavailable. Please review the following URL and make
sure that it is spelled correctly.

Requested URL: /Account/Examples/fio.aspx

Version Information: Microsoft .NET Framework Version:4.0.30319;
ASP.NET Version:4.0.30319.18044

This page I am trying to assess is here now:

 http://localhost/<mysitename>/Account/Examples/fio.aspx

but when I was writing and debugging site in Visual Studio ,everything worked fine and my page was here

/Account/Examples/fio.aspx

Since this morning. I have no idea how to fix it.

TylerH's user avatar

TylerH

20.7k65 gold badges73 silver badges98 bronze badges

asked Jul 31, 2013 at 11:17

user2114177's user avatar

Add the below code to your web.config file. Your browser will then show you the full error message.

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

Louis van Tonder's user avatar

answered Jul 31, 2013 at 11:26

Md. Parvez Alam's user avatar

Md. Parvez AlamMd. Parvez Alam

4,2754 gold badges46 silver badges105 bronze badges

1

You need to create an application in IIS for you website that points to the root directory of the site as it is deployed on the server. You will also need to create an Application Pool that is set to .Net Framework 4 to manage the IIS process that your site will run as.

You’re getting the error because the default website in IIS (usually set to c:inetpubwwwroot) doesn’t know anything about the pages within your website.

TylerH's user avatar

TylerH

20.7k65 gold badges73 silver badges98 bronze badges

answered Jul 31, 2013 at 11:30

levelnis's user avatar

levelnislevelnis

7,6556 gold badges37 silver badges61 bronze badges

2

There are various reasons for why you may encounter a “Server error in ‘/’ application”. Often the error message provides a bit more detail of what’s wrong. In most cases, the server-side error message is related to IIS (Internet Information Services) or ASP.NET.

Requirements

  • Cloud Server running Windows Server 2012
  • ASP.NET installed

vServer (VPS) from IONOS

Low-cost, powerful VPS hosting for running your custom applications, with a personal assistant and 24/7 support.

100 % SSD storage

Ready in 55 sec.

SSL certificate

Restart IIS

The “Server error in ‘/’ application” can happen if IIS needs to be restarted. You can restart IIS from the IIS Manager. From your Remote Desktop connection, click the “Start” button in the lower left-hand corner and select “Administrative Tools”.

Windows panel “Administrative Tools”
Windows panel “Administrative Tools”.

Click “Internet Information Services (IIS) Manager” to launch the IIS manager.

Administrative Tools: Internet Information Services (IIS) Manager
Start the IIS manager by clicking on it.

Select the affected server from the left-hand panel.

IIS manager: server selection
Select the affected server in the left tab.

On the right of the IIS Manager, click “Restart” to restart IIS.

IIS manager: Restart
Click on the “Restart” button to restart IIS.

Update the URL

Under some circumstances, a 404 error may be displayed as “Server error in ‘/’ application”. When this is the case, the error description in the browser will clarify that the error has occurred because the file is missing or has been renamed.

http 404 error message
The “Server error in ‘/’ application” can occur as an http 404 error.

To fix this problem, correct the URL in the link that triggers this error.

Cloud backup from IONOS

Make costly downtime a thing of the past and back up your business the easy way!

Add the MIME type

If you are accessing a file with a file extension that does not have permissions to be run on the server, you will see the “Server error in ‘/’ application” along with the explanation that “This type of page is not served”.

Message “This type of page is not served”
The “Server error in ‘/’ application” can occur when a file extension does not have permission to run on the server.

When exploring a solution to a “Server error in ‘/’ application”, first ensure that you are using the correct file name. The “Server error in ‘/’ application” can occur if there is a typo in the file extension, for example a file or URL that references test.htl instead of test.html.

If the file name is correct, then you may need to add the MIME type to the server. MIME stands for Multipurpose Internet Mail Extensions. The MIME type is used to indicate what type of document it is. In the example, we are trying to run a file called HelloWorld.cshtml. The file extension .cshtml is not associated with any MIME type by default on Windows 2012.

You can add the MIME type in the IIS Manager. To open the IIS Manager, from your Remote Desktop connection, click the Start button in the lower left-hand corner and “Administrative Tools”.

Windows panel “Administrative Tools”
The IIS manager can be found in the Administrative Tools section.

Click “Internet Information Services (IIS) Manager” to launch the IIS manager.

Administrative Tools: launch IIS manager
Launch the IIS manager from the Administrative Tools section.

Click the server in the left-hand panel.

IIS manager: select server
You can select the affected server from the left tab in the IIS Manager.

Now click “Sites”.

IIS manager: “Sites”
In the left tab you can access the “Sites” folder.

Then click on your domain. In the central panel, double-click “MIME Types”.

IIS manager: symbol “MIME Types”
Adjust the MIME types individually.

Under the “Actions” column on the right, click “Add”.

IIS manager: add MIME types
Click “Add” to add a MIME type.

In the pop-up window which appears, fill in the “File name extension” and “MIME Type” fields, then click “OK”.

IIS manager: add MIME type window
To add a MIME type, you must specify the file extension and the corresponding MIME type.

Note

You may need to do an Internet search to find the correct MIME Type for your file extension.

Verify the .NET Version

Some programs, features, and file types will only run under certain versions of .NET.

You can also check your .NET version from the IIS Manager. To open the IIS Manager from your Remote Desktop connection, click the “Start” button in the lower left-hand corner and then select “Administrative Tools”.

Windows panel “Administrative Tools”
The IIS manager can be found in the “Administrative Tools”.

Click “Internet Information Services (IIS) Manager” to launch the IIS manager.

Administrative Tools: Internet Information Services (IIS) manager
Launch the IIS manager from the Administrative tools.

Click to expand the server in the left-hand window panel.

IIS manager: server selection
You can select the affected server from the left side of the IIS manager.

Click on “Application Pools”.

IIS manager: “Application Pool” among selected servers
Select the Application Pools from the left panel of the IIS Manager.

Right-click on the Domain Name and click on “Basic Settings”.

IIS manager, Application Pools: contextual menu, “Basic settings”
You can access the settings by right-clicking on the domain name.

In the pop-up window which appears, select the .NET version from the drop-down menu, then click “OK” to confirm your choice.

IIS manager, Application Pools: select .NET version
Select your .NET version.

by Milan Stanojevic

Milan has been enthusiastic about technology ever since his childhood days, and this led him to take interest in all PC-related technologies. He’s a PC enthusiast and he… read more


Updated on August 5, 2022

Fact checked by
Alex Serban

Alex Serban

After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server… read more

  • Runtime errors are common issues found in the Windows Operating System.
  • You can fix this error by ensuring that you have the correct URL while trying to access the web app.
  • Verifying the version of your components is sometimes necessary to fix this problem.

Strugling with your current browser? Upgrade to a better one: OperaYou deserve a better browser! 350 million people use Opera daily, a fully-fledged navigation experience that comes with various built-in packages, enhanced resource consumption and great design. Here’s what Opera can do:

  • Easy migration: use the Opera assistant to transfer exiting data, such as bookmarks, passwords, etc.
  • Optimize resource usage: your RAM memory is used more efficiently than in other browsers
  • Enhanced privacy: free and unlimited VPN integrated
  • No ads: built-in Ad Blocker speeds up loading of pages and protects against data-mining
  • Gaming friendly: Opera GX is the first and best browser for gaming
  • Download Opera

The server error in ‘/’ application can occur when your programs and file types are not compatible with your .NET Version. This prevents your website from running on the Server.

Fortunately, the IIS Manager lets you check the version of .NET you are using, and this is crucial to resolving this issue. This isn’t the only issue that you can encounter, and many reported Internal server error 500 as well.

In this article, we will discuss the methods and steps we can use to fix the server In ‘/’ application error for good.

What does server error in application mean?

This is a server side issue that prevents the web app from running properly. The problem is associated with ISS and ASP.NET.

If there’s an issue with these components, you won’t be able to run the select app and it will crash while giving you this error.

What causes runtime error?

The problem is caused by missing resources or if you try to run a file with an extension that isn’t approved.

Another cause for this issue are the compatibility problems with .NET Framework.

How do I fix server error in ‘/’ application runtime error?

1. Try a different browser

If you notice that this error appears on your default browser, then maybe it would be the time that you install another one just to see if it reacts differently, and we suggest you try out Opera.

It is a very responsive browser that can load pages fast. Being often updated to meet the latest standards, if you don’t have any underlying issues with your .NET framework or drivers, you won’t have this error in Opera.

Opera is a Chromium-based web browser that is designed to be fast, lightweight, and still powerful. More so, it can be heavily customized using the wide variety of extensions that you have at your disposal in your digital library.

Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

If you can load the page in Opera, then you may be better off setting it as your default browser. All of its components are of the latest version at all times, so errors such as the one described above are less likely to occur.

Opera

Browse the web with a lighter browser that keeps up with the latest security and performance needs!

2. Check the URL

If the problem still appears, check the URL. Sometimes a bad URL can lead to this issue, so be sure to check if it’s correct.

After updating the URL, the issue should be gone. If the problem persists, move to the next solution.

URL problems can cause Server error in ‘/’ application runtime error to appear in Safari, Chrome or other browser, but this should help you fix it.

3. Restart IIS using a graphical user interface

  1. Click the start windows button at the lower-left corner of your Desktop.
  2. Search for Administrative Tools and click on the result.Server-Error-In-Application-Restart-IIS-Server
  3. Next, click on Internet Information Services (IIS) Manager to perform a restart when it opens.
  4. On the left pane, right-click on the server node and select All Tasks and then Restart IIS.
  5. Choose whether to restart IIS, stop IIS, start IIS, or reboot the Server and click OK.
  6. To restart an individual web or FTP site, right-click on the node for the site and select Stop, then repeat and select Start.

This method might help you fix Server error in ‘/’ application runtime error in Azure web app, so be sure to try it out.

4. Adding MIME Type to resolve server error in ‘/’ application.

  1. Search for the Administrative Tools on the Windows Start menu.
  2. Click on the Administrative Tools icon which will come on the search result.
  3. When Administrative Tools window displays, select Internet Information Services (IIS) Manager.
  4. Next, look on the left-hand pane, and select the Server.
  5. Click on Sites.
  6. Now, select your domain located in the central pane.
  7. Double-click MIME Types.
  8. Click Add Under the Actions column by the right.
  9. Fill in the File name extension and MIME Type fields In the pop-up window that will display.
  10. Confirm by clicking OK, then check to see if you are still getting the server error in ‘/’ application message.

You might need to run an Internet search so you can find the exact MIME type that will work with your file extension.

After making these changes, Server error in ‘/pods’ application will be gone.

Read more about this topic

  • FIX: Runtime error in Google Chrome [server error]
  • Fix: Microsoft Visual C++ runtime library in Windows 10/11
  • Runtime Error 9: Subscript Out of Range [Fix]
  • Runtime error 3709: The Connection Cannot be Used [Fix]
  • Runtime Error 52: Bad Filename or Number [Fix]
  • Runtime Error 57121: Application-Defined or Object-Defined [Fix]

5. Verify the .NET version

  1. Type Administrative Tools in Windows Start menu search box.
  2. Select the Administrative Tools icon to launch it.
  3. You will see Internet Information Services (IIS) when the Administrative Tools window opens.
  4. Click to maximize the server window in the left hand pane.
  5. Select Application Pools.
  6. Continue by right-clicking on the Domain Name, and choosing Basic Settings to move to the next option.
  7. Next, a pop window will display, click the .NET Version that is compatible with your program and file in the drop-down
  8.  Finally, select OK to confirm your option.

This is a simple method, and it can help you if you’re having Server error in ‘/’ application runtime error in Visual Studio.

This error can be frustrating because it prevents you from making proper use of your site. But thankfully the methods discussed in this article will solve the Server error in ‘/’ application on Windows 10.

Make sure to read through the steps correctly so that you can get rid of this problem permanently. In case the problem is still there, visit our Internal server error in NGINX guide.

Leave comments below, so we know if you are okay with the solutions provided in this article.

newsletter icon

  • Remove From My Forums
  • Вопрос

  • Vista HB поставил в компонентах IIS в оснастке iis не появился, доступ 127.0.0.1 показывает ошибку 

    Ошибка сервера в приложении «Default Web Site»


    HTTP Error 404.4 — Not Found

    Описание: Ресурсу, который вы ищете, не сопоставлен обработчик.

    Код ошибки: 0x80070002

    Уведомление: MapRequestHandler

    Модуль: IIS Web Core

    Запрашиваемый URL-адрес: http://127.0.0.1:80/

    Физический путь: C:inetpubwwwroot

    Вход пользователя: Анонимная

    Способ входа: Анонимная

    Обработчик: Пока не определено

    Наиболее вероятные причины:

    • Расширение файла для запрашиваемого URL-адреса не имеет обработчика, сконфигурированного для обработки запроса на веб-сервере.

    Что можно предпринять:

    • Если расширение файла не имеет сопоставленного ему обработчика, добавьте сопоставление обработчика для данного расширения.
    • Удостоверьтесь в том, что сопоставленный расширению файла обработчик должным образом установлен и сконфигурирован.
    • Создайте правило трассировки, чтобы отслеживать невыполненные запросы для этого кода состояния HTTP. Чтобы получить дополнительные сведения о создании правила трассировки для невыполненных запросов, щелкните здесь.

    Дополнительные сведения… Эта ошибка означает, что веб-сервер не распознает расширение файла запрашиваемого ресурса. Модуль обработки на данном веб-сервере не настроен для работы с этим расширением. Если отвергаемое расширение файла требуется веб-серверу, добавьте к расширению файла соответствующий обработчик.


    Как этот обработчик установить?

    • Перемещено

      22 сентября 2010 г. 14:06
      (От:Windows Vista)

Ответы

  • Проблема в HB, она не поддерживает IIS как веб сервер. Все что там есть — поддержка WCF через HTTP. Для IIS требуется по меньшей мере HP, см. тут.


    This posting is provided «AS IS» with no warranties, and confers no rights.

    • Предложено в качестве ответа
      Плотников Дмитрий aka Zexes
      15 марта 2009 г. 19:23
    • Помечено в качестве ответа
      Vinokurov YuriyModerator
      12 августа 2009 г. 10:04

Понравилась статья? Поделить с друзьями:
  • Igdumd64 dll ошибка что делать
  • Hyper v ошибка поддерживающего объекта
  • Hunt showdown код ошибки 0x7111
  • Htc one в приложении произошла ошибка
  • Hp сбой установки принтера ошибка установки принтера