asp.net mvc 4 - C#/MVC4 : Best pratice for Map linked contents -
i have many mvc projects in solution , have lots common contents.
first (and best me) solution: link files library/common project (add link).
second solution: manually copy each files (or compilation command each mvc projects).
for first solution, have problem, iis can't find file, because in /bin/scripts/file.js , not /scripts/file.js.
i want map url 'scripts/file.js' ou 'scripts/../../file.js' path.
routes.maproute(name: "scripts", url: "js/{filename}.js", defaults: new { controller = "filelinker", action = "javascripts", filename = urlparameter.optional } ); the map doesn't work, when remove '.js' work! if request url 'scripts/popup/popupbase.js', doesn't work , must add new routes 'scripts/folder/file.js'. (same example : '/scripts/popup/rounded/popup.js' => new map definition !)
i know best practice use ?
best regards
add new web site or application host shared content, , reference virtual directory name in references apps. app/site serve private cdn apps.
common code can shared class library, sharing same views accross web apps unusual, can factor out commonality , retain views each application , reference shared markup using helpers. @ compiling views in 1 project , share between projects way
Comments
Post a Comment