fixed it. The ASPNETCORE_ENVIRONMENT was set in azure to "Production", which is good. But then i looked at my appsettings.production.json and there seemed to be a } missing...
So make sure the appsettings structure is always correct ;)
its an Azure webapps, so not sure where exactly i should find the IIS logs there. I turned on Diagnostic Logs on the webapp, but the only thing I get when i try to load the API is this:
IIS received the request; however, an internal error occurred during the processing of the request. The root cause of this error depends on which module handles the request and what was happening in the worker process when this error occurred.</li> <li>IIS was not able to access the web.config file for the Web site or application. This can occur if the NTFS permissions are set incorrectly.</li> <li>IIS was not able to process configuration for the Web site or application.</li> <li>The authenticated user does not have permission to use this DLL.</li> <li>The request is mapped to a managed handler but the .NET Extensibility Feature is not installed.</li> </ul>
its an error after upgrading to the new aspnetzero version.
in Startup.cs I had:
options.SwaggerEndpoint(_appConfiguration["App:SwaggerEndPoint"], "xxxx API V1");
options.IndexStream = () => Assembly.GetExecutingAssembly()
.GetManifestResourceStream("xxxx.xxxx.Web.wwwroot.swagger.ui.index.html");
options.InjectBaseUrl(_appConfiguration["App:ServerRootAddress"]);
but it should be
options.SwaggerEndpoint("/swagger/v1/swagger.json", "xxxx API V1");
options.IndexStream = () => Assembly.GetExecutingAssembly()
.GetManifestResourceStream("xxxx.xxxx.Web.wwwroot.swagger.ui.index.html");
how do you get the CreatorUser in a DTO?
like i have a list of articles that I want to display, with the name of the creator next to each article.
I have an ArticleDto that is used from the applicationservice:
Article = ObjectMapper.Map<ArticleDto>(o)
it used to be easy (maybe it still is) by adding a common CreatorUserDto to the ArticleDto and the CreatorUserDto looked like this:
[AutoMapFrom(typeof(User))]
public class CreatorUserDto
{
public virtual string UserName { get; set; }
}
}
but i guess there is a new way of doing this?
anyone?
or is it easier, to connect the new aspnetzero version to the old database? all the necessary migrations for abp stuff is in the "migrations" list in code, but can the old database handle those? i dont want to destroy the old db of course
@ismcagdas, no my bad, i forgot that the app is using appsettings.production.json, which wasnt up to date with my information.
Just wondering, in Startup.cs you have this:
public Startup(IHostingEnvironment env)
{
_hostingEnvironment = env;
_appConfiguration = env.GetAppConfiguration();
}
where does "env" come from? can i change this?
if I try to go to "http://webhosturl/AbpUserConfiguration/GetAll" it gives Internal server error.
when i do this locally, it works without a problem... web.config is available and cors config is good too, what else could be the problem??
hmmm, it works when i run the Host and Angular app locally, using localhost urls in appconfig.
but why is it not working using FQDN on azure? It used to work in previous version... I must be missing something here.
Now I created a new DB on Azure and used the Migrator tool to generate the tables and admin user. This works good.
But I'm still stuck on the "Internal server error" when trying to run the Angular app. it fails on "AbpUserConfiguration/GetAll" When querying the auditlogs through visual studio, this error is not in there, so maybe it cant even connect to the api.