Magazine management website - An ASP.NET MVC 4 Sample

A small example that used ASP.NET MVC 4 in Visual studio 2012 for implemented the Magazine website. (Up coming version, I am working on new updated version using Visual Studio 2013 RTM, ASP.NET MVC 5, Web API 2 and AngularJS for this example)

C# (17.6 MB)
120,318 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • use cumstom Database
    1 Posts | Last post April 17, 2015
    • dear, When I run web Application and try   "Go to administration board" it occur like this:
      Server Error in '/' Application.
      The model backing the 'SimpleSecurityContext' context has changed since the database was created. Consider using Code First Migrations to update the database (). 
        can you help me 
  • How can I part of development?
    6 Posts | Last post February 05, 2015
    • Hi Thangchung,
      I would like to be a part of this good app. How can I submit my changes to this app?
    • Hi Gaurav, can you share your changes?
    • Hi Gaurav,
      I am not active on this project for a long time. But you can contribute to my github at
    • Dear can you upload the Step by step tutorial file in pdf format , so that it is easy to learn for beginners like me or can mail on, thank for sharing your knowledge.
    • Ok I will do that. Is it possible to add me as a collaborator to Github repor?
    • Give me your account name on github, please!!!
  • build error
    4 Posts | Last post February 04, 2015
    • i just downloaded it and opened it in visual studio 2012 and made a built, got errors regarding automapper and some dll, not being found. 
      Sorry this is equal to one star. 
    • just compile each project one by one and try again. Also Make sure you have NuGet installed.
    • Thanks eid2, building the projects 1 by 1 did the trick.  
    • Ok I will do that. Is it possible to add me as a collaborator to Github repor?
  • Image file upload issue
    6 Posts | Last post September 27, 2014
    • I downloaded your version testing it find that an error i cannot solve is 
      'System.Web.HttpPostedFileWrapper' does not contain a definition for 'CreateImagePathFromStream'
      when i look at the CreateImagePathFromStream in HttpPostedFileExtension the function with 2 params and just got one param when you call.
       public static string CreateImagePathFromStream(this HttpPostedFileBase postedFile, IMediaItemStorage imageStorage)
      if (vm.SmallImage != null)
                      smallImagePath = vm.SmallImage.CreateImagePathFromStream(_itemStorage);                          
      not sure you uploaded the latest full version or not, can you please let me know.
      Anyway, thank you for your example.
    • @Henry -
      I corrected this by casting to its base type so, snippet should be re-written like this : 
      if (vm.SmallImage != null)
                      smallImagePath = ((HttpPostedFileBase)vm.SmallImage).CreateImagePathFromStream(_itemStorage);
      In this operation, we used dynamic so, I would like you to refer this link :
      for more understanding related to dynamic type casting.
    • for solved this Problem Edit this File in  Project solution
      in "ItemController.cs" edit or Update this lines
      * smallImagePath = vm.SmallImage.CreateImagePathFromStream(_itemStorage);
       replaced with bellow line :
      smallImagePath = CIK.News.Web.Infras.Extensions.HttpPostedFileExtension.CreateImagePathFromStream(vm.SmallImage,_itemStorage);
      next one 
      * mediumImagePath = vm.MediumImage.CreateImagePathFromStream(_itemStorage);
        replaced with bellow line :
      mediumImagePath = CIK.News.Web.Infras.Extensions.HttpPostedFileExtension.CreateImagePathFromStream(vm.MediumImage, _itemStorage);
      next one :
      * largeImagePath = vm.BigImage.CreateImagePathFromStream(_itemStorage);
       replaced with bellow line :
      largeImagePath = CIK.News.Web.Infras.Extensions.HttpPostedFileExtension.CreateImagePathFromStream(vm.BigImage, _itemStorage);
      in "HttpPostedFileExtension.cs" file Update this lines
      using (var memoryStream = new MemoryStream())
                          imagePath = imageStorage.Storage(memoryStream, postedFile.FileName);
         replaced with bellow line :
      using (var memoryStream = new MemoryStream())
                          string OnlyFilename = postedFile.FileName.Substring(postedFile.FileName.LastIndexOf("\\") + 1);
                          imagePath = imageStorage.Storage(memoryStream, OnlyFilename);
      in " MemoryStreamExtension.cs ":
      1) use name space " using System.NET"
      2)update this line
      var outStream = File.OpenWrite(fileName);
       replaced with bellow line :
      WebClient client = new WebClient();
      Stream stream = client.OpenWrite(fileName);
    • continue 
      in " MediaItemStorage.cs " edit or Update this lines
      var fullPath = Path.Combine(physicalPath, fileName);
        replaced with bellow line :
      var fullPath = Path.GetFullPath(Path.Combine(Path.Combine(physicalPath, fileName)));
       my mail for contact us :  OR
    • @Henry Kwan LH: please make sure you have correct version of .NET framework
    • 有懂中文的吗,我下载了示例运行新增也是出现同样的问题,上传图片就失败
                      smallImagePath = vm.SmallImage.CreateImagePathFromStream(_itemStorage);
      用户代码未处理 Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
        Message='System.Web.HttpPostedFileWrapper' does not contain a definition for 'CreateImagePathFromStream'
        Source=Anonymously Hosted DynamicMethods Assembly
             at CallSite.Target(Closure , CallSite , Object , IMediaItemStorage )
             at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
             at CIK.News.Web.Areas.Admin.Controllers.ItemController.CreateOrUpdateItem(Object vm, Boolean isNew) in d:\testzlh\资料\20140927\Magazine management website - An ASP.NET MVC 4 Sample\C#\Web\Areas\Admin\Controllers\ItemController.cs:line 101
             at CIK.News.Web.Areas.Admin.Controllers.ItemController.Create(ItemCreatingViewModel viewModel) in d:\testzlh\资料\20140927\Magazine management website - An ASP.NET MVC 4 Sample\C#\Web\Areas\Admin\Controllers\ItemController.cs:line 48
             at lambda_method(Closure , ControllerBase , Object[] )
             at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
             at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
             at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
  • Can you give a a step by step tutorial for this project?
    1 Posts | Last post August 25, 2014
    • Sir,
      I am a beginner in and I don't know much about this technology.
      I request you ,please send me some tutorial which can help me to learn
      my email id is
  • How to open this application in VS 2010 Ultimate
    1 Posts | Last post June 09, 2014
    • Hi,
      I am using MVC 4 tool along with MS VS 2010 Ultimate not 2012. When I opened the solution it shows incompatiable for all the projects.
  • use this sample
    1 Posts | Last post January 14, 2014
    • I was wondering is it possible to use this sample for comercial uses?
      i will explain, im creating an online environment for developers and i want to use this sample as the default web site on my IIS, was wondering if possible?
      really appreciate if it is possible so it will save me time to build on by myself
  • Problem in debugging
    2 Posts | Last post November 09, 2013
    • whenever i start debugging, a pop up window appear "A project with an output type of class library cannot be started".What is the problem??Can anyone help me??
    • for PROJECT menu select Properties and  change the start up project from (single start up project combo). you can select CIK.News.Web.
  • Magazine website - PDF
    2 Posts | Last post November 09, 2013
    • Dear can you upload the Step by step tutorial file in pdf format , so that it is easy to learn for beginners like me or can mail on, thankx for sharing your knowledge.
    • @NaumanKhanTareen: yes, I do. I will notify to you when I done it
  • Object reference not set to an instance of an object.
    3 Posts | Last post July 16, 2013
    •  @Html.ActionLink(Model.FirstItem.ItemContent.Title, "Details", "Home", new {id=Model.FirstItem.Id}, null)
      is this an indication that's there is no connection to the database?
    • @hazz Actually, there is no technical for detect the database null or no connection to database here. This is only a simple sample. We need to develop that feature in advantage sample if needed.
    • insert the data in the table,null means that there is no data on the table
1 - 10 of 23 Items