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)
 
 
 
 
 
(48)
106,357 times
Add to favorites
11/9/2013
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • 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.
      
      Regards,
      Sarav
  • 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
      
      Thanks
      Daniel
  • build error
    2 Posts | Last post November 09, 2013
    • 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.
  • 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.
  • Image file upload issue
    5 Posts | Last post November 09, 2013
    • 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.
      
      <code1>
       public static string CreateImagePathFromStream(this HttpPostedFileBase postedFile, IMediaItemStorage imageStorage)
      
      <code2>
      
      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 : http://msdn.microsoft.com/en-us/library/system.dynamic.dynamicobject.tryconvert.aspx
      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())
                      {
                          postedFile.InputStream.CopyTo(memoryStream);
      
                          imagePath = imageStorage.Storage(memoryStream, postedFile.FileName);
                      }
      
         replaced with bellow line :
      
      using (var memoryStream = new MemoryStream())
                      {
                          postedFile.InputStream.CopyTo(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);
      memoryStream.WriteTo(outStream);
      
       replaced with bellow line :
      
      WebClient client = new WebClient();
      Stream stream = client.OpenWrite(fileName);
      memoryStream.WriteTo(stream);
      
      AND...
                 
    • 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)));
      ==========================================================
      END.
       my mail for contact us : kaveh.sobh@outlook.com  OR  AKA1.tak@gmail.com
    • @Henry Kwan LH: please make sure you have correct version of .NET framework
  • 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 naumankhantareen@gmail.com, thankx for sharing your knowledge.
      
      thanx......
    • @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
  • How to add new articles?
    2 Posts | Last post June 21, 2013
    • Will this feature be included?
    • @Rob Yes, it will be integrated in new project soon.
  • Build error
    3 Posts | Last post June 21, 2013
    • Error	
      Description:
      The type or namespace name 'AutoMapper' could not be found (are you missing a using directive or an assembly reference?)	
      File = C:\MYPATH\Web\App_Start\MappingConfig.cs	
      Line = 3	
      Column = 11	
      Project = CIK.News.Web
      
      Error
      Metadata file 'F:\SampleProjects\ASP_Magazine\Web\bin\CIK.News.Web.dll' could not be found	
      File = C:\MyPath\Web.Tests\CSC	
      Project = CIK.News.Web.Tests
      
      
    • I built each project one by one and then the error is gone. 
    • @Ian Ho Make sure you have NuGet installed and it will work.
  • how to study this code
    1 Posts | Last post May 30, 2013
    • Hi , I'm new to mvc . i downloaded your project but  i don't know how to trace it . i mean if i want to statr a new one base on your code , what would be the steps of implementing that ? 
      also , when i want to register new member , i get the error of websecurity.createmember() about display name and other stuff..
      I tried to change table and make DisplayName unnecessary but that error still exists. 
      can you at first tell me what are the steps ? 
      and then how to fix this registration problem ?
      
      i appriciate your help ;)
      
1 - 10 of 20 Items