Published Aurelia Application Virtual Directory 404 Error - asp.net-core

I have a .NETCORE application being an Aurelia Framework app. I also have a .NETCORE Web API. To publish these to the server I use the CMD .net publish --framework netcoreapp1.0.
I host this site on the Default Web Site which is pointing to the Aurelia app. Inside of this site I have another application being the web api. The site and API run great. I recently tried to create a Virtual Directory to server my images. Any time I try to navigate to //mywebserver/images I get nothing but 404 errors. I can play with the permissions and have it give me a 401.2 unauthorized, but any other time I just get a 404 error.
I can create a dummy website pointing to the IIS wwwroot folder, create a virtual directory and it works like it should, so I would think it has something to do with these published apps.

For anyone who stumbles across this question. Shortly after posting I came across some information on a site. http://www.jauernig-it.de/asp-net-coreiis-serving-content-from-a-file-share/
Matthias discusses that with .netcore Virtual Directories are basically dead and you should start using app.UseFileServer in your startup.cs file.
Thank you

I seems that the '404' Http return code is the default error code in published .netCore apps (I had this return with a sql server connection problem).
I think it is not related to Aurelia. use app.UseFileServer to handle your images.

Related

Visual Studio Code only offers Weather Forecast proxy

I am not able to run any other controller in the default React app for .NET Core 6.0. Has anyone figured this out? I believe I saw a quick message on the terminal about the weatherforecast route being in the SPA proxy.
Whenever I try to go to any other route for a controller it redirects to the fallback page. I have routing setup with default settings. Just seems an odd behavior.
It's obviously a proxy issue because if I run the controller from the IIS port 7132 instead of the 44402 (spa server), I am able to retrieve the json response. There's quite a long readme file in here I can plod through but maybe someone has a better solution.
Update: I found the solution, well there were several, from setting CORS policies on the server side, etc. The easiest way was to do it "pre-flight". I found a handy file called setupProxy.js (who knew lol), where I was able to set an array of end points to proxy. And this had the /weatherforecast endpoint already specified. So now it all works! I guess I answered my own question.
const context = [
"/weatherforecast","/account"
];

IIS return 404 error but the files are exist

I have a website that implemented with .net core 2.1 and angular js.
I published this website on windows server that worked with IIS.
The problem is that, sometimes response of http requests for some files or request (the ajax request that called) is 404 error and sometimes it works correctly and I am sure that file is exists because if the user that faced with error, refresh the page, it will load correctly !
I attached a photos that compare same requests.
After many days I have this problem yet. I enabled IIS logs and attach one of xml log file here.

Unable to access direct routes in vuejs

I just have deployed a VUEJS project to my Cpanel and have configured it with a subdomain as
https://web-dev.mydomain.xyz
it is working fine when I try to access through the exact domain name like
https://web-dev.mydomain.xyz
But when I try to directly access some routes like
https://web-dev.mydomain.xyz/posts?page_1
Then its returns page not found an error. So that I cannot share a specific page with anyone.
What I am doing wrong?
if the issue is at the VUEJS side or this is due to some misconfiguration of the project at the deployment server?
thanks in advance
This is a common issue. Your server needs to be configured to serve the application at that route.
Please read HTML5 History Mode documentation for more information.

Sitefinity 4.4 and Extensionless URLS: Is the sf404.aspx error mapping still required

Does anyone know if you still need the sf404.aspx mapping for Sitefinity 4.4?
I'm trying to run a new test SF 4.4 project, but when I try and login the page just gives me the following:
HTTP 404 cannot find /sf404.aspx (this was mapped like that for Sitefinity 3.7)
I then changed the IIS 404 configuration from sf404 to default and now I just get HTTP/1.1 404 Object Not Found.
The project works through Cassini, but not through IIS 6.
Any ideas?
Regards,
Jacques
the sf404.aspx page is definitely only used for Sitefinity 3.x and should not be mapped in a Sitefinty 4 website.
If you are attempting to run a newer version of Sitefinity on IIS6, you need to make sure to use a wildcard mapping so that all requests go through the ASP.NET engine.
This page details everything you need to setup to run Sitefinity on IIS6: http://www.sitefinity.com/documentation/documentationarticles/installation-and-administration-guide/install-sitefinity/configuring-the-iis-to-host-sitefinity-projects
You might also find this blog post helpful: http://www.sitefinity.com/blogs/joshmorales/posts/11-02-23/installing_sitefinity_4_on_iis_6.aspx

Accessing OData service gives 404 "Resource not found error"

This could be a entirely hosting service related problem but I'll post it here in case it is a more common problem.
I'm running a OData service on my ASP.NET MVC 2 site which works fine on my laptop IIS but when I deploy it to my site at Winhost I get 404 Resource not found error when trying to access the .svc-file.
Earlier I had 2 different authentications on so I got the "System.InvalidOperationException: IIS specified authentication schemes 'Basic, Anonymous'...." error so I know that at that point the handler was trying to start the service.
After fixing that, I got the "Resource not found error".
The service is in /Services folder but it does not seem to matter. No matter where I put it it always gives me the 404 error. All the binaries from my local sites bin folder are in my remote sites bin folder.
Everything else on the site seems to be working fine.
If anyone has a solution to this, help would be much appreciated.
Finally got this figured out. Since my site is an ASP.NET MVC 2 site I need to ignore the route to the service. Otherwise ASP.NET will start looking for a controller for that URI.
So I added routes.IgnoreRoute("Services/ServiceFilename.svc/{*pathInfo}"); to my global.asax.cs and voilá problem solved.
Although I don't quite understand why the service works on my laptops IIS 7 without the ignored route.