Base solution for your next web application

Activities of "btg"

Answer

New Problem ... CORS is blocked despite the following settings.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://myurl:22742/AbpUserConfiguration/GetAll. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Angular appconfig.json

{
  "remoteServiceBaseUrl": "http://myurl:22742",
  "appBaseUrl": "http://myurl:4200"
}

Web.Host Project

"App": {
    "ServerRootAddress": "http://myurl:22742",
    "ClientRootAddress": "http://myurl:4200",
    "CorsOrigins": "http://myurl:4200,http://myurl,http://localhost:49152,http://localhost:8182"
  },

Any ideas? I've been playing all day with this and I can't get it to work.

Answer

It is an IIS issue ... solved by directly running the EXE. I will work through it. Thanks.

Answer

.NET CORE 2.0 Hosting is installed, IIS Application Pool is unmanaged code, ports are bound to 80 and 22472. I will play around with the environment more, but I don't think this is the issue.

Are there any issues with running x86 vs x64?

Answer

It also happens on default IPs, like 22742 for Swagger.

Question

Hey,

I am trying to publish on and serve the Backend WebAPI portion on IIS 10.0. When I do so, I get:

An error occurred while starting the application.

.NET Framework X86 v4.0.30319.42000    |   Microsoft.AspNetCore.Hosting version 1.1.1    |    Microsoft Windows 10.0.14393

Looking at IIS logs, I see error 500 but no other details.

2017-10-31 17:39:15 127.0.0.1 GET / - 80 - 127.0.0.1 Mozilla/5.0+(Windows+NT+10.0;+WOW64;+rv:56.0)+Gecko/20100101+Firefox/56.0 - 500 0 0 3952

Any ideas?

Closer, but the button doesn't work and I get the following error. Am I passing a parameter incorrectly, or not doing something right with the Dto?

core.es5.js:1084 ERROR TypeError: Cannot read property 'open' of undefined

.

This is what I have now:

ngOnInit(): void {
        this.getLake();

        var dataSource = this.loadData(dataSource);
        this.loadView(dataSource);

       
    

 getLake(): void {
        this._dataService.getLake(this.filter).subscribe((result) => {
            this.Lake = result.items;
        });
    }

    loadData(data: DataListDto): string {
        var dataid = "foo";
        var data = dataid.toString();
        var dataext = ".jpg";
        var url = "http://localhost:4000/;

        var dataSource = url.concat(data, dataext);
    
        return dataSource;
    }

    loaddataModal(data: DataListDto) {
        var dataSource = this.loadData(dataSource);
        var url = this.loadData(url);
        var data = this.loadData(data);
        var dataext = this.loadData(dataext);
        var view = this.loadView(view);

        this.message.confirm(
            this.l('ReadyToView', "data.name"),
            isConfirmed => {
                if (isConfirmed) {
                    this.notify.info(this.l('SuccessfullyLoaded'));
                    dataSource = url.concat(data, dataext);
                    view.open(dataSource)
                }
            }
        );
    }

    loadViewer(dataSource: string): void {

        var view = new Viewer({
            ...
        });
       
        });
    }

Hello,

I am trying to get a a button click event, similar to the code in the Angular 2 Phonebook Example to work. I have adapted code from the phonebook.component.ts and phonebook.component.html files. I am trying to call dataSource from one function to the other, but I don't know how to do it since they are both local variables. Does anyone have any ideas on how to deal with this?

Thanks for your help!

phonebook.component.ts

ngOnInit(): void {
        this.getData();


        this.loadDataView();

    }

 loadData(data: DataListDto): string {
        var dataid = data.id;
        var slid = dataid.toString() + ".jpg";
        var url = "http://localhost:4000/";

        var dataSource = url.concat(slid)

        this.message.confirm(
            this.l('ReadyToView', data.name),
            isConfirmed => {
                if (isConfirmed) {
                    this.notify.info(this.l('SuccessfullyLoaded'));
                   dataSource = url.concat(slid);
                }
            }
        );
        return dataSource;
    }
loadDataView(): void {
view.open(dataSource)
}

phonebook.component.html

<span class="slide-buttons">
                      <button (click)="loadSlide(slide)" title="{{l('View')}}" class="btn btn-circle btn-icon-only blue" href="javascript:;">
                        <i class="icon-plus"></i>
                      </button>
                    </span>

Thank you. I had forgotten to add public to it. :roll:

Hello,

I have worked through the documents on the ready-made PhoneBook app, but am having an issue.

I may have missed something, but I get the error:

Inconsistent accessibility: parameter type 'GetPeopleInput is less accessible than method 'IPeopleAppService.GetPeople(GetPeopleInput)
Inconsistent accessibility: parameter type 'GetPeopleInput is less accessible than method 'PeopleAppService.GetPeople(GetPeopleInput)

No other errors seem to appear. Any ideas?

THanks

I am trying to retrieve information from a JSON file and display it as elements on a dashboard. Do I need to add an entry in

/app/shared/service-proxies/service-proxies.ts

for a new Injectable service, then add it to the component.ts that will display it in the component.html file? Is there a better way to do this?

Showing 1 to 10 of 18 entries