1
Answer

Deployment of Asp.net core and angular 2 projects into IIS.

Photo of Lokesh Rajana

Lokesh Rajana

7y
215
1
Hi,
 
I am developing one application which is having Asp.net core and Angular 2 two different projects. asp.net core project is for creating web APIs and Angular solution is for consuming webapis. now my doubt is how to deploy both the projects uin IIS.
 
What i have traied:
 
I deployed asp.net core solution into IIS and that is working fine and i used that IIS URL in anguar project so that i am able to consume web APIs. after taht i generated dist folder by building angular2 solution. now my doubt is how can i use taht dist folder into asp.net core published folder?
 
Thanks in advance.
 
 
 

Answers (1)

1
Photo of Naresh Joshi
NA 631 252.6k 11y
As referring to your "Select" function it doesn't have any return type that the reason you are getting above error. So to resolve this issue you need to fill the data in Dataset and return the same Dataset  and use it as datasource for your reports.

I have made slight change in the your "Select" function to return dataset :-

public DataSet Select()
{
#region fields
string sqlQuery;
DataSet oDataset = new DataSet();


#endregion


#region SQL Queries
sqlQuery = "SELECT NoNota, Nama, Tanggal, Tipe, Keterangan FROM master";
#endregion


#region execute
if (this.OpenConnection() == true)
{
MySqlCommand cmd = new MySqlCommand(sqlQuery, connect);
MySqlDataAdapter myDataAdapter = new MySqlDataAdapter();
myDataAdapter.SelectCommand = mySqlCommand;
myDataAdapter.Fill(oDataset);
myDataAdapter.Dispose(); 
CloseConnection();
return oDataset 
}
#endregion


}
Accepted