Do I need a web configuration file to run the asp.net welcome world on IIS 7?

I uploaded the simple greeting world on my IIS 7 server (shared hosting). This does not work. Do I need to add a web configuration and what is the minimum in this case?

Thank.

The error says:

Server application unavailable

The web application you are trying to access this web server is currently unavailable. Please click the Refresh button in your web browser to repeat the request.

Here is a script, very simple :)

<%@ Page Language="VB" %>

<html>
<head>
<title>ASP.NET Hello World</title>
</head>
<body bgcolor="#FFFFFF">

<p><%= "Hello World!" %></p>

</body>
</html>
+3
source share
3 answers

, web.config , , Hello World IIS7, .

IIS7, , ASP.NET "". web.config ASP.NET, IIS, (.. () ASP.NET web.config).

web.config ASP.NET, IIS7 "default" web.config, "Windows" .NET.

:

IIS 7

MSDN:

Web.config . , .

:

  • Machine.config. % Windir%\Microsoft.NET\Framework\framework_version\CONFIG.

  • Root Web.config .NET Framework. % Windir%\Microsoft.NET\Framework\framework_version\CONFIG.

  • ApplicationHost.config. % WINDIR%\system32\Inetsrv\.

, , :

  • . , , URL- , , , URL-, .

  • Web.config . , URL- , , , .

  • Web.config , . , URL-, , . .

:

  • , . , ApplicationHost.config , , .

  • URL ( ).

, . :

IIS 7

EDIT:

, , IIS7, , , "". IIS7 start .

, , , .

, .

, , , , -, , -, , , - /, . web.config "" , IIS7, .

-.

+2

machine.config. ?

+1

I am not sure about the shared hosting environment. But if you try to create a web application (try the ASP.Net Empty web application template) and just use Response.write ("Hello World!"). it will work without any web.config.

I tried myself and it works successfully.

The only problem is that he may ask you if you want to debug your application, then he needs to add the attribute "compilation = true" to web.config.

0
source

Source: https://habr.com/ru/post/1728287/


All Articles