ASP.NET MVC Application with a Custom Layout

A Visual Studio 2015 project which shows how use create an Asp.Net MVC Application with a custom layout. The AdminLTE layout (MIT License) from https://almsaeedstudio.com/preview has been selected for the customization.

C# (7.8 MB)
 
 
 
 
 
4.6 Star
(28)
128,445 times
Add to favorites
2/10/2016
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Error
    1 Posts | Last post August 13, 2019
    • Hai bartosz,
      
      I'm publishing a site with this custom layout and error.
      
      Message:
      
      Server Error in '/WebApplication' Application.
      Directory does not exist.
      Parameter name: directoryVirtualPath
      Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
      
      Exception Details: System.ArgumentException: Directory does not exist.
      Parameter name: directoryVirtualPath
      
      Source Error: 
      
      An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
      
      there is solution?
      thx.
  • Any tip to update AdminLTE to a newer version?
    1 Posts | Last post May 16, 2019
    • thanks a lot, it worked great for me, but it is 2019 there are any tip or guide to upgrade AdminLTE to a newer version?
  • We have proble to see styles in release mode
    5 Posts | Last post April 12, 2019
    • I'm publshing a site with this Custom Layout and I have a lot of 403 Error with style files
    • Solution:
      set to "true" compilation debug in the Web.config file
      and test it, compile and set in VS to release.
      
        <system.web>
          <authentication mode="None"/>
          <compilation debug="true" targetFramework="4.5"/>
          <httpRuntime targetFramework="4.5"/>
        </system.web>
    • Thank you for the information.
    • Hi Roberto, 
      I have same error. But this solution did not work for me.
      Any idea?
    • See
      https://stackoverflow.com/questions/13673759/mvc4-style-bundle-giving-403
      
      https://stackoverflow.com/questions/12081255/asp-net-mvc-framework-4-5-css-bundles-does-not-work-on-the-hosting
      
      My bundles were registered as paths which corresponded to an actual folder on the solution, e.g. ~/Content/forum.
      
      This works fine when bundling is turned off (the bundle is included correctly!), but not when bundling is enabled.
      
      The solution is to change the registered name of the bundle to not be the same as anything that exists in the file system.
      
      My guess is that the path Content/css exists on disk in your app. In this case IIS would be handling the request, not MVC.
      
      Make sure that the virtual path for the bundle (the parameter of the StyleBundle constructor) doesn't match a folder in the file system.
      
      From the comments:
      
      "A good convention to follow when creating bundles is to include "bundle" as a prefix in the bundle name. This will prevent a possible routing conflict."
  • After download, I cannot find .MDF file and it raises SQL exception
    2 Posts | Last post May 03, 2018
    • After download, I cannot find .MDF file and it raises SQL exception while creating database. Any Help pls.
    • Hi Mihir
      
      1. Make sure your webapp is running with a specific app pool and its own user
      2. Create an empty sql server database
      3. Create a login in SQL Server for the app pool user and give this login DBO permissions on the database
      4. adjust the db connection string in IIS for your database 
      
      and that's it - this worked for me.
      
      Cheers
  • Authorization with SSO Domain or MS Claims
    1 Posts | Last post March 28, 2018
    • This template is just awesome - very easy to implement.
      But since my knowhow is pretty poor in ASP.NET MVC, I need some advice or reference links.
      
      I need to adapt this solution to use Windows Authentication, MS domain login or MS Claims - how can I do that? Are there any reference links or...
      
      Thanks for any advice =)
  • Make most pages public access and less pages needs authorization
    2 Posts | Last post March 08, 2018
    • As you said:"Web Application requires user authorization".If I want the Web Application's most pages can be visited without login/authorization,only some page need login.I mean Controllers without [Authorize] can be visited by anyone , Controllers with [Authorize] can be visited by users that login.I dont want to use [AllowAnonymous] because there are to many public access pages ,while only a fer pages need authorization which I can add [Authorize] on them.What should I do?I dot know where to configure for this purpose.
    • I notice that comment this line "filters.Add(new AuthorizeAttribute());" in FilterConfig.cs seems useful.
  • AppData
    1 Posts | Last post December 03, 2017
    • I can't login at all...like every time i click on login, it COomes always this page saying, we cant add this .mdf file to Appdata...problems in line 70 Account Controller...Idk whats wrong!
      
  • Hi
    2 Posts | Last post July 17, 2017
    • I am able to run deploy the layout & see is well. My current application demands mysql instead of sql server. a) Can use mysql & use this template. b) what changes i need to perform.
      
      Thanks 
    • Hi. Ravi, as long as it is an asp.net application. you will need local MSSQLDB for user management which you can tweak to your need.
      
      This came late, I hope you solved your issue.
  • Directory does not exist - Deploying App
    4 Posts | Last post June 07, 2017
    • Hi friends,
      
      I'm trying to deploy my project to an internal server, using this custom layout, and I'm dealing with the following issue. I'm trying to figure out the solution, but at this moment I don't know it. 
      
      Please see the details of the issue and let me know any suggestions.
      
      Parameter name: directory
      VirtualPath lowing issue:
      
      [ArgumentException: Directory does not exist.
      Parameter name: directoryVirtualPath]
        System.Web.Optimization.Bundle.Include(String[] virtualPaths) +135
        WebApplication.BundleConfig.RegisterLayout(BundleCollection bundles) +1898
        WebApplication.BundleConfig.RegisterBundles(BundleCollection bundles) +16
      
      [HttpException (0x80004005): Directory does not exist.
      Parameter name: directoryVirtualPath]
        System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +544
        System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +186
        System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
        System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402
        System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343
      
      [HttpException (0x80004005): Directory does not exist.
      Parameter name: directoryVirtualPath]
        System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
        System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
        System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712
      
    • I got the solution. For "unknown" reason, some folders were hidden and the Publish process didn't consider them. I had to include those folders, within the AdminLTE folder, in the project.
    • Thank you for sharing this solution.
    • Hi Ramos,
      How did you included folders?
      I could not anything on VS2017.
  • Get database sql script
    1 Posts | Last post March 31, 2017
    • Hello 
      I would like to use this web app as a starting point for my project as i find it really well.
      Unfortunaltey i am still using sqlserver2012 and when trying to attach the db, i got an error of downgrade not doable.
      Is there a way to get sql script to create the db please?
      Thank you
      M. Gautier
1 - 10 of 17 Items