私はまったく新しいですがASP.NET
、実際にはほとんど何も知りませんが、絶望することはありません。チュートリアルを探していませんASP.NET
...私の同僚がWebサーバーでアプリケーションを実行したいと考えています。私たちのウェブサーバーは、Plesk11とIIS7.5を搭載したWindows2008R2を実行しています。
これまで、有効にしようとするとさまざまな問題が発生しましASP.NET
たが、何度もいじった後、アプリケーションを(ある程度)機能させることができました。
ただし、アプリケーションを機能させるには、web.config
ファイルから次の行を削除する必要がありました。
<configSections>
<sectionGroup name="system.webServer">
<sectionGroup name="rewrite">
<section name="rewriteMaps" overrideModeDefault="Allow" />
<section name="rules" overrideModeDefault="Allow" />
</sectionGroup>
</sectionGroup>
</configSections>
これは、エラーが発生したためです。
パーサーエラーメッセージ:セクションまたはグループ名'system.webServer'は既に定義されています。これに対する更新は、それが定義されている構成レベルでのみ発生する可能性があります。
私のフォルダ構造は次のようなものです。
website/
TestApplication/
web.config
index.php
web.config
「TestApplication」フォルダーのアプリケーションを作成しましたが(これが何を意味するのかはわかりません)、違いはありません。
web.config
アプリケーションを作成すると、ディレクトリ内は親構成を継承しないという印象を受けました。私はまだエラーを受け取っているので、これはここでは当てはまらないようです。
私の質問は、上記の状況で何をするつもりですか?アプリケーションが親ディレクトリの構成を継承しないようにするにはどうすればよいですか、あるいは、現在のweb.config
ファイルを修正して使用できるようにするにはどうすればよいASP.NET
ですか?
注意すべき点の1つは、Pleskコントロールパネルで特定のものを見つけることができなかったため、IISマネージャとPleskの両方に変更を加えました。たとえば、Webサイト内のディレクトリ用のアプリケーションを作成することです。これがここでの問題の原因ではないと思いますが、それでも言及する価値があります。
アップデート
これは私の完全なweb.configファイルです(ファイルに影響を与えないため、すべてのバーの1つのルールが削除されています):
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<configSections>
<sectionGroup name="system.webServer">
<sectionGroup name="rewrite">
<section name="rewriteMaps" overrideModeDefault="Allow" />
<section name="rules" overrideModeDefault="Allow" />
</sectionGroup>
</sectionGroup>
</configSections>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
<rewrite>
<rules>
<clear />
<rule name="Browser Error Rewrite" stopProcessing="true">
<match url="^errors/browser$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="_errors/browser.php?error=browser" />
</rule>
</rules>
</rewrite>
<defaultDocument>
<files>
<clear />
<add value="index.php" />
</files>
</defaultDocument>
<httpErrors>
<clear />
<error statusCode="400" prefixLanguageFilePath="" path="/_errors/error.php?id=400" responseMode="ExecuteURL" />
<error statusCode="502" prefixLanguageFilePath="" path="/_errors/error.php?id=502" responseMode="ExecuteURL" />
<error statusCode="407" prefixLanguageFilePath="" path="/_errors/error.php?id=407" responseMode="ExecuteURL" />
<error statusCode="414" prefixLanguageFilePath="" path="/_errors/error.php?id=414" responseMode="ExecuteURL" />
<error statusCode="415" prefixLanguageFilePath="" path="/_errors/error.php?id=415" responseMode="ExecuteURL" />
<error statusCode="501" prefixLanguageFilePath="" path="/_errors/error.php?id=501" responseMode="ExecuteURL" />
<error statusCode="500" prefixLanguageFilePath="" path="/_errors/error.php?id=500" responseMode="ExecuteURL" />
<error statusCode="401" prefixLanguageFilePath="" path="/_errors/error.php?id=401" responseMode="ExecuteURL" />
<error statusCode="403" prefixLanguageFilePath="" path="/_errors/error.php?id=403" responseMode="ExecuteURL" />
<error statusCode="404" prefixLanguageFilePath="" path="/_errors/error.php?id=404" responseMode="ExecuteURL" />
<error statusCode="405" prefixLanguageFilePath="" path="/_errors/error.php?id=405" responseMode="ExecuteURL" />
<error statusCode="412" prefixLanguageFilePath="" path="/_errors/error.php?id=412" responseMode="ExecuteURL" />
<error statusCode="406" prefixLanguageFilePath="" path="/_errors/error.php?id=406" responseMode="ExecuteURL" />
</httpErrors>
<handlers>
<clear />
<add name="PageHandlerFactory-Integrated" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode" />
<add name="php-5.3.10" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\Parallels\Plesk\Additional\PleskPHP53\php-cgi.exe" resourceType="Either" requireAccess="Script" />
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" />
</handlers>
</system.webServer>
</configuration>