Skip to content

A light-weight solid starting point for developing ASP.NET MVC/Web API application in portable SharpDevelop. Great for student learning and small projects!

Notifications You must be signed in to change notification settings

hubert17/sharpdevelopmvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

SharpDevelopMVC5

A lightweight, solid starting point for developing ASP.NET MVC and Web API applications in portable SharpDevelop. Great for student learning and small to medium-sized projects!

SharpDevelop

See the Demo

Features and Libraries

  • Bootstrap 4.6 with bonus Bootswatch themes and Bootbox.js
  • EntityFramework.SharpDevelop (SQL Server, now with MS Access MDB support!)
  • Dapper / Dapper.Contrib
  • EFUtilities.SharpDevelop
  • Simple Forms Authentication
  • AutoMapper
  • FluentValidation
  • Image/File Upload
  • Email/SMTP
  • SimpleLogger
  • Hangfire Core/Hangfire.MemoryStorage
  • CsvHelper
  • SimpleExcelImport
  • petite-vue
  • OpenHtmlToPdf
  • Simple JWT Authentication
  • Swagger/Swashbuckle
  • SignalR 1 (ChatDemo)

Why it's light?

  • No OWIN
  • No ASP .NET Identity

Web.config missing?

Simply Build and then reload the project, or copy _web.config and rename it to Web.config.

Encountering Build Errors? Could not resolve reference... Could not locate assembly... The underlying connection was closed...

  • Option 1: Run (Merge) nugetfix.reg
  • Option 2: Run nuget.bat
  • Option 3: In SharpDevelop, run Restore packages
  • Option 4: Execute this command nuget restore

Running in IIS Express

  1. Click the Project Menu > Project Options

  2. In the Web tab, choose [Use IIS Express Web Server]

  3. Enter any port number, e.g., 55353 or higher

  4. Click the [Create application/virtual directory] button. Done! You can now run/debug the web app.

    *** Error indicating duplicate entry of type 'site' with unique key attributes...

  5. Right-click, rename, and Clean the project. Example: ASPNETWebApp45 -> NewNameOfMyWebApp

  6. Repeat step 1.

To enable localhost SSL/HTTPS

Add a port 443xx https binding in My Documents\IISExpress\config\applicationhost.config

    <bindings>
	    <binding protocol="http" bindingInformation="*:55353:localhost" />
		<binding protocol="https" bindingInformation="*:44353:localhost" />
    </bindings>

Local IIS or IIS Express was not found

Download and install IIS Express

Database Browsers

You can browse the database using SQL Server Management Studio (SSMS) or portable Database.NET. To enable (LocalDB)\MSSQLLocalDB, install SQL Server Express LocalDB.

Publish Files (Ready to zip and upload)

Run Rebuild to generate publish files. See the _publish folder. Make sure to back up App_Data folder in your production server before zip-deploying your site.

Free ASP .NET Hosting

Github Actions (CD/CI to Somee.com)

Autodeploy your web app to Somee.com. Just create these Secrets (Settings > Secrets) and Variables, and supply your Somee sitename, username and password:

  • SOMEE_SITENAME
  • SOMEE_USERNAME
  • SOMEE_PASSWORD

Learning Slides

ASP .NET MVC Tutorial

  1. Creating your first ASP.NET MVC application (until 5:07)

  2. Controllers in an MVC application

  3. Views in an MVC application

  4. ViewData and ViewBag in MVC

  5. Models in an MVC application

  6. Data access in MVC using Entity Framework

  7. Generate hyperlinks using actionlink HTML helper

  8. Creating a view to insert data using MVC

  9. Model Binding in MVC

  10. Insert, update, delete in MVC using Entity Framework

  11. Partial views in MVC

  12. Razor views in MVC

  13. Layout view in MVC

  14. Authorize and AllowAnonymous action filters in MVC

ENTITY FRAMEWORK Tutorial

  1. What is Entity Framework

  2. Entity Framework Code First Approach

  3. Customizing table, column, and foreign key column names

Warning

  • Do not load the project in Visual Studio
  • Do not add Nuget packages that support .NET Standard

Visual Studio 201x version

  • Download here the same project compatible with Visual Studio 2012-2019.

Contributors

About

A light-weight solid starting point for developing ASP.NET MVC/Web API application in portable SharpDevelop. Great for student learning and small projects!

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •