Issue with AreaRegistration in Global.asax
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
調査の方向性
global.asax.cs の Global.Application_Start から開始します。ここで AreaRegistration.RegisterAllAreas() が例外を発生させます。CanIgetMasterPage テストと WebFormsTestBase.InitializeWebApplicationProxy のセットアップを読み、その後テストを実行して失敗を再現します。この harness でエリア登録がサポートされているかどうかを確認し、確認された動作を解決するか明確に文書化できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Are areas supported?
This line:
AreaRegistration.RegisterAllAreas();
in
protected void Application_Start(object sender, EventArgs e
of
global.asax.cs
results in the error below (slightly munged).
The test is
[TestMethod]
public void CanIgetMasterPage()
{
var sut = WebApplicationProxy.GetPageByLocation("~/MasterPages/Main.Master") as Main;
Assert.IsNotNull(sut);
}
and the base test class is
namespace xxx.yyy.WebFormsTestSpike
{
public class WebFormsTestBase
{
protected readonly MockRepository _mockery;
protected readonly Mock<HttpContextBase> contextMock;
protected readonly Mock<HttpResponseBase> responseMock;
protected readonly Mock<HttpRequestBase> requestMock;
public WebFormsTestBase()
{
_mockery = new MockRepository(MockBehavior.Loose);
contextMock = _mockery.Create<HttpContextBase>();
responseMock = _mockery.Create<HttpResponseBase>();
contextMock.SetupGet(c => c.Response).Returns(responseMock.Object);
contextMock.SetupGet(c => c.IsDebuggingEnabled).Returns(true);
requestMock = _mockery.Create<HttpRequestBase>();
contextMock.SetupGet(c => c.Request).Returns(requestMock.Object);
InitializeWebApplicationProxy();
}
private void InitializeWebApplicationProxy()
{
Uri codeBase = new Uri(GetType().Assembly.CodeBase);
var currentFolder = new DirectoryInfo(Path.GetDirectoryName(codeBase.LocalPath));
var webFolder = currentFolder.Parent.Parent.Parent.GetDirectories("xxx.yyy.Web")[0];
WebApplicationProxy.Create(webFolder.FullName, true);
}
}
}
System.InvalidOperationException was unhandled by user code
HResult=-2146233079
Message=This method cannot be called during the application's pre-start initialization phase.
Source=System.Web
StackTrace:
at System.Web.Compilation.BuildManager.EnsureTopLevelFilesCompiled()
at System.Web.Compilation.BuildManager.GetReferencedAssemblies()
at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.GetReferencedAssemblies()
at System.Web.Mvc.TypeCacheUtil.FilterTypesInAssemblies(IBuildManager buildManager, Predicate1 predicate) at System.Web.Mvc.TypeCacheUtil.GetFilteredTypesFromAssemblies(String cacheName, Predicate1 predicate, IBuildManager buildManager)
at System.Web.Mvc.AreaRegistration.RegisterAllAreas(RouteCollection routes, IBuildManager buildManager, Object state)
at System.Web.Mvc.AreaRegistration.RegisterAllAreas(Object state)
at System.Web.Mvc.AreaRegistration.RegisterAllAreas()
at xxx.yyy.Web.Global.Application_Start(Object sender, EventArgs e) in C:\zzz\Repos\MarketOnce2\Products\xxx\yyy\xxx.yyy.Web\Global.asax.cs:line 117
InnerException:
- 主要言語
- JavaScript
- スター
- 26
- フォーク
- 14
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
csharpfritz/WebFormsTest のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
csharpfritz/WebFormsTest#58 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
csharpfritz/WebFormsTest#55 · コメント 1 件 ·
-
Support ModelBinding オープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
csharpfritz/WebFormsTest#39 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
csharpfritz/WebFormsTest#32 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
csharpfritz/WebFormsTest#29 · コメント 3 件 ·
csharpfritz/WebFormsTest の issue をすべて見る
似ている issue
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Automattic/safe-publish#594 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
NousResearch/hermes-agent#121143 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100