CustomForms not accessible when not logged in: 401 Unauthorized (Orchard 1.7.1)

Topics: Troubleshooting
Feb 5 at 10:24 AM
Calling a freshly created custom form using the CustomForms module, when I log out from Orchard I get the below response. Why is my custom form not accessible when I'm logged out? This is happening on an Orchard v.1.7.1.0 install.
</pre></table></table></table></table></table></font></font></font></font></font></i></i></i></i></i></b></b></b></b></b></u></u></u></u></u><p>&nbsp;</p><hr>
<!DOCTYPE html>
<html>
    <head>
        <title>Runtime Error</title>
    </head>
    <body bgcolor="white">
            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
            <h2> <i>Cannot redirect after HTTP headers have been sent.</i> </h2></span>
            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
            <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
            <br><br>
            <b> Exception Details: </b>System.Web.HttpException: Cannot redirect after HTTP headers have been sent.<br><br>
            <b>Source Error:</b> <br><br>
            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code>
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>
                  </td>
               </tr>
            </table>
            <br>
            <b>Stack Trace:</b> <br><br>
            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code><pre>
[HttpException (0x80004005): Cannot redirect after HTTP headers have been sent.]
   System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent) +12715248
   System.Web.Security.FormsAuthenticationModule.OnLeave(Object source, EventArgs eventArgs) +12764280
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +165
</pre></code>
                  </td>
               </tr>
            </table>
            <br>
            <hr width=100% size=1 color=silver>
            <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
            </font>
    </body>
</html>
Feb 5 at 10:45 AM
It might be related to Output Cache module. Can you try disabling it if it's enabled?


Feb 5 at 10:10 PM
Edited Feb 5 at 10:10 PM
Hi Kassobasi,

thanks for answering but unfortunately, even after disabling the Output Cache module, I cannot save new form submissions when I'm not logged in.

I've at least gotten that far to show the form for not-logged in users by using a Custom Forms Widget in a layer I created just for the page that I want that form to show. But once I submit it I get the following:

Couldn't create content. Anonymous users do not have Submit_Rodzina permission.
Access Denied

Now, I'd like to give the Anonymous user the desired permission but where would I do that? (Rodzina is the name of my content type for which I've created the custom form.)
Developer
Feb 5 at 10:14 PM
If you go to Users -> Roles, you can grant the required permissions to the Anonymous user role.
Feb 6 at 10:03 AM
Sipke, thanks a lot for your quick help! Of course, that worked. I had no clue where to look for the permissions, I must admit... but Users -> Roles makes somewhat sense.
Cheers, Oliver