Hello Developers ,
I am using asp.net boilerplate + angular 2. I am able to access localhost from chrome, firefox and Internet Edge. However, i am getting error when i am accessing localhost from Internet Explorer version 11.1066.14393.0.
I am getting following error in console:
SCRIPT5007: Unable to get property 'apply' of undefined or null reference
vendor.bundle.js (58145,5)
Does anyone knows, how to solve this issue?
Regards, Swapnil Pathak
Hi all,
We are using ABP template(ASP.NET core 1x + Angular 2). We want to implement cross domain angular 2 application. We have two servers as localhost:4200 (default web server from ABP + Angular 2) and web server (test.de) with multipage. We want to include localhost:4200(SPA) into multipage website(test.de). We have already configurated CORS and it is working totally fine.
We have set the appPath variable as follows: var abp.appPath = "http://localhost:4200/";
Our problem is that all the files are under localhost:4200 (such as chuck.js) and the ABP template use the URL test.de to get this file. we are getting the following errors:
GET <a class="postlink" href="http://test.de:4200/sockjs-node/info?t=1491985652513">http://test.de:4200/sockjs-node/info?t=1491985652513</a> net::ERR_CONNECTION_REFUSED
GET <a class="postlink" href="http://test.de/0.chunk.js">http://test.de/0.chunk.js</a> error_handler.js:54 EXCEPTION: Uncaught (in promise): Error: Loading chunk 0 failed. Error: Loading chunk 0 failed. at HTMLScriptElement.onScriptComplete (<a class="postlink" href="http://localhost:4200/inline.bundle.js:92:33">http://localhost:4200/inline.bundle.js:92:33</a>) [angular] at HTMLScriptElement.wrapFn (<a class="postlink" href="http://localhost:4200/polyfills.bundle.js:1549:29">http://localhost:4200/polyfills.bundle.js:1549:29</a>) [angular] at Object.onInvokeTask (<a class="postlink" href="http://localhost:4200/vendor.bundle.js:36794:37">http://localhost:4200/vendor.bundle.js:36794:37</a>) [angular] at ZoneDelegate.webpackJsonp.1222.ZoneDelegate.invokeTask (<a class="postlink" href="http://localhost:4200/polyfills.bundle.js:673:36">http://localhost:4200/polyfills.bundle.js:673:36</a>) [angular] at Zone.webpackJsonp.1222.Zone.runTask (<a class="postlink" href="http://localhost:4200/polyfills.bundle.js:473:47">http://localhost:4200/polyfills.bundle.js:473:47</a>) [<root> => angular] at HTMLScriptElement.ZoneTask.invoke (<a class="postlink" href="http://localhost:4200/polyfills.bundle.js:727:38">http://localhost:4200/polyfills.bundle.js:727:38</a>) [<root>]
If you have any idea how to solve this error. In case of more info, I will be happy to provide it. Best Regards,
Hi,
We are using ABP template (ASP.NET core 1.x + angular 2) and we are trying to set the configuration CORS values (access-control-allow-headers value to "*") for node.js server (frontend Angular 2) which is starting the web server with url [http://localhost:4200]). As, we want to access this url from other host, however getting the error.
It is quiet straight forward for configure CORS for angular2 UI in ABP template inside StartUp.cs file. Below is the code from startup.cs.
//Configure CORS for angular2 UI
services.AddCors(options =>
{
options.AddPolicy(DefaultCorsPolicyName, p =>
{
//todo: Get from confiuration
p.WithOrigins("http://localhost:4200").AllowAnyHeader().AllowAnyMethod();
});
});
However, we are unable to find node server.js file inside the ABP where we can set the access-control-allow-headers. CORS for Express Js example: [https://enable-cors.org/server_expressjs.html])
Or is there any other way of doing it in ABP?
Please check the error snapshot as attachment. [attachment=1:5ytxigwx]error.PNG[/attachment:5ytxigwx] [attachment=0:5ytxigwx]header.PNG[/attachment:5ytxigwx]
Hi All,
We are developing one application using ABP template (ASP.NET core 1.x + angular 2) and wanted to connect to two databases (MSSQL and Firebird). We are able to connect to MSSQL database, however facing problem while connecting to firebird database.
Before we where using ABP template (ASP:NET MVC + AngularJS) and it was working totally fine with these two databases (MSSQL and firebird) and the configuration is set into App.config file.
We try to put the connection string as below into appsettings.json, however it is not working.
"ConnectionStrings": {
"Default": "Server=.; Database=PDVOnlineMaklerNg2Db; Trusted_Connection=True;",
"AmsDefault": "metadata=res://*/AmsDbContext.csdl|res://*/AmsDbContext.ssdl|res://*/AmsDbContext.msl;provider=FirebirdSql.Data.FirebirdClient;provider connection string="data source=pdv-zto-01;initial catalog=D:\\Assfinet\\MVP\\ibdac\\ams64demo.fdb;user id=sysdba;password=masterkey""
},
Now, we have no idea how to write App.config configuraton setting into appsettings.json file.
Below are the configuration files for our ABP template (ASP.NET core 1.x + angular 2)
<ins>App.config</ins>
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<appSettings>
<add key="owin:AutomaticAppStartup" value="false"/>
</appSettings>
<connectionStrings>
<add name="Default" connectionString="Server=.;Database=PDVOnlineMakler;Integrated Security=True;" providerName="System.Data.SqlClient" />
<add name="AmsDefault" connectionString="metadata=res://*/AmsDbContext.csdl|res://*/AmsDbContext.ssdl|res://*/AmsDbContext.msl;provider=FirebirdSql.Data.FirebirdClient;provider connection string="data source=pdv-zto-01;initial catalog=D:\Assfinet\MVP\ibdac\ams64demo.fdb;user id=sysdba;password=masterkey"" providerName="System.Data.EntityClient" />
</connectionStrings>
<runtime>
<gcServer enabled="true"/>
</runtime>
<entityFramework>
<defaultConnectionFactory type="FirebirdSql.Data.EntityFramework6.FbConnectionFactory, EntityFramework.Firebird" />
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="FirebirdSql.Data.FirebirdClient" type="FirebirdSql.Data.EntityFramework6.FbProviderServices, EntityFramework.Firebird" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="FirebirdSql.Data.FirebirdClient" />
<add name="FirebirdClient Data Provider" invariant="FirebirdSql.Data.FirebirdClient" description=".NET Framework Data Provider for Firebird" type="FirebirdSql.Data.FirebirdClient.FirebirdClientFactory, FirebirdSql.Data.FirebirdClient" />
</DbProviderFactories>
</system.data>
</configuration>
<ins>appsettings.json</ins>
{
"ConnectionStrings": {
"Default": "Server=.; Database=PDVOnlineMaklerNg2Db; Trusted_Connection=True;"
},
"Authentication": {
"Facebook": {
"IsEnabled": "false",
"AppId": "",
"AppSecret": ""
},
"Google": {
"IsEnabled": "false",
"ClientId": "",
"ClientSecret": ""
},
"JwtBearer": {
"IsEnabled": "true",
"SecurityKey": "PDVOnlineMaklerNg2_C421AAEE0D114E9C",
"Issuer": "PDVOnlineMaklerNg2",
"Audience": "PDVOnlineMaklerNg2"
}
}
}
Hello Developers,
We are using asp.net boilerplate (ASP.NET Core 1.x with Angular 2(SPA) project), which one is release recently.
Problem we are facing:
So, can you please share some document or link for creating the new service inside asp.net boilerplate framework for angular 2? We are stuck here from last 2 days and unable to solve this problem.
Note: I am sure that service-proxies.ts file is created and updated by asp.net boilerplate.
Best Regards, Swapnil Pathak