Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running a local IIS 7.5 server in Win 7 Pro, and I'm trying to add a custom error page for 403 responses.

When I click OK to add a custom error page for my site, IIS Manager just vanishes. The server is still running, and I can re-start IIS Manager, but the new page has not been saved.

I've also tried adding it directly to web.config, but that just gives me The page cannot be displayed because an internal server error has occurred.

Does anyone know why this might be happening?

Edit:
The event log implies that an invalid character in the path caused the crash, but It occured even when I copied & pasted a path from a valid entry.

Application error log:

IISMANAGER_CRASH

IIS Manager terminated unexpectedly.

Exception:System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---     System.ArgumentException: Illegal characters in path.
   at System.IO.Path.CheckInvalidPathChars(String path)
   at System.IO.Path.IsPathRooted(String path)
   at Microsoft.Web.Management.Iis.CustomErrors.CustomErrorsForm.OnAccept()
   at Microsoft.Web.Management.Client.Win32.TaskForm.OnOKButtonClick(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at Microsoft.Web.Management.Host.UserInterface.ManagementUIService.ShowDialogInternal(Form form, IWin32Window parent)
   at Microsoft.Web.Management.Host.UserInterface.ManagementUIService.Microsoft.Web.Management.Client.Win32.IManagementUIService.ShowDialog(DialogForm form)
   at Microsoft.Web.Management.Client.Win32.ModulePage.ShowDialog(DialogForm form)
   at Microsoft.Web.Management.Iis.CustomErrors.CustomErrorsPage.AddCustomError()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.Web.Management.Client.TaskList.InvokeMethod(String methodName, Object userData)
   at Microsoft.Web.Management.Host.UserInterface.Tasks.MethodTaskItemLine.InvokeMethod()
   at System.Windows.Forms.LinkLabel.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Label.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at Microsoft.Web.Management.Host.Shell.ShellApplication.Execute(Boolean localDevelopmentMode, Boolean resetPreferences, Boolean resetPreferencesNoLaunch)

Process:InetMgr
share|improve this question
add comment

2 Answers 2

I've found the answer to this:

I needed to add the new error page at the server level, rather than the site level.

Why this caused IIS Manager to close, I dont know, but at least there is a way round it.

share|improve this answer
    
Could you open the Event Viewer, in the Application Log you should have an entry from IIS-Manager, it should include the details about the error and the call-stack, could you please post them here? –  CarlosAg Nov 17 '10 at 16:52
    
Sure thing, I've added the log to the question. –  dig412 Nov 17 '10 at 18:28
add comment

I was having similar issue when trying to setup path for the option "Insert content from static file into the error response" along with the option "Try to return the error file in the client language".

My goal was to setup path as follows - %SystemDrive%\inetpub\custerr\\404.htm

'<'LANGUAGE-TAG'>' causes the error and IIS manager to vanish.

Solution:-

  1. Checked "Try to return the error file in the client language"
  2. Clicked the Set Button that appears after the first step.
  3. Enter the %SystemDrive%\inetpub\custerr\ for root dir path
  4. Enter 404.htm for Relative File path
  5. Click Ok on dialog box
  6. Click Ok on edit custom error page dialog
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.