Base solution for your next web application

Activities of "rickwheeler"

Hi, I'm new to Abp and also having this connection issue. I'm using VS2015 and SQL Express as per the standard installation. My connection string is:

<add name="Default" connectionString="Server=(localdb)MSSQLLocalDB; Database=FreightHub; Trusted_Connection=True;" providerName="System.Data.SqlClient" />

I can connect to database server in SQL Server Object Explorer and also in SQL 2014 Management Studio. However the Package Manager console always fails with the following error:

Target database is: 'FreightHub' (DataSource: (localdb)MSSQLLocalDB, Provider: System.Data.SqlClient, Origin: Configuration).
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): The network path was not found

Please help!

Hi, I'm new to Abp and have downloaded the template including module zero. I've compiled ok, set the startup project to .Web and the default project to EF as per the doco. My connection string is:

<add name="Default" connectionString="Server=(localdb)MSSQLLocalDB; Database=FreightHub; Trusted_Connection=True;" providerName="System.Data.SqlClient" />

However the Package Manager console always fails with the following error:

Target database is: 'FreightHub' (DataSource: (localdb)MSSQLLocalDB, Provider: System.Data.SqlClient, Origin: Configuration).
System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) ---> System.ComponentModel.Win32Exception (0x80004005): The network path was not found

I can connect to the database server in both SQL Server Object Explorer and SQL 2014 Management Studio. It seems to be just limited to this project (works ok in other projects)

Please help! Rick.

Hi, I have found a workaround to this issue by changing the Web.config connection entry to:

&lt;add name=&quot;Default&quot; connectionString=&quot;Server=(localdb)\ProjectsV13; Database=FreightHub; Trusted_Connection=True;&quot; providerName=&quot;System.Data.SqlClient&quot; /&gt;

This works for now but is version specific and I'd still like to figure out why (localdb)MSSQLLocalDB is not working. Any suggestion would be appreciated. Rick.

Hi, I've just recently discovered ASP.NET Boilerplate and super excited about the potential. I'm also looking some additional features you described, including the following:

  1. ASPnetzero framework - <a class="postlink" href="http://www.aspnetzero.com/">http://www.aspnetzero.com/</a> a) Self Registration of organisation – Multi tenant, multi page. b) User Management by Admin users c) General Admin and payment etc.
  2. Metronic - <a class="postlink" href="http://www.keenthemes.com/preview/metro">http://www.keenthemes.com/preview/metro</a> ... ard_3.html
  3. SignalR - <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/">http://www.aspnetboilerplate.com/Pages/</a> ... ntegration
  4. Payment gateway to create invoices, and manage recurring payments eg Paypal.

The mapping stuff is of interest too but not an immediate requirement. We're looking at Stripe for the payment gateway or maybe something like Chargify - still not decided. If you're interested in potentially developing something together and sharing the costs then please reply to discuss further. Rick.

In case anyone is in need of help on this, I solved my connection issue by changing my server name to "(localdb)\ProjectsV13":

&lt;add name=&quot;Default&quot; connectionString=&quot;Server=(localdb)\ProjectsV13; Database=FreightHub; Trusted_Connection=True;&quot; providerName=&quot;System.Data.SqlClient&quot; /&gt;

It's not ideal since VS2015 introduced non-versioned database connections, but helped me get started with the framework until I find the cause of the issue.

Hi,

I've noticed that the database generated by ASP.NET Zero is severely lacking in any real referential integrity. There are no foreign keys on many of the tables which use a TenantId or a UserId.

Can you please explain why this is and if you have any plans to fix it? When a relational database has no relations it is a little concerning.

Thanks, Sean

Can you please provide an example of how to do this for organization unit?

Question

Hi,

What is required for an AbpSession to be populated on a controller?

I am creating a custom REST API that uses an API Key to authenticate users and I want my API controller to inherit from AbpApiController. So I need to know what to set in the pipeline in order for AbpSession to be populated on the ApiController. Does it use Thread.CurrentPrincipal?

Regards, Sean

I noticed that in all the grids of the interface, the date format and time was displaying incorrectly.

Problem 1: Date format was incorrect Since I'm in australia, our date format is dd/MM/yyyy.

In all of the ABP Zero grids, the date was showing as MM/dd/yyyy which is wrong.

The grid options displayed as follows

{
    name: app.localize('AnImportantDate'),
    field: 'anImportantDate',
    cellFilter: 'momentFormat: \'L LT\'' // Moment.js Local string format. Formats to local locale settings
}

This should mean that the items in the grid would display in the locale set in moment js.

Problem 2: Time was incorrect. Since my time zone is UTC+10, I saved an item at 9am 05/05/2016 and it was displaying in the grid as 04/05/2016 (One day earlier). This is because the UTC time passed by AppService is not being converted to local time in the GUI.

To Fix: XYZ.Web/App/Common/Filters/momentjs-filters.js

// need load the moment.js to use these filters. 

(function () {

    appModule.filter('momentFormat', function () {
        return function (date, formatStr) {
            if (!date) {
                return '-';
            }
            
             moment.locale(window.navigator.userLanguage || window.navigator.language); // Fixes problem 1
             return moment(date).local().format(formatStr); // Fixes problem 2
        };
    })
    .filter('fromNow', function () {
        return function (date) {
            return moment(date).fromNow();
        };
    });

})();

The seed method is creating duplicate records in AbpFeatures table. The issue is even worse if update-database has been run more than once

Issue:

Id	Name	Value	CreationTime	CreatorUserId	EditionId	TenantId	Discriminator
1	App.ChatFeature	True	2016-09-05 15:27:34.967	NULL	1	NULL	EditionFeatureSetting
2	App.ChatFeature	True	2016-09-05 15:27:34.967	NULL	1	NULL	EditionFeatureSetting
3	App.ChatFeature	True	2016-09-05 15:27:34.970	NULL	1	NULL	EditionFeatureSetting
4	App.ChatFeature	True	2016-09-05 15:27:34.970	NULL	1	NULL	EditionFeatureSetting
5	App.ChatFeature	True	2016-09-05 15:35:37.130	NULL	1	NULL	EditionFeatureSetting
6	App.ChatFeature	True	2016-09-05 15:35:37.130	NULL	1	NULL	EditionFeatureSetting
7	App.ChatFeature	True	2016-09-05 15:35:46.173	NULL	1	NULL	EditionFeatureSetting
8	App.ChatFeature	True	2016-09-05 15:35:46.173	NULL	1	NULL	EditionFeatureSetting

Fix: In ABPZero.EntityFramework/Migrations/Seed/Host/DefaultEditionCreator.cs

Replace

_context.EditionFeatureSettings.Add(new EditionFeatureSetting
     {
         Name = AppFeatures.ChatFeature,

With

_context.EditionFeatureSettings.Add(new EditionFeatureSetting
     {
         Name = featureName,
Showing 1 to 10 of 24 entries