I've got a webservice which provide my app from data. Currently I've got issues with dates.

In my Ionic pages i use the date pipe like this: {{model.DateStart | date: 'dd-MM-yyyy HH:mm'}}

This results in '18-02-2017 14:08', thats good.

But when the service sends this '2017-02-18T15:00:00' the result is '18-02-2017 16:00'. That's not good.. It adds a hour somewhere.

It'll have to do with the locale settings somewhere, but I don't know how to fix it.

Anyone knows how to fix this problem?

medicinecenterlist = (List)Session["medicinecenterlist"]; this session has multiple value and MedicineCenter is a moddel and have many property. Now My view page or View template how i fetch/show/retrive all multiple data or array of data in List Box.

i am trying to add the default button functionality for the table each row. in each templates of the list view like Insert template and Edit template.

One way i know is using asp Panel but how will add the panel in each row of the table to get the functionality working and if not panel then what will be the other way of achieving it.

Please help as its very basic requirement from the application which we are stuck with the tables.

I got this error in visual studio 2015 while publishing asp.net.core web app to azure.

The "Publish" task failed unexpectedly. System.Exception: Publishing WebApplication1 for .NETFramework,Version=v4.6.2/win7-x64

Illegal characters in path. Parameter name: path at Microsoft.DotNet.Tasks.Publish.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuild.

the project builds on local machine and launched the web app successfully but fails to deploy on azure.

I am trying to create an ASP.NET MVC Web API project using entity framework

I'm not sure where to start,based on your experience can anyone point to web tutorials I can look up to get started?anyone give me a hand?

If this is not the right forum,where should I post questions like these

So, I've seen this solution (http://www.hanselman.com/blog/HowToEnableHTTPStrictTransportSecurityHSTSInIIS7.aspx) used in other answers and other sites, but I don't understand HOW the HSTS header is being added. I assume it has a lot to do with this:

<match serverVariable="RESPONSE_Strict_Transport_Security" pattern=".*" />

Could someone explain where "RESPONSE_Strict_Transport_Security" is coming from?

Full code:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="HTTP to HTTPS redirect" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}"
                        redirectType="Permanent" />
                </rule>
            </rules>
            <outboundRules>
                <rule name="Add Strict-Transport-Security when HTTPS" enabled="true">
                    <match serverVariable="RESPONSE_Strict_Transport_Security"
                        pattern=".*" />
                    <conditions>
                        <add input="{HTTPS}" pattern="on" ignoreCase="true" />
                    </conditions>
                    <action type="Rewrite" value="max-age=31536000" />
                </rule>
            </outboundRules>
        </rewrite>
    </system.webServer>
</configuration>

I am a total .net beginner and just starting in the world of web development, but I do have a fair amount of database and backend experience using mostly non Microsoft technologies. I'm looking for an example of a current (preferably free) C#.net application template that I can use to do the following:

  1. Display a list of records from a record set in a read only grid on a main webpage.

  2. When the user clicks on a single record/row in the grid, a separate add/edit detail page will be displayed for the record with controls to match the data types of the fields (textboxes, date pickers, etc.)

  3. The user can edit the individual fields on the detail page and click a cancel or save button to update the record and return to the main page

I know this is painfully simple to most of you, but to a noob who is just starting, it's difficult to weed through the many online resources and find a good simple working complete example. Any advice? Thank you!

i am using owin middleware for authentication. I am using 3 middleware extensions eg bearer, custom1, custom2.

After authentication has happened, I want to know in my authhorization code, which of the middleware extension was successful in authenticating. I tried to achieve it by inserting a property in AuthenticationTicket

 Dictionary<string, string> statevalues = new Dictionary<string, string>() { { "successful", "true" } };
AuthenticationProperties props = new AuthenticationProperties(statevalues);
AuthenticationTicket authenticationTicket = new AuthenticationTicket(claimsIdentity, props);

But I couldn't find how to read back these properties. They were not available in HttpContext.Current.GetOwinContext().Authentication.GetAuthenticationTypes() also.

Any idea?

I dont understand the error message. What does it mead by scalar variable? @ASIN value should be stored in the id variable I created for the GetByAsin method.

 //Gets one Music Detail
    public MusicDescriptionModel GetByAsin(string id) 
    {
        using (IDbConnection db = connection)
        {
            string sql = "select ASIN, Title, Artist, Price, ReleaseDate,NumberDisks,label,DetailPageURL, Review" +  
                           "FROM tblDescription WHERE id = @ASIN";
            //need to parameterize ID to avoid sql injection attacks.
            MusicDescriptionModel musicdesc = db.Query<MusicDescriptionModel>(sql, new { id }).SingleOrDefault();
            return musicdesc;
        }
    }

My code used to work before but it stopped working since Salesforce updated from TLS 1.0 encryption protocol to TLS 1.2.

Can you please let me know what modifications i should make in order to my code to work or send information to Salesforce with TLS 1.0 disabled and TLS 1.2 enabled.

This is my code below:

public static string WRequest(string URL, string method, string postData)
{
  string responseData = "";
  HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL);
  request.Accept = "*/*";
  request.AllowAutoRedirect = true;
  request.UserAgent = "http_requester/0.1";
  request.Timeout = 60000;
  request.Method = method;
  if (request.Method == "POST")
  {
   request.ContentType = "application/x-www-form-urlencoded";
   UTF8Encoding encodingutf8 = new UTF8Encoding();
   byte[] postByteArray = encodingutf8.GetBytes(postData);
   request.ContentLength = postByteArray.Length;
   Stream postStream = request.GetRequestStream();
   postStream.Write(postByteArray, 0, postByteArray.Length);
   postStream.Close();
  }
  HttpWebResponse response = (HttpWebResponse)request.GetResponse();
  if (response.StatusCode == HttpStatusCode.OK)
  {
   Stream responseStream = response.GetResponseStream();
   StreamReader myStreamReader = new StreamReader(responseStream);
   responseData = myStreamReader.ReadToEnd();
  }
  response.Close();
  return responseData;
}

I have setup my HTML in razor like following:

  @if (ViewBag.Added != null)
                            {
                                if (ViewBag.Added == false)
                                {                        
                                    <div class="col-lg-2 col-md-3 col-sm-12 col-xs-12" id="wholeBtn">

                                     <a class="btn btn-app btnWatchList" style="min-width:100%;margin:0;height:67px">
                                    <i class="fa fa-save"></i> Add to Watchlist
                                  </a>
                                </div>
                                }
                                else if (ViewBag.Added)
                                {
                                    <div class="col-lg-2 col-md-3 col-sm-12 col-xs-12" id="addedToWatchList" style="padding:10px 0">
                                        <h4 style="text-align:center;margin-top:20px"><i class="fa fa-check" style="color:darkseagreen;font-size:25px"></i> Watching</h4>
                                    </div>
                                }
                            }
                            else
                            {
                                <div class="col-lg-2 col-md-3 col-sm-12 col-xs-12" id="wholeBtn">

                                    <a class="btn btn-app btnWatchList" style="min-width:175px;margin:0;height:67px">
                                        <i class="fa fa-save"></i> Add to Watchlist
                                    </a>
                                </div>
                            }

The onclick button looks like this:

$(".btnSaveWatchlist").on("click", function (event) {
       $.post("/User/SaveWatchList", { comment: $('#TextArea1').val(), rating: $('input[name=rating]:checked').val(), competitor: $('.txtSearch').val() }, $(this).prop('disabled', true))
                             .done(function (data) {
                                 if (data == "AllFieldsRequired") {
                                     ShowErrorMessage("All fields are required!");
                                     return;
                                 }
                                 else {
                                     $('.hideit').hide();
                                     $('.canvas').show();
                                     AnimateGreenCheck();
                                     setTimeout(function () {
                                         var result = $('<div />').append(data).find('#addedToWatchList').html();
                                         $('#wholeBtn').html(result);
                                         var l = document.getElementById('cancelButton');
                                         l.click();
                                     },
                                   3000);

                                     setTimeout(function () {
                                         ResetWatchListField();
                                     },
                                  4500);
                                 }
                             });
});

So initially this button "Add to watchlist" isn't present in DOM. It is loaded into the DOM after an search is performed on website.

Once that is done, onclick event works very fine. When post is done, I hide the button and update the DOM to show user that he added this user to watchlist.

Performing the search now again on different user that wasnt added to watchlist, and the button "Add to watchlist" with class "btnSaveWatchlist" is again loaded into the DOM.

But this time it is completely unresponsive... I checked whether the action in controller gets initiated, it doesn't ... The button seems like it's "Frozen"...

Any ideas what could it be guys?

P.S. All this is done without refreshing the page at all. I don't want to refresh the page at all for end user...

Edit here is the btnSaveWatchList button with the class:

  <button data-remodal-action="cancel" class="remodal-cancel" id="cancelButton">Cancel</button>
    <button class="remodal-confirm btnSaveWatchlist">Save</button>

I'm working on the security part of one of the upcoming websites developed based on ASP mvc. Here the target is like below.

I enter say localhost:12345 I get redirected to localhost:1234/Login, But my requirement is as below.

Every time an user enters localhost:12345, it should create a random number and it should be shown to user as localhost:12345/{hereIsTheRandomAlphaNumericStringGenerated}, for example say user 1 is logged in, he is having the url as localhost:12345/user!Rand123 and there is another user logged in and his URL should be localhost:12345/a12fer43r5. if someone enters this randomly generated URL to their web page, it should give an error. The base underying URL should be the same Login, but the names should be generated randomly. And also, if the user enters localhost:12345/login even in this case, the user should not be permitted.

in my RouteConfig.cs I've the below code available.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace ComplianceBot
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new
                {
                    controller = "Home",
                    action = "Login",
                    id = UrlParameter.Optional
                }
            );
        }
    }
}

Please let me know how can I do this.

I found out that with ASP.NET you are able to build a back-end of the website using C# and it look really cool to me, so I wanted to learn it.

The first thing I came across was that there is ASP.NET, ASP.NET Core, ASP.NET MVC and it all confused me. What should I learn, what are the differences, is the code same, if I learn one can I quickly adopt to another?

I just don't know where to start. And if I create a new ASP.NET Core project I just get a bunch of files that I don't know what to do with them.

And can an ASP.NET website be published on a standalone server that is hosted somewhere?

I'm using multiple html controls sharing same name. I have accessed file name and directories of all files, but finding a way to move them to server. Remember my control is not server side. Is there any possible way to upload file to server using the file directory. I search but they are using asp.net file control to upload files. My html code is here

<input type="file" class="form-control" name="signatures" />

Let suppose my file is C:\abc.jpg and I want to move it to server address like ~/Images/abc.jpg Any solution please.

So i finaly had a nice part of my project done but then i had to try the application on phone which required me to configure IIS express.

Now i have a lovely message box on my screen telling me that ISS express web server won't start.

I have tried everything i could find on stackoverflow but it is still not working. (deleting IIS epxress, changing web server port, checked firewall, used netsh delete and add and more) IIS express isnt working for any of my projects and i get the message.

What could be problem, how can i solve it ?

I have written a following code like below to refresh user roles after they subscribed to my website like following:

  private void RefreshUserRoles()
        {
            var AuthenticationManager = HttpContext.GetOwinContext().Authentication;
            var Identity = new ClaimsIdentity(User.Identity);
            Identity.RemoveClaim(Identity.FindFirst(ClaimTypes.Role));
            Identity.AddClaim(new Claim(ClaimTypes.Role, "Subscriber"));
            AuthenticationManager.AuthenticationResponseGrant = new AuthenticationResponseGrant
            (new ClaimsPrincipal(Identity), new AuthenticationProperties { IsPersistent = true});
        }

Please note this line of code:

AuthenticationManager.AuthenticationResponseGrant = new AuthenticationResponseGrant
                (new ClaimsPrincipal(Identity), new AuthenticationProperties { IsPersistent = true});
            }

After user comes back to my website I set the cookie to be persistent, but I forgot to set the expiration for this cookie. I should set this cookie to last for 30 minutes, after which user should be asked to re-log onto the system.

Since some users never re-log on website, this leaves me with an issue, now I need to reset all users cookies in their browsers when they access the website and change their role if they cancelled the subscription. I noticed some users cancelled their subscription and never relogged but yet they still are able to use features on my website...

So my questions are:

1. How to set expiration of cookie to 30 minutes after which user will be asked to re-log onto the system.

2. How to Setup to re-check users cookies if they haven't expired in a long time so that I can reset their cookies to regular user if they cancelled subscription?

I have a standalone WebAPI Application that returns a token when authenticating against it. When I make calls back to the API and send the token in the header the API is able to retrieve the claims and roles of that token.

However when I consume that API and get the token in a separate MVC Application I only have access to some limited properties like the access_token, token_type, expires_in, etc.

Is it good practice to return custom claims and user roles in that response result? Or should I make an additional call to the API to return the user claims and user roles and update the existing token?

I am building a search page using asp.net mvc. The page would have two text search fields and few search parameters based on checkbox and radio button. How can I maintain the state of checkboxes and radio button once the result comes back ? Some of these checkboxes may be dynamically generated too.

I have a View whose model is a List of custom types and I want to POST changes for only a single element of the List (model[i]). This POST itself works, except the value is what was originally in the model and not the updated value from the input

View's Model Declaration

@model List<Translation2>

Translation2's type (F#)

type Translation2 = {
    Key: string;
    RowKey: string;
    Value: string;
    English: string;
}

The View with a single entity submit

@model List<Translation2>

<form asp-controller="Home" asp-action="Translate" method="POST" >
<table>
    <thead>
        <th>
            <h2>Key</h2>
        </th>
        <th>
            <h2>English</h2>
        </th>
        <th>
            <h2>Translated</h2>
        </th>
    </thead>
    <tbody>
@for(var i = 0; i < Model.Count(); i++)
{
        <tr>
            <div>
                <td class="key-col">
                    <p style="font-size:large">@Model[i].Key</p>
                    @Html.HiddenFor(m => m[i].RowKey)
                </td>
                <td class="val-col">
                    <input class="fill-void" type="text" asp-for="@Model[i].English" readonly />

                </td>
                <td class="val-col">
                    <input class="fill-void" type="text" asp-for="@Model[i].Value" />
                </td>
                <td>
                    <a href="@Url.Action("Translate", "Home", new {RowKey=@Model[i].RowKey, Key=@Model[i].Key, Value=@Model[i].Value })" >Save Translation</a>
                </td>
            </div>
        </tr>
}
    </tbody>
</table>
</form>

I have also tried to just POST the entire list per ASP.NET Core 1.0 POST IEnumerable<T> to controller but will get

ArgumentNullException: Value cannot be null.
 Parameter name: source

Count

MoveNext in Translate.cshtml

@for(var i = 0; i < Model.Count(); i++)

The View with submitting the entire list

@model List<Translation2>

<form asp-controller="Home" asp-action="Translate" method="POST" >
<table>
    <thead>
        <th>
            <h2>Key</h2>
        </th>
        <th>
            <h2>English</h2>
        </th>
        <th>
            <h2>Translated</h2>
        </th>
    </thead>
    <tbody>
@for(var i = 0; i < Model.Count(); i++)
{
        <tr>
            <div>
                <td class="key-col">
                    <p style="font-size:large">@Model[i].Key</p>
                    @Html.HiddenFor(m => m[i].RowKey)
                </td>
                <td class="val-col">
                    <input class="fill-void" type="text" asp-for="@Model[i].English" readonly />

                </td>
                <td class="val-col">
                    <input class="fill-void" type="text" asp-for="@Model[i].Value" />
                </td>
                <td>
                    <button type="submit">Save Translation</button>

                </td>
            </div>
        </tr>
}
    </tbody>
</table>
</form>

I would really like to know how to solve both ways, if possible, but a solution for either will do at this point.

    here is my .aspx code !

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Configuration;
    using System.Data;
    using System.Data.SqlClient;

    public partial class _Default : System.Web.UI.Page
    {
        int id;
        protected void Page_Load(object sender, EventArgs e)
        {
            Label2.Text = " " + Session["username"] + " ";
            string CS = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;
            using (SqlConnection con = new SqlConnection(CS))
            {
                id = Convert.ToInt32(Request.QueryString["Prod_Id"].ToString());
                con.Open();
                SqlCommand cmd = con.CreateCommand();
                cmd.CommandType = CommandType.Text;
                cmd.CommandText = "select * from Product  where Prod_Id="+ id +"";
                cmd.ExecuteNonQuery();
                DataTable dt = new DataTable();
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                da.Fill(dt);
                Repeater1.DataSource = dt;
                Repeater1.DataBind();
                con.Close();

            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            string CS = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;
            using (SqlConnection con = new SqlConnection(CS))
            {
                con.Open();
                SqlCommand cmd = con.CreateCommand();
                cmd.CommandType = CommandType.Text;
                cmd.CommandText = "insert into Order values('" + Label2.Text + "','"+ label3.Text +"')";
                cmd.ExecuteNonQuery();
                con.Close();
            }
        }

    }

here is my.aspx code

<%@ Page Title="" Language="C#" MasterPageFile="~/welcome_mstr.master" AutoEventWireup="true" CodeFile="desc.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">



&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    <b>Welcome</b>



<asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
&nbsp;!<asp:Repeater ID="Repeater1" runat="server" 
        onitemcommand="Repeater1_ItemCommand">
<HeaderTemplate></HeaderTemplate>
    <ItemTemplate>

       <div style=" width:700px; margin-left:200px; background-color:#FCFBE3">

       <br />

       <table>

       <tr><td><img alt="" src='<%# Eval("Image") %>' style=" width:299px; height:299px;" /></td>


        <td valign="top"><table >
        <tr><td align="left"><asp:Label ID="Label3" runat="server" Text='<%#Eval("Prod_Name") %>'></asp:Label></td></tr>


        <tr><td align="left"><asp:Label ID="Label4" runat="server" Text='<%#Eval("Weight") %>'></asp:Label></td></tr>


       <tr><td align="left">Cost: ₹<asp:Label ID="Label1" runat="server" Text='<%#Eval("Price") %>'></asp:Label></td></tr>
       <tr><td>
           <asp:Button ID="Button1" runat="server" Text="Order" /> </td></tr>
       </table>
       </td>
       </tr>

       </table>
       </div>



        </ItemTemplate>
        <FooterTemplate></FooterTemplate>
    </asp:Repeater>

</asp:Content>

I want to use the 'Text' property of a control inside Repeater control and insert that text value into a table through button click. But i am not able to access the control it self. Its showing an error "The name 'label3' does not exist in the current context".How do I do it ? PLEASE HELP !?

I am attempting to deploy a .NET Core app on Ubuntu 16.04. The project contains references to other projects (i.e. not via nuget), locally the app works fine (win10-x64) however on the server when typing dotnet restore I receive the following log:

XXXXXX@ip-172-31-34-212:/home/XXXXXX$ dotnet restore
    log  : Restoring packages for /home/XXXXXX/project.json...
    error: Unable to resolve 'XXXXXX.Configuration (>= 1.0.0)' for '.NETCoreApp,Version=v1.0'.
    error: Unable to resolve 'XXXXXX.DataModels (>= 1.0.0)' for '.NETCoreApp,Version=v1.0'.
    error: Unable to resolve 'XXXXXX.DAL (>= 1.0.0)' for '.NETCoreApp,Version=v1.0'.
    error: Unable to resolve 'XXXXXX.Application (>= 1.0.0-0)' for '.NETCoreApp,Version=v1.0'.
    error: Unable to resolve 'XXXXXX.BLL (>= 1.0.0)' for '.NETCoreApp,Version=v1.0'.
    log  : Lock file has not changed. Skipping lock file write. Path: /home/XXXXXX/project.lock.json
    log  : /home/XXXXXX/project.json
    log  : Restore failed in 4546ms.

log  : Lock file has not changed. Skipping lock file write. Path: 

I have reviewed the advice in the related questions here, here and here however none of the solutions seem to fix my issue.

Given the pace of change to the Core framework I will specify the versions in use and the project.json files for the projects:

XXXXXX.Configuration (.NET Core Class Library) project.json:

{
  "version": "1.0.0-*",

  "dependencies": {
    "NETStandard.Library": "1.6.1"
  },

  "frameworks": {
    "netstandard1.6": {
      "imports": "dnxcore50"
    }
  }
}

XXXXXX.DataModels (.NET Core Class Library) project.json

{
  "version": "1.0.0-*",

  "dependencies": {
    "NETStandard.Library": "1.6.1",
    "XXXXXX.Application": "1.0.0-0"
  },

  "frameworks": {
    "netstandard1.6": {
      "imports": "dnxcore50"
    }
  }
}

XXXXXX.DAL (.NET Core Class Library) project.json

{
  "version": "1.0.0-*",

  "dependencies": {
    "MySql.Data": "7.0.6-IR31",
    "NETStandard.Library": "1.6.1",
    "XXXXXX.Application": "1.0.0-0",
    "XXXXXX.Configuration": "1.0.0-*",
    "XXXXXX.DataModels": "1.0.0-*"
  },

  "frameworks": {
    "netstandard1.6": {
      "imports": "dnxcore50"
    }
  }
}

XXXXXX.Application (.NET Core Class Library) poject.json

{
  "version": "1.0.0-0",

  "dependencies": {
    "Microsoft.AspNetCore.Mvc.Abstractions": "1.1.0",
    "Microsoft.AspNetCore.Mvc.Core": "1.1.0",
    "Microsoft.AspNetCore.Mvc.DataAnnotations": "1.1.0",
    "Microsoft.AspNetCore.Mvc.ViewFeatures": "1.1.0",
    "MySql.Data": "7.0.6-IR31",
    "NETStandard.Library": "1.6.1",
    "System.Data.SqlClient": "4.3.0"
  },

  "frameworks": {
    "netstandard1.6": {
      "imports": "dnxcore50"
    }
  }
}

XXXXXX.BLL (.NET Core Class Library) project.json

{
  "version": "1.0.0-*",

  "dependencies": {
    "Microsoft.Extensions.Configuration.Binder": "1.1.0",
    "NETStandard.Library": "1.6.1",
    "XXXXXX.Application": "1.0.0-*",
    "XXXXXX.Configuration": "1.0.0-*",
    "XXXXXX.DAL": "1.0.0-*",
    "XXXXXX.DataModels": "1.0.0-*"
  },

  "frameworks": {
    "netstandard1.6": {
      "imports": "dnxcore50"
    }
  }
}

And finally, the .NET Core Web UI proejct which ties it all together:

XXXXXX.WebUI project.json

{
  "dependencies": {
    "BundlerMinifier.Core": "2.3.327",
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final",
    "Microsoft.AspNetCore.Mvc": "1.1.1",
    "Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final",
    "Microsoft.AspNetCore.Routing": "1.1.0",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
    "Microsoft.AspNetCore.StaticFiles": "1.1.0",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0",
    "Microsoft.Extensions.Configuration.Json": "1.1.0",
    "Microsoft.NETCore.App": {
      "version": "1.1.0",
      "type": "platform"
    },
    "Microsoft.AspNetCore.Session": "1.1.0",
    "PaulMiami.AspNetCore.Mvc.Recaptcha": "1.1.1",
    "Microsoft.AspNetCore.Mvc.Abstractions": "1.1.1",
    "Microsoft.Extensions.Options": "1.1.0",
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0",
    "XXXXXX.DataModels":  {
        "version":"1.0.0-*",
        "target": "project"
    },
    "XXXXXX.Application": {
        "version": "1.0.0-0",
        "target": "project"
    },
    "XXXXXX.Configuration": {
      "version": "1.0.0-*",
      "target": "project"
    },
    "XXXXXX.DAL": {
        "version": "1.0.0-*",
        "target": "project"
    },
    "XXXXXX.BLL": {
         "version": "1.0.0-*",
         "target": "project"
    }
  },

  "tools": {
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "dotnet5.6",
        "portable-net45+win8"
      ]
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true,
    "copyToOutput": [ "web.development.environment.json" ]
  },

  "runtimeOptions": {
    "configProperties": {
      "System.GC.Server": true
    }
  },

  "runtimes": {
    "win10-x64": {},
    "ubuntu.16.04-x64":  {}
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "**/*.cshtml",
      "appsettings.json",
      "web.config",
      "global.json",
      "project.json",
      "web.development.environment.json"
    ]
  },

  "scripts": {
    "prepublish": [ "bower install", "dotnet bundle" ],
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }
}

I also have a global.json which when published resides in the root folder (one level above the projects)

{
  "projects": [ 
    "src", 
    "/home/XXXXXX/XXXXXX.Application.dll", 
    "/home/XXXXXX/XXXXXX.Configuration.dll", 
    "/home/XXXXXX/XXXXXX.DataModels.dll", 
    "/home/XXXXXX/XXXXXX.Common.dll",
    "/home/XXXXXX/XXXXXX.BLL.dll", 
    "/home/XXXXXX/XXXXXX.DAL.dll", 
    "/home/XXXXXX/XXXXXX.Notifications.Client.dll", 
    "/home/XXXXXX/XXXXXX.Notifications.DataModels.dll",
    "/home/XXXXXX/XXXXXX.WebUI.dll"
  ]
}

Help!