Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Ticket #296 (closed question: fixed)

Opened 6 years ago

Last modified 5 years ago

404Handler works very well on local IIS, but it does not work on a remote IIS Server

Reported by: kianoush.eshaghi@… Owned by: permagne@…
Priority: major Component: 404Handler
Keywords: Cc:

Description

I have installed 404Handler on our CMS6 R2 EPiServer project, and the Handler works very well on all local PC's with IIS. But the gadget of 404Handler does not work on a remote Windows Server 2008 R2 with IIS7, when I try to add a "Custom Redirects", the handler is throwing an "Intern serverfeil [500]" with the following details information:

Detailed error information (authorized by permissions to functions)
Error occured 02.05.2012 10:58:20
User IP 10.4.52.116
User Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; .NET4.0C; .NET4.0E; AskTbOVO2/5.14.1.20007; yie9)
Url http://.../modules/BVNetwork.FileNotFound.RedirectGadget/Redirect/Save
Referer https://.../cms/UI#

Exception details: NullReferenceException: Object reference not set to an instance of an object.
Stack trace:
[NullReferenceException: Object reference not set to an instance of an object.]

at BVNetwork.FileNotFound.RedirectGadget.Controllers.RedirectController.SaveRedirect(String oldUrl, String newUrl, String skipWildCardAppend)
at BVNetwork.FileNotFound.RedirectGadget.Controllers.RedirectController.Save(String oldUrl, String newUrl, String skipWildCardAppend, Nullable1 pageNumber, Nullable1 pageSize)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>cDisplayClassd.ba()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
at System.Web.Mvc.Controller.ExecuteCore()
at EPiServer.Shell.Web.Mvc.ModuleMvcHandler.ProcessController(IController controller)
at EPiServer.Shell.Web.Mvc.ModuleMvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

What is wrong on the server? Should the IIS be adapted for the handler? It seems there would be some authorization problem for the method "BVNetwork.FileNotFound.RedirectGadget.Controllers.RedirectController.SaveRedirect(String oldUrl, String newUrl, String skipWildCardAppend)"

I appreciate any pointer.

Attachments

FireFox_Error_404Handler.JPG (21.8 KB) - added by kianoush.eshaghi@… 6 years ago.
error under using FireFox
ErrorMessage_http500.JPG (190.1 KB) - added by kianoush.eshaghi@… 6 years ago.
Error message when trying to add a redirection
ErrorMessage_http500.2.JPG (190.1 KB) - added by kianoush.eshaghi@… 6 years ago.
error message using Internet Explorer

Change History

comment:1 Changed 6 years ago by permagne@…

Which version of IE are you using? Try turning logging to debug level, and search the log for "Adding redirect". I'm guessing that you have some strict security settings in your browser on the server, which prevents some of the javascript functionally, thus passing in empty values to the method.

comment:2 Changed 6 years ago by kianoush.eshaghi@…

I am using IE9 version:9.0.8112.16421. All another web browsers are not able to add handler at all, during IE can add handler, but it isn't able to add url redirection. What do you mean "browser on the server"? Do you mean that it could be some strict security settings on the web browser which I use to manage the 404Handler?

comment:3 Changed 6 years ago by permagne@…

Yes, that is what I mean. But you should check the log first.
You can also try to run IE as an administrator

comment:4 Changed 6 years ago by kianoush.eshaghi@…

The host machine is a winserver2008r2 running IE Enhanced Security Configuration.

By turning ESC off for admins/other users we can get the plugin to work if we remote in to the host machine and use the local browser to fire up the site.
It unfortunately still fails if the fire up the site from an external source.

comment:5 Changed 6 years ago by permagne@…

It fails when your fire up the site from an external source - do you mean that it fails when you browse to the server from your own computer?

comment:6 Changed 6 years ago by kianoush.eshaghi@…

Yes. It fails when I browse to the test server from my own PC.

comment:7 Changed 6 years ago by permagne@…

What is the error message that you get when using other browsers? Did you check the log like I suggested?
Do other gadgets on the site work with the other browsers?

Changed 6 years ago by kianoush.eshaghi@…

error under using FireFox

Changed 6 years ago by kianoush.eshaghi@…

Error message when trying to add a redirection

Changed 6 years ago by kianoush.eshaghi@…

error message using Internet Explorer

comment:8 Changed 6 years ago by kianoush.eshaghi@…

I am getting the following error message (Intern serverfeil [500]), all other gadgets work well, I have attached some screen shots according the problem here.

Detailed error information (authorized by permissions to functions)
Error occured 02.05.2012 15:50:20
User IP 10.4.52.116
User Agent Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; .NET4.0C; .NET4.0E; AskTbOVO2/5.14.1.20007; yie9)
Url http://eni.epitest.bouvet.no:80/modules/BVNetwork.FileNotFound.RedirectGadget/Redirect/Save
Referer https://eni.epitest.bouvet.no/cms/UI#

Exception details: NullReferenceException: Object reference not set to an instance of an object.
Stack trace:
[NullReferenceException: Object reference not set to an instance of an object.]

at BVNetwork.FileNotFound.RedirectGadget.Controllers.RedirectController.SaveRedirect(String oldUrl, String newUrl, String skipWildCardAppend)
at BVNetwork.FileNotFound.RedirectGadget.Controllers.RedirectController.Save(String oldUrl, String newUrl, String skipWildCardAppend, Nullable1 pageNumber, Nullable1 pageSize)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>cDisplayClassd.ba()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList1 filters, ActionDescriptor actionDescriptor, IDictionary2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
at System.Web.Mvc.Controller.ExecuteCore()
at EPiServer.Shell.Web.Mvc.ModuleMvcHandler.ProcessController(IController controller)
at EPiServer.Shell.Web.Mvc.ModuleMvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

comment:9 Changed 6 years ago by permagne@…

You should check the logs to see what error you get from the other browsers (then you can also check for the error in IE).

comment:10 Changed 6 years ago by kianoush.eshaghi@…

I have loged adding redirection both when I browse from my local pc into the host server and when I browse on that host server locally. You can see in log from my PC to the host server it trys to add empty string "tAdding redirect: ->

Following is logg information when I am browsing from my own PC into the host server:

path:~/modules/BVNetwork.FileNotFound.RedirectGadget/Redirect/Save
2012-05-02 19:24:59,564\t(null)\tCreating controller 'Redirect' with type: BVNetwork.FileNotFound.RedirectGadget.Controllers.RedirectController
2012-05-02 19:24:59,564\t(null)\tResolved 'Redirect' to controller: BVNetwork.FileNotFound.RedirectGadget.Controllers.RedirectController
2012-05-02 19:24:59,564\t(null)\tAdding redirect:
->
2012-05-02 19:24:59,564\t(null)\tFileNotFoundHandler called
2012-05-02 19:24:59,564\t(null)\t1.2.5 Unhandled exception in ASP.NET
System.NullReferenceException: Object reference not set to an instance of an object.

Following is when I am browsing on the host server locally:

path:~/modules/BVNetwork.FileNotFound.RedirectGadget/Redirect/Save
2012-05-02 19:31:49,210\t(null)\tCreating controller 'Redirect' with type: BVNetwork.FileNotFound.RedirectGadget.Controllers.RedirectController
2012-05-02 19:31:49,210\t(null)\tResolved 'Redirect' to controller: BVNetwork.FileNotFound.RedirectGadget.Controllers.RedirectController
2012-05-02 19:31:49,210\t(null)\tAdding redirect: 'Epi' -> 'mepi'
2012-05-02 19:31:49,226\t(null)\tMethod called with eventId:1ee4c0b5-ca95-4bdb-b0d4-e5d9e91189aa param:<?xml version="1.0" encoding="utf-16"?>
<CacheChangedEventArgs xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<ItemsToProcess>

<string>34f18fc5-b4ed-4eb0-962b-637cef64cc3d</string>

</ItemsToProcess>
<TypeOfEventAction>Remove</TypeOfEventAction>

</CacheChangedEventArgs>

comment:11 Changed 6 years ago by permagne@…

That is very strange indeed. When you use a browser that does not work at all, is there an error logged for that, when trying to load the gadget?
Do the 'suggestions' tab and functionality work in IE?

comment:12 Changed 6 years ago by kianoush.eshaghi@…

Hi,
I have found the problem. The 404Handler fails when you use https. We have to use securitySwitch when you remotly browse into our server on admin area of EPiServer, therefor we are using following item in the web.config:

<securitySwitch mode="RemoteOnly" xmlns="http://SecuritySwitch-v4.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="SecuritySwitch-v4.xsd">

<paths>

<!-- You should only need one of these paths based on where your login/logon page/view is accessed from. -->
<add path="~/util/login.aspx" />
<add path="~/cms" />
<add path="~/cms/ui" />
<add path="~/cms/ui/cms" />
<add path="~/cms/ui/cms/admin" />

</paths>

</securitySwitch>

After I had taken away these specified path from web.config, it worked well. I think the handler must have respective capability to work with https. I am not sure whether we can use the 404Handler on our project if we must switch-off SSL for EPiServer admin area.

comment:13 Changed 6 years ago by kianoush.eshaghi@…

  • Priority changed from blocker to critical
  • Type changed from question to defect

I have changed this issue from question to defect, because the handler fails when you use SSL. Typically you use HTTPS, when people enter password.

Do you intend to fix the problem?

comment:14 Changed 6 years ago by permagne@…

I think this might be an error in your configuration. Have you tried to use fiddler or firebug to look for error messages?

Take a look at this post at stackoverflow, it might be that you have a similar problem:
http://stackoverflow.com/questions/9109410/resources-not-automatically-loaded-from-https-securityswitch

comment:15 Changed 6 years ago by kianoush.eshaghi@…

  • Priority changed from critical to major
  • Type changed from defect to question

The gadget of the handler whith the same web.config works on our prodution server without problem. I don't know what is wrong on the test server which does not allow the handler's gadget working under HTTPS.

comment:16 Changed 5 years ago by steve@…

From the ticket history, I cannot see that there is a bug in the module. Can we close this ticket?

comment:17 Changed 5 years ago by permagne@…

  • Status changed from new to closed
  • Resolution set to fixed

Yes. Closing.

Note: See HelpUser/Tickets for help on using tickets.