2016-04-01から1ヶ月間の記事一覧

【ASP.NET】メンテナンスページを表示する方法5選

ひさびさASP.NET グ○シーに出てきそうなタイトル。 1. URL Rewrite Web.configに以下追記。 ファイルの有無で判定する感じですね。 maintenance.txtが存在してればmaintenance.htmlの内容が表示されます。 まぁ実務じゃあんま使わないかと。 <configuration> <system.webServer> <rewrite> <rules> <rule name="Maintenance" stopProcessing="true"> </rule></rules></rewrite></system.webserver></configuration>

.exe.configをDebugとReleaseで切り替える Visual Studio 2015編

ひさびさ.NET コンソールアプリケーションとかWindowsアプリケーションとかの場合ね。 Web.configは勝手にやってくれるのになぜ.exe.configはやってくれないのか なお、.exe.configからの値の取得はWeb.configの時と一緒でございます。参考: devdevdev.hate…