Got 404 error when rewrite URL using UrlRewritingNet in IIS 7 - iis

I using UrlRewritingNet dll from http://www.urlrewriting.net/ But I got the 404.0 not found error:
Module IIS Web Core
Notification MapRequestHandler
Handler StaticFile
Error Code 0x80070002
Here is Handle mapping of StaticFile handler
http://imageshack.us/a/img163/5455/31274006.png
I've configured the same code, web.config with IIS 6 (uncheck Check for file exists) and it works.
I've tried many ways I get from another posts but it didn't work.
Any tip about this case?
//Since I'm *nix admin so maybe I lack some important points to make a proper question, sorry about that, if you need any info please let me know.
TIA.

Related

Broadleaf - running locally - problem getting started the API project

I'm trying to run Heat Clinic 6.0.1 locally following getting started tutorial: https://www.broadleafcommerce.com/docs/core/current/getting-started/running-locally
I managed to run admin and site but not the API project. The application starts without problems but when I go to http://localhost:8082/api/v1/swagger-ui.html I get a 404. In the log I see this exception:
javax.servlet.ServletException: Circular view path [error]: would dispatch back to the current handler URL [/error] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
Also trying to log in directly in the API with user broadleafapi and password gives 404.
My environment: Windows 10, jdk 8, maven 3.6
What's wrong? Can you help me? Thank you
Thanks for the report. I reproduced this and it looks like that with the update to Spring Boot 2.0, we did not appropriately override the updated property that specifies the servlet location to embedded Tomcat. Thus, when you went to /api/v1/swagger-ui.html, the application treats it exactly like that URL which is what gave the 404.
Setting the server.servlet.contextPath=/api/v1 property appropriately stripped off this path as part of the servlet context and resolved the 404.
I tested around a bit and was able to 'Authorize' the app (button at the top right of the Swagger page) with the credentials information that get spit out in the logs:
Basic auth configured with user broadleafapi and password: <<generated>>
then I was able to hit the API endpoints.
The changes you will need to make locally in your project to consume the fix are at https://github.com/BroadleafCommerce/DemoSite/commit/422d1cdc37f847afd8bec0be477ab784cbad2e9d#diff-991c59b6dbb0f619b8570d8f8779eaddR11. You will notice that I moved the original definition in default.properties over to common.properties and I recommend that you do the same. To be clear, follow these steps:
Delete the server.servlet.contextPath entry in `api/src/main/resources/runtime-properties/default.properties
Change server.servletPath in api/src/main/resources/runtime-properties/common.properties to server.servlet.contextPath
Thanks for trying out Broadleaf and the report, sorry for the rough early start!

Jhipster blog project sign in failed

I tried to create a jhipster project (blog) which is given in the below mentioned youtube url:
https://www.youtube.com/watch?v=XRREt1KB4Y8
When I ran the 'blog' application and tried to sign in I got below error:
POST http://localhost:9000/api/authenticate 404 (Not Found) Zone.js:1805
I think server not able to find Zone.js, but I can see this file in below dir:
..\blog\node_modules\zone.js
Please let me know if I missed something while build or deployment. If you need more information please add comments.
Thanks
It seems you have started only the frontend server and forgot to start the java backend server with mvnw or gradlew depending on which build tool you chose. This is why you get errors 404 for each API calls.
See documentation for more details

Swashbuckle running with katana-owin based web api doesnt work with IIS but works with IIS Express

I think I have a similar issue as this post-
Webactivator doesn't run on IIS 7
Swashbuckle running with katana-owin based web api is able to work with IIS Express.
assume all the urls below have an "http" prefix.
I can browse to something like localhost:8085/swagger Which redirects me correctly to localhost:8085/swagger/ui/index
But when published to IIS redirects to localhost/swagger/ui/index instead of localhost/myapp/swagger/ui/index and this results in a 404. Notice that even though an application name is specified while publishing somehow swashbuckle/swagger doesn't know and only uses the pathbase without the application name.
basically it just picks up the site root URL instead of the application URL that was used to call /swagger
Any solution to this problem?
I got the same issue. Solved this using the following code (c.RootUrl)
config.EnableSwagger(c =>
{
c.IncludeXmlComments(GetXmlCommentsPath());
c.SingleApiVersion("v1", "yourAPI");
c.RootUrl(req => req.RequestUri.GetLeftPart(UriPartial.Authority) + VirtualPathUtility.ToAbsolute("~/").TrimEnd('/'));
});
Reference : Relative path for UI request URL

Backload 1.9.3.1 file upload handler not working with MVC 5 and ASP.NET Identity

I've been using Backload along JQuery File Upload plugin for over a year now, and it has been working great with my old site using MVC 4 with Simple Membership and backload 1.9.3.0, but when I upgraded my site to MVC 5 and ASP.NET Identity, and backload 1.9.3.1, I started getting problems with backload, I keep getting:
Failed to load resource: the server responded with a status of 500 (Internal Server Error) from the controller when calling http://xxx/Backload/UploadHandler?objectContext=xx
.
When I traced the problem, I found that the problem originated during the Authorization process, which then throws an exception:
Backload Error: 10030080 : Exception occured in Authorization Manager: Object reference not set to an instance of an object..
And then I get the aforementioned response on the browser and the files don't get displayed by Jquery File Upload plugin since it didn't receive anything but an internal server error back from the controller.
I think the problem is that it is trying to get user roles through using System.Web.Security.Roles. I tried to cancel the authorization process but that never seems to work, I've tried the handler from Example 12 on their documentation but it never seems to reach the handler_AuthorizeRequestStarted method because I think the exception gets thrown before that step.
It's a shame if they don't address this problem soon, I really liked their approach.
I got it to work through specifying in the appSettings section of web.config the two following entries:
<add key="autoFormsAuthentication" value="false" />
<add key="enableSimpleMembership" value="false" />
After that everything worked just like before. In fairness I think that these issues are related to ASP.Net Identity rather than to Backload server backend.

Struts2 simple app throwing HTTP 404 Exception

I am running a "Hello World " struts 2 example.I have put all the required dependencies in the "/WEB-INF/lib" location. I have the following jars in my lib location :
commons.io_2.0.1.jar
commons-collections-3.2.1.jar
commons-fileupload-1.2.2.jar
commons-logging-1.1.1.jar
freemarker-2.3.16.jar
ognl-2.6.11.jar
struts2-core-2.2.3.jar
xwork-2.0.4.jar
Do I need any other jar file to run simple Struts2 app?
I am getting "HTTP Status 404 - requested resource is not available" exception when I am running my app.
Check the web.xml as well as the deployment descriptor created by Eclipse to know if it points to the correct JSP. i.e. if the jsp is under JSP folder, the welcome file should be /JSP/welcome.jsp
FYI: Filter dispatcher has been deprecated in struts2 i must suggest you to use
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
its always better to start with updated one
And try adding commons-lang3-3.x file. It might work.

Resources