私はMVCアプリケーションを持っており、モバイルエリアにアクセスしようとしています。リダイレクトエラーが多すぎます(ASP.NET MVC)
私は、Chrome to Mobileモードを使用することにしました。
マイスタートコントローラは、ここでAccount/Login
あるApplicationStart
protected void Application_Start()
{
#if DEBUG
XmlConfigurator.ConfigureAndWatch(new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logging_DEBUG.config")));
#else
if (AppDomain.CurrentDomain.BaseDirectory.Contains("DevTrackerweb")
|| AppDomain.CurrentDomain.BaseDirectory.Contains("Trackerweb4Test"))
{
XmlConfigurator.ConfigureAndWatch(new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logging_DEBUG.config")));
}
else
XmlConfigurator.ConfigureAndWatch(new FileInfo(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logging.config")));
#endif
var log = LogManager.GetLogger(AppDomain.CurrentDomain.BaseDirectory);
log.Info("Application start");
AreaRegistration.RegisterAllAreas();
GlobalConfiguration.Configure(WebApiConfig.Register);
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
ModelBinders.Binders.Add(typeof(decimal), new DecimalModelBinder());
ModelBinders.Binders.Add(typeof(decimal?), new NullableDecimalModelBinder());
Translator.Prefetch().Wait();
HttpContext.Current.Application.Add("TrackerwebServiceStatus", TrackerwebServiceStatus.OK);
sitesByHostName = InitializeSites();
mainCustomerIDByCustomerID = InitializeCustomerIDDictionary();
}
のコードで、私はそれを実行すると、私はこの問題を解決することができますどのようにこの
がありますか?
私は確認することができますどのように\編集、それを削除したとき? –
https://stackoverflow.com/questions/9727509/how-to-allow-an-anonymous-user-access-to-some-given-page-in-mvc 例: –
はい、AllowAnonymous'属性を使用してください – Moho