前提・実現したいこと
Visual Studio Community 2019(以下VSC2019)初心者です。
新規作成した(テンプレート)プロジェクトについて、VSC2019開発マシン上では、動くので、Webサーバに展開してうごかしてみたい。
Webサーバーは開発マシンと同じLAN上にあるIIS6です。
VSC2019で、新しいソリューション>.NET Coreアプリ>WebアプリケーションMVC を選んだ場合は、プロジェクトの右クリックで 公開>フォルダーに発行 というメニュが選べて、そのフォルダーの内容をIISサーバーに配備することで、正常にWebページが表示されました。
しかし、VSC2019>新しいソリューション>その他>ASP.NET MVCプロジェクトを選んだ(.NET COREではない)場合では、公開メニューが表示さないので、どのような操作をして、どのファイルをIISの物理フォルダに置けばよいかわかりません。
正直、今回問題の対象の「ASP.NET MVCプロジェクト」の特徴、扱い方がよくわかっていないと思います。
発生している問題・エラーメッセージ
WEBサーバー上で、以下の操作でWebページの表示を確認するため、
IIS>サイト>Webサイトの管理>参照 でサイトのデフォルトWebページを立ち上げると。
エラーメッセージ HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory. ### 該当のソースコード web.configは以下の通りです。(新規作成で自動作成されたそのままのもの) <?xml version="1.0"?> <!-- Web.config file for justMVC. The settings that can be used in this file are documented at http://www.mono-project.com/Config_system.web and http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx --> <configuration> <system.web> <compilation debug="true" targetFramework="4.5"> <assemblies /> </compilation> <httpRuntime targetFramework="4.5" /> </system.web> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0" /> </dependentAssembly> <dependentAssembly> <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" /> <bindingRedirect oldVersion="1.0.0.0-5.2.3.0" newVersion="5.2.3.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration> ```ここに言語名を入力 ASP.NET MVCプロジェクト C# ### 試したこと ビルドをして、binフォルダの中身をIISサーバーのサイト物理フォルダに置いてみました。 Web.configがbinの中には見当たらないので、開発環境内にある web.configを そのままコピーしてみました。 この方法自体、間違っている気がします。 ### 補足情報(FW/ツールのバージョンなど) ここにより詳細な情報を記載してください。
回答2件
あなたの回答
tips
プレビュー