Replies: 8 comments
-
The Are you trying to build an API and Website in one? I wouldn't recomend that as it's difficult to separate the two e.g.
|
Beta Was this translation helpful? Give feedback.
-
Yes we have a mixed MVC and WebAPI project. Do we need to host two separate apps if we separate them? Do you know if mixed MVC and WebAPI scenario works any better in ASP.NET Core? |
Beta Was this translation helpful? Give feedback.
-
I asked this very question on StackOverflow 'Using Web API inside a ASP.NET 5 MVC 6 Application'. I tried a few ways and it is not that easy to separate. I already mentioned two of the problems above a few other problems might be:
One way I did not try that RC2 makes possible is including two Startup classes and starting both in one project. From a hosting perspective, I can see why you would want to go this way as it halves the costs. |
Beta Was this translation helpful? Give feedback.
-
There is a basic API project template that has not been released yet in the Boilerplate solution. It is still based on Beta 8. Need to update it and get it released. The intention is to implement Swagger by default. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your hints @RehanSaeed. I also asked my host, AppHarbor, about this and it looks like the way some URLs are resolved in the MVC Boilerplate does not play well with their nginx load balancer. The load balancer is listening on port 80 and 443, but backend workers are using different ports than that. So when generating URLs in the app we should change them back to public ports 80 or 443 depending on the current HTTP Schema. The code in the boilerplate that is generating URL might be in the boilerplate's nuget package and I'm not sure where this is happening. I'll update here if I could figure it out. |
Beta Was this translation helpful? Give feedback.
-
I think issue #69 is related I had to disable call to |
Beta Was this translation helpful? Give feedback.
-
I followed up with AppHarbor and they pointed me to this OWIN middleware that can be used to rewrite the request context at an earlier stage than the filter configuration is executed. Also they said it would be great if MVC Boilerplate could support the |
Beta Was this translation helpful? Give feedback.
-
Redirecting from HTTP to HTTPS does not work in RC1 when you do not use the default port 80 to 443. This is a problem with Microsoft's code. RC 2 added a way to redirect to HTTPS with a custom port that you can specify. Is this the problem you are having? I'm a bit unclear about what I need to do to get this issue cleared. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I use MVC Boilerplate and it works fine when running the app locally. However, when the app is hosted, I get the following error message:
We have a valid SSL and when the location is HTTPS, the JS code makes a JQuery.ajax call with url set to
/api/summary?id=...
. It looks like there is a server error and the MVC boilerplate is trying to redirect to the error page but with the wrong schema. The Mixed Content error seems to be produced in the browser. Do you have any idea why this is happening? I have to try to debug why it's failing on the server but the same web api added to a regular MVC template does not produce the error. I also tried to disable all boilerplate security filters to no avail. Thanks!Beta Was this translation helpful? Give feedback.
All reactions