Всем привет!
Хочу избавиться от Home в урле
В роут конфиге поставил:
routes.MapRoute(
"meropriyatiavnikolaeve",
"meropriyatia",
new { controller = "Home", action = "meropriyatiavnikolaeve" }
);
в контроллере:
public ActionResult meropriyatiavnikolaeve()
{
BusinessLayer.Events.EventsManager EventsManag = new EventsManager();
ViewBag.EventsMain = EventsManag.EventsToday();
return View();
}
все вроде бы правильно, в других проектах работает, но тут упорно открывает
localhost:11733/home/meropriyatiavnikolaeve и все
солюшин очищал, собирал
что добавлял в конфиг:
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="PluploadTempDir" value="/Images/USERDATA" />
<add key="recaptchaPublicKey" value="68888888QmJ8JvAHU" />
<add key="recaptchaPrivateKey" value="6888888p" />
<add key="recaptchaApiVersion" value="2" />
<add key="vs:EnableBrowserLink" value="false" />
</appSettings>
<system.web>
<customErrors mode="On" />
<authentication mode="None" />
<compilation debug="false" targetFramework="4.5.2" />
<httpRuntime targetFramework="4.5.2" maxRequestLength="3096" requestPathInvalidCharacters="" />
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="Timer" type="WEB.Utilities.TimerModule" />
<add name="CustomServerHeader" type="WEB.Utilities.CustomServerHeaderModule" />
<remove name="FormsAuthentication" />
</modules>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
<rewrite>
<rules>
<rule name="Redirect to non-www" stopProcessing="true">
<match url="(.*)" negate="false"></match>
<action type="Redirect" url="http://нннннн/{R:1}"></action>
<conditions>
<add input="{HTTP_HOST}" pattern="^ннннн$" negate="true"></add>
</conditions>
</rule>
</rules>
</rewrite>
<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="10.00:00:00" />
</staticContent>
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" staticCompressionLevel="9" />
<dynamicTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="application/json" enabled="true" />
<add mimeType="*/*" enabled="false" />
</dynamicTypes>
<staticTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="application/atom+xml" enabled="true" />
<add mimeType="application/xaml+xml" enabled="true" />
<add mimeType="*/*" enabled="false" />
</staticTypes>
</httpCompression>
<urlCompression doStaticCompression="true" doDynamicCompression="true" />
</system.webServer>