Giter VIP home page Giter VIP logo

templates's People

Contributors

abuson avatar benmccallum avatar bobinush avatar bonniesoftware avatar danielabbatt avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar elanhasson avatar geewee avatar gegaryfa avatar getoxs avatar jacobengel avatar katz avatar m-meier avatar maiorfi avatar mistand avatar rarrarrarr avatar rehansaeed avatar renovate-bot avatar renovate[bot] avatar sayedihashimi avatar shiney avatar surfsflo avatar surrealist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

templates's Issues

JSON (de)serialization enhancements

Stack Overflow developed their own JSON (de)serializer that is almost on par with protobuf-net speeds. It is called JIL and leverages IL for speedy (de)serialization.

Here are a few articles regarding the speed differences.
http://kevinmontrose.com/2013/11/13/jil-serializing-json-really-really-quickly/
http://blog.developers.ba/replace-json-net-jil-json-serializer-asp-net-web-api/
http://rushfrisby.com/improving-webapi-performance-with-jil-and-protocol-buffers/

Application Insights

Hi there,

I can log errors to the application insights, but I can't seem to get the exception message to display in azure. The following are 2 screenshots. The first being what asp.net mvc boilerplate shows in azure when an error occurs. The second screenshot shows the default asp.net template and what it produces. The exception I'm trying to produce is divide by zero in controller.

ASP.NET MVC6 BoilerPlate Exception
You can see that it's treating it as an error 500 response code
exceptions

DEFAULT ASP.NET MVC6 TEMPLATE Exception
This is how the exception should really look notice no response code and you can see the exception message
correct

Also I noticed in the Microsoft template they use

**_ViewImports.cshtml**
@inject Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration TelemetryConfiguration

**_Layout.cshtml**
@Html.ApplicationInsightsJavaScript(TelemetryConfiguration)

Errors not being logged

I noticed that the project is not logging 404 and 500 among other errors. Is this intentional? How do I configure the project to log these errors on Elmah?

My problem runs deeper than this. My WebApi setup is throwing a 500, but I can't find the reason because the response is showing the custom error page.

Glimpse 404 on install

I want to try this project out, but on a clean install, VS2013 Update 4, I get a 404 when visiting ~/glimpse.

I Googled around for a while, but everything seems correct.

I can view the Trace and Elmah screens, just not Glimpse.

Enable HTTPS in development environment by building a version of RequireHttpsAttribute which supports port numbers.

Was looking at your TODO List and thought I could help with the Enable HTTPS in development environment by building a version of RequireHttpsAttribute which supports port numbers.

https://github.com/cottsak/DevCookie/blob/master/DevCookie.Web/App_Start/RedirectToHttpsHelper.cs supports port numbers, port numbers in config as well as load balancer headers (like nginx/appharbor environments).

OpenGraphMedia mediaUrl HTTPS

When using a HTTPS URL with a class derived from OpenGraphMedia class it sets the HTTP URL as well but leaves the port number in the URL. This outputs an invalid URL in the metadata (i.e.: http://www.example:443.com).

In the constructor of the OpenGraphMedia class it uses a UriBuilder to change schemes if the mediaUrl is HTTPS. If the port value was set to -1 it would use the default for the scheme and should generate the correct HTTP counterpart (i.e.: http://www.example.com). I think this should be sufficient. Many thanks in advance.

ELMAH errors in default project

ELMAH reports CSP errors in the default project.
Is there any easy fix for these? I have tried to fix them.

The errors come from referencing ports (on localhost) other than the IIS instance that the project is being run from. I think the relevant errors are in connect-src and img-src.

Bug in SitemapGenerator

Last few lines contain

Size:<{1}>",
Count:<{1}>",

They should be

Size:<{0}>",
Count:<{0}>",

Intellisense broken in cshtml

When starting a project from scratch with the latest release, the intellisense is broken on the cshtml pages. Tried looking around the web.config files per some stackoverflow URLs like so:
http://stackoverflow.com/questions/22832435/mvc-razor-view-intellisense-broken-in-vs-2013

And also checking other places to find the culprit in the solution ...
http://thetoeb.de/2014/01/05/enabling-mvc5-intellisense-in-a-classlibrary-project/

... but no luck thus far. Any idea what could be causing this? I'm running this on VS2013 Ultimate. Thought it might be a bit of mix up on dependencies between some of the DLLs and MVC5.

intellisense

Best Regards!

templates new project - Routes cannot find home or contact

Hi, nice template, I can see a lot of love went into it, love it!

I created a new project after updating my extensions as per check list, and using your template, but my app no longer fires up. Worked with an older early last yr 1.07 or something, just overwrote all that... and its broken now.

Btw, your comments and explanation are what made it easier than using the Nweb Sec!!! 👍

I followed the Pre-Requisites

  • Update Visual Studio - Update your version of Visual Studio with all patches and updates.
    
  • Update NuGet - Update the NuGet Visual Studio extension from the Tools -> Extensions and Updates menu.
    
  • Install Web Essentials - Install the Web Essentials Visual Studio extension. This is required to compile LESS code to CSS as well as giving you an awesome web development experience
    

Its broken and I am getting errors on basic routes, can you please help

Server Error in '/' Application.

The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Home/Contact even for Index

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1038.0

  1. Why does bundling with fallback fail, what do I need to do custom here? I was not able to follow this.
  2. Can I turn off autofac?
  3. Whats going on with the routes, the default routes should be able to find the actions like home? How can I switch back to default routes and get rid of attribute routing, will this impact security
  4. Are you planning on adding recaptca?
  5. How to use the home controller routes, I am new to this - sorry..
  6. There are 2 startup classes, what are they doing besides the default MVC way?

.thanks
patty

Web.Config ... <HttpErrors> does not work in Azure WebSite/WebApp

Thanks for this great project .. it saved me a good amount of time setting it all up myself.

I recently started using the template and it works great on my machine and IIS. However, when I deployed a version to an Azure WebApp, I started getting an infinite redirect loop for any bad URL.

I did some debugging, and I found that the httpErrors config section does not work as expected in Azure WebApps and instead the CustomErrors section should be used.

Auto Generation of Constants

@RehanSaeed

If you are interested, I have created T4 Templates to automatically generate the Constants for:

  • Controller Names
  • 'Action' Names, which detect if an HTTPGet or HTTPost, or a Route definition attribute was applied and creates constants accordingly. The names reflect the HTTP Verb, Get, Post, and I settled on Route for 'unspecified'.
  • View Names
  • I have others for creating constants for content files - e.g. CSS, Images, JavaScripts etc.

I am currently using VS 2015 Update 1 with the ASP.Net 5 MVC6 version. I see no reason why they would not work with other combinations. They automatically update on Build by default.

If you are interested, let me know and I will add a sample on GitHub to see what you think. You might notice I have used a slightly different naming convention from the base template, as there are a few areas where things are not quite fitting.

I would be interested in contributing to the project.

Examples:

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool 28/01/2016 00:06:42 UTC.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Pro.Website.Constants
{
    public static class ActionNames
    {
        public static class ErrorController
        {
            public static class Get
            {
                public const string Error = "Error";
            }
        }
        public static class HomeController
        {
            public static class Get
            {
                public const string About = "About";
                public const string Contact = "Contact";
                public const string Index = "Index";
            }
            public static class Route
            {
                public const string BrowserConfigXml = "BrowserConfigXml";
                public const string Feed = "Feed";
                public const string ManifestJson = "ManifestJson";
                public const string OpenSearchXml = "OpenSearchXml";
                public const string RobotsText = "RobotsText";
                public const string Search = "Search";
                public const string SitemapXml = "SitemapXml";
            }
        }
    }
}

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool 30/01/2016 00:09:24 UTC.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Pro.Website.Constants
{
    public static class ViewNames
    {
        public static class ErrorController
        {
            public const string Error= "Error";
        }
        public static class HomeController
        {
            public const string About= "About";
            public const string Contact= "Contact";
            public const string Index= "Index";
        }
        public static class SharedController
        {
            public const string _Footer00= "_Footer00";
            public const string _Header00= "_Header00";
            public const string _Header01= "_Header01";
            public const string _Header02= "_Header02";
            public const string _Header03= "_Header03";
            public const string _Header04= "_Header04";
            public const string _Layout= "_Layout";
        }
    }
}
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool 28/01/2016 00:08:08 UTC.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Pro.Website.Constants
{
    public static class ControllerNames
    {
        public const string Error = "Error";
        public const string Home = "Home";
    }
}

Which can then be called as follows:

<a asp-controller="@ControllerNames.Home" asp-action="@ActionNames.HomeController.Get.Contact">Contact Us</a>`
[Route("browserconfig.xml", Name = ActionNames.HomeController.Route.BrowserConfigXml)]`
<link href="@Url.RouteUrl(ActionNames.HomeController.Route.BrowserConfigXml)"
[HttpGet("contact", Name = ActionNames.HomeController.Get.Contact)]
public IActionResult Contact()
{
    return View(ViewNames.HomeController.Contact);
}

Generation of Icon Set

I have used http://realfavicongenerator.net/ to generate my set of icons using my own graphic and they have generated extremely well. However, It has generated some icons that are not in the set originally provided and there are more in the original set that have not been generated. For instance, none of the apple-touch-startup-image files have been generated.

Is any of this important?

Gulpfile.js Autorprefixer after sass()

Hi,

I think the autoprefixer should be applied after compiling sass?

.pipe(gulpif("**/*.scss", sass()))      // If the file is a SASS (.scss) file, compile it to CSS (.css).
            .pipe(autoprefixer({                    // Auto-prefix CSS with vendor specific prefixes.
                browsers: [
                    "> 1%",                         // Support browsers with more than 1% market share.
                    "last 2 versions"]              // Support the last two versions of browsers.
            }))

Currently autoprefixer comes before sass

Enhancements Security

Hi Have some suggestions for security and user management

  • - Can you include a view for user management, and if possible multitenancy
  • - Can you include honey pot to track the list of scammy sites reported ( a good list reported by the government directly) 1 2
  • - In the bundle config you have fall back options, can you also please extend this to support IE 8 shiv, I can include the code

<!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <![endif]-->

  • notification to both 1) target users and/or 2) pub sub would be nice too like Hangfire.io with Toastr

CSS/SCSS gulp lint

Hi @RehanSaeed,

Question about the lint-css task in the gulpfile:
I added the gulp-debug module to the pipe to see if it was picking up files under the source of Styles/**/*.{scss} and the debug() option is showing 0 items. I placed in the site.scss under Styles/ bogus scss that should have thrown a warning/error and it didn't.

Any insight on this?

Lifetime of CacheService

The CacheService is added to AutoFac with the Lifetime scope as InstancePerRequest. Should the DI create new MemoryCache service every request & dispose the cached objects ?

An unhandled exception of type 'System.AccessViolationException' occurred in Glimpse.Agent.AspNet.dll

"An unhandled exception of type 'System.AccessViolationException' occurred in Glimpse.Agent.AspNet.dll"
It goes to "Break mode". Afterwards web browser just shows IIS 10.0 detailed error: "HTTP Error 502.3 - Bad Gateway
The specified CGI application encountered an error and the server terminated the process."

I am getting this error when trying to run project in debug mode. If I run it without debugging, it opens.

P.S. I have additional question:

  • After installing Boilerplate (for asp.net mv6) I am getting "Invalid expression term ')' XXX.DNX 4.5.1, XXX.DNX Core 5.0 C:_XXX\XXX\XXX\Startup.ContentSecurityPolicy.cs 118 Active
    filters.Add(
    new CspConnectSrcAttribute()
    {
    // Allow AJAX and Web Sockets to the following sources.
    CustomSources = string.Join(
    " ",
    // CustomSources = "*.example.com", // Allow AJAX and Web Sockets to example.com.
    ),
    // Allow all AJAX and Web Sockets calls from the same domain.
    Self = true
    });

I removed this filter, is it ok?

I am very new to asp.net 5 and mvc 6, as well as your template.

AppendTrailingSlash = false breaks web site

Hi, changing the AppendTrailingSlash value to false breaks the web site, i.e home page returns "This page can’t be displayed".

I appreciate this is your preferred choice, but it would be good if it worked both ways.

Thanks

Add support for less

Instead of using sass I prefer less for styling my CSS files.
Therefore I would love to see support - maybe as a select option during initialization - for this kind of stylesheet writing.

Error while generating project.

Features

HttpException Selected: DefaultIsSelected:
Referrer Meta Tag Selected: DefaultIsSelected:
Humans.txt Selected: DefaultIsSelected:
Search Selected: DefaultIsSelected:
Atom Feed Selected: DefaultIsSelected:
Web-App Capable Selected: DefaultIsSelected:
Windows 8.1 IE 11/Edge Favicon Selected: DefaultIsSelected:
Windows 8 IE 10 Favicon Selected: DefaultIsSelected:
Google TV Favicon Selected: DefaultIsSelected:
Android Chrome M39+ Selected: DefaultIsSelected:
Android Chrome M36 to M38 Favicon Selected: DefaultIsSelected:
Apple Mac Safari Favicon Selected: DefaultIsSelected:
Apple iOS Favicons Selected: DefaultIsSelected:
Twitter Cards Selected: DefaultIsSelected:
Open Graph Selected: DefaultIsSelected:
Author Meta Tag Selected: DefaultIsSelected:
Contact Page Selected: DefaultIsSelected:
About Page Selected: DefaultIsSelected:
Redirect to Canonical URL Selected: DefaultIsSelected:
Sitemap Selected: DefaultIsSelected:
Robots.txt Selected: DefaultIsSelected:
Glimpse Selected: DefaultIsSelected:
Application Insights Selected: DefaultIsSelected:
NWebSec Selected: DefaultIsSelected:
HTTPS Everywhere Selected: DefaultIsSelected:
CSHTML Minification (Experimental) Selected: DefaultIsSelected:
XML Formatter None - True
DataContractSerializer - False
XmlSerializer - False
Both - False

JSON Serializer Settings Camel-Case (e.g. camelCase) - True
Title-Case (e.g. TitleCase) - False

JavaScript Test Framework Mocha - True
Jasmine - False
None - False

JavaScript Hint (JS-Hint) Selected: DefaultIsSelected:
JavaScript Code Style (JSCS) Selected: DefaultIsSelected:
TypeScript Selected: DefaultIsSelected:
Front End Framework Bootstrap - True
Zurb Foundation - False
Semantic UI - False

Target Framework .NET Core - True
.NET Framework 4.6.1 - True

Set the package.json or bower.json package name Selected: DefaultIsSelected:
Set the AssemblyCopyright Selected: DefaultIsSelected:
Set Random Ports Selected: DefaultIsSelected:
Services Selected: DefaultIsSelected:
JavaScript Lint Selected: DefaultIsSelected:

Exceptions

System.AggregateException: One or more errors occurred. ---> System.IO.IOException: The directory is not empty.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
at Boilerplate.Wizard.Services.FileSystemService.<>c__DisplayClass13_0.b__2()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Boilerplate.Wizard.Services.FileSystemService.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Boilerplate.Wizard.ViewModels.MainViewModel.d__19.MoveNext()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.IO.IOException: The directory is not empty.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
at Boilerplate.Wizard.Services.FileSystemService.<>c__DisplayClass13_0.b__2()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Boilerplate.Wizard.Services.FileSystemService.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Boilerplate.Wizard.ViewModels.MainViewModel.d__19.MoveNext()<---

Project file .csproj template typo

Small typo, big problem - can't reach any packages when compiling. The latest version ( I went from v2.9.1 to v 2.9.7 ) has a missing "." in the packages path in .csproj file: ".\packages" and not "..\packages", therefore tons of errors when compiling.

Using MVC5 version of template - just create new project from template and try to build, NOTHING else, no changes, etc.

For anyone with this problem the quick fix is just a search and replace in the .csproj file - since this only happens during project creation.

Cannot view Elmah logs

When clicking on detail for an error in elmah, I get a 500 error. When viewing elmah, I get the following error message: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Is this due to how the template is configured?

SRI tag helper security\fallback

As Damian on the asp.net community standup noted.
It's not secure to compute the hash on the server directly from the cdn (even if you cache the result).
Because the file could become compromised at some point in time.
Another note is this > CDNs fail, but your scripts don't have to - fallback from CDN to local jQuery

I would recommend uploading the required file to the server, use that to compute the hash (saves on download time).
And generate a fallback script for when the cdn fails or becomes corrupted like so:

<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-2.0.0.min.js"></script>
<script>
if (typeof jQuery == 'undefined') {
    document.write(unescape("%3Cscript src='/js/jquery-2.0.0.min.js' type='text/javascript'%3E%3C/script%3E"));
}
</script>

and of course you could add the SRI tag to both script elements

MVC 6 Error Controller causing Bad GateAway on IIS

After calling url with status code below 200 (localhost/error/1/) IIS returns BadGateway ugly page.
For Greater or Equal 200 it returns nice error page from MVC.
It can be easly fixed by changing route and translate anything below 200 to 404 Not Found .

VS community 2015 crash

When i try to create a new project based on MVC6 template the VS crash, does someone know why this is happening. Thanks in advance.

MVC5 ReadMe.html icon not found

Right after main "jumbotron" div, missing image at https://github.com/RehanSaeed/ASP.NET-MVC-Boilerplate/raw/master/Images/Technology%20Map.png

MVC5 404 not found + solution

Hello,

I encounter some 404 errors, when starting my apllication.
The cause is Visual Studio open url http://localhost:6619/Home/Customroute
But this url is inccorect. The correct url is http://localhost:6619/customroute

Here is the way to fix it :

  1. Open Project properties
  2. Go to Web Tab
  3. Check "Specific Page" for Start Action
  4. Leave "Specific Page" blank

In fact, this will open http://localhost:6619/ in web browser instead of the "Current Page" (this one give wrong url).

So can you add thoses steps in your Readme file please ?

2.8.1 Jshint

Hi there,

Everything seems to working well with v2.8.1 but if I choose the JSHint option I'm getting this error for the task runner:

cmd.exe /c gulp --tasks-simple
module.js:338
    throw err;
          ^
Error: Cannot find module 'jshint/src/cli'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (D:\Programming\Projects\AspNetMvcBoilerPlate\test\test\node_modules\gulp-jshint\src\extract.js:1:79)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

It could be related to this:
http://stackoverflow.com/questions/33984558/gulp-error-cannot-find-module-jshint-src-cli

BrowserConfig.xml still has a trailing slash

Hi

I noticed that certain html resources have a trailing slash, even though [NoTrailingSlash] has been specified.

<meta name="msapplication-config" content="@Url.RouteUrl(HomeControllerRoute.GetBrowserConfigXml)">

produces

<meta name="msapplication-config" content="/browserconfig.xml/">

I noticed the manifest.json also has the same problem

Port 8080 Conflict with TFS Express

It appears the default port 8080 is already in use by TFS Express.
Removing TFS express resolved the issue.
Everything ok now and I can create new projects from the template.
Although the port can be modified after creating the project, I was blocked from creating a new project until I resolved the conflict.

This is the error that occurred when creating new project from template (after installing extension).

"The site for the URL 'http://localhost:8080/', configured for Web project exists on both the local IIS web server and the IIS Express web server. You need to use IIS Manager to change this site's binding(s) in IIS"

please consider a more liberal license

currently this project is licensed as GPL which is kind of a poison pill because of its viral clause which means anyone who uses this project must also make their own project code licensed under GPL.
I cannot use this project for anything with the current license, not even in my own open source projects which are not GPL.

Please consider something more liberal like MIT or apache 2 license. Note that Microsoft uses apache 2 for the open source asp.net 5 mvc 6 framework, it would be more consistent if this project used the same.

RedirectToCanonicalUrlAttribute lowercase rule breaks password reset tokens

RedirectToCanonicalUrlAttribute's lowercase rule should probably only force URL's path part to be lowercase. QueryString often contains case-sensitive data as is the case with ASP.NET 5 Identity's password reset and email confirmation links with the security tokens which are case-sensitive. Using the lowercase rule breaks the token authorization since the token is altered.

Maybe this part should be deleted, or give more control over the rule:
https://github.com/RehanSaeed/ASP.NET-MVC-Boilerplate/blob/master/Source/MVC6/Boilerplate.Web.Mvc6/Filters/RedirectToCanonicalUrlAttribute.cs#L151-L162

v2.8 css / js / gulpfile not outputting correctly

Hi there,

I noticed you removed "webroot": "wwwroot" in project.json. But your gulpfile refrences project.webroot so when building the gulp file nothing gets outputted

 // Destination Directory Paths
    wwwroot: "./" + project.webroot + "/",
    css: "./" + project.webroot + "/css/",
    fonts: "./" + project.webroot + "/fonts/",
    img: "./" + project.webroot + "/img/",
    js: "./" + project.webroot + "/js/"

Maybe you need to introduce a hosting.json file:

Hosting:DetailedErrors - Show detailed errors for startup failures
server or Hosting:Server - Specify which servers
app or Hosting:App - Application where the startup is
ASPNET_ENV or Hosting:Environment - The environment to run as (Development, Production etc)
webroot - Webserver root, used by iis and static file servers

MVC6 Boilerplate does not work if there is no specific package source in NuGet

Hi,
there are missing packages by default in MVC6 Boilerplate if one does not have added specific package source in NuGet.
Packages which can't be downloaded and installed:
"Newtonsoft.Json": "7.0.1"
"Boilerplate.Web.Mvc6": "1.2.0"

Solution is to add ASP.NET master package source from myget in Tools -> Options -> NuGet Package Manager -> Package Sources:
Name: ASP.NET master
Source: https://www.myget.org/F/aspnetmaster/api/v2

Readme is missing about that topic, so please add it :)

NullReferenceException thrown in Startup.cs, ASP.NET Core

ConfigureServices() throws a NullReferenceException in the AddMvc(options =>)
lambda in the call to AddRedirectToCanonicalUrlFilter(this.routeOptions)

this.routeOptions is null - apparently, the call to AddRouting happens after the call to AddMvc, despite their lexical ordering in the actual code (huh, that's weird. You'd think the middleware would run in set-up order...), and so this.routeOptions hasn't been given its value yet.

I built the project from latest source (6d975ae).

Consolidate all security settings into web.confg

Hello, I recently noticed the current template ASP MVC 4.6 version has a lot of scattered security settings across the template. Which makes it very easy to miss, and it happened to us for the longest time over nuget updates, where it slipped into the production site.

So, in keeping with configuration over convention keeping the settings, I want to recommend consolidating the security settings into the web.config. At the same time I would be interested in hearing out your thoughts on why it be better to put some of those in the code itself.

Thanks
Sergy

Missing jshint and jslint

I created an MVC 6 RC1 Update 1 project using extension v2.14.0 and had to manually install jshint and tslint: npm install --save-dev jshint tslint

Without it, gulp was throwing:

$ gulp --tasks-simple
module.js:340
    throw err;
    ^

Error: Cannot find module 'jshint/src/cli'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (c:\Code\Scratch\BoilerplatApp20160411\BoilerplatApp20160411\node_modules\gulp-jshint\src\extract.js:1:79)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)

And then:

$ gulp --tasks-simple
module.js:340
    throw err;
    ^

Error: Cannot find module 'tslint'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (c:\Code\Scratch\BoilerplatApp20160411\BoilerplatApp20160411\node_modules\gulp-tslint\index.js:5:14)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (c:\Code\Scratch\BoilerplatApp20160411\BoilerplatApp20160411\gulpfile.js:32:14)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)

(gulp --tasks-simple is what VS 2015 task runner explorer calls)

v2.8 issues

Hi there,

I found a couple of issues after building v2.8 (commit: da1254f) , I couldn't find the compiled vsix on visual studio gallery.

I created a new project using .net 4.5.2, choosing default options:

1) _ViewImports.cshtml
Referencing _Microsoft.Framework.OptionsModel_ but should be referencing _Microsoft.Extensions.OptionsModel_

2) gulpfile.js
autoprefixer = require("gulp-autoprefixer") missing comma at the end of line

There is an warning using "strict" in gulpfile.js for _require_, it states that "Using a variable (property or object) without declaring it is not allowed in in 'strict mode', You may need to declare var require;

3) JSHint Errors)
If you choose the _JsHint_ option then there is an error with gulpfile, if you don't choose JsHint as an option everything works correctly

Failed to run "D:\Programming\Projects\AspNetMvcBoilerPlate\WebApplication4\WebApplication4
\Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
module.js:338
    throw err;
          ^
Error: Cannot find module 'jshint/src/cli'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (D:\Programming\Projects\AspNetMvcBoilerPlate\WebApplication4\WebApplication4\node_modules\gulp-jshint\src\extract.js:1:79)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

Failed to run "D:\Programming\Projects\AspNetMvcBoilerPlate\WebApplication4\WebApplication4\Gulpfile.js"...
cmd.exe /c gulp --tasks-simple
module.js:338
    throw err;
          ^
Error: Cannot find module 'jshint/src/cli'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (D:\Programming\Projects\AspNetMvcBoilerPlate\WebApplication4\WebApplication4\node_modules\gulp-jshint\src\extract.js:1:79)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)

learn more link has wrong redirect in index.cshtml

On the index page the very last link at the bottom about ASP.NET-MVC-Boilerplate has a link to autofac.com instead of what I imagine is suppose to be this github project. You should probably change that.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.