404 error when submitting ASP form

I have the following ASP code below, which tries to call the formmail.asp script in the Bin directory. However, when I click on the submit button, I get a 404 error. I am not sure whats up with this?

            <form action="\Bin\formmail.asp" method="post">
                  <input name="_recipients" type="hidden" value="brad.britton@me.com" />
                  <input name="_requiredFields" type="hidden" value="Company, Name, Email, Phone, Information" />
                                                
                                  <table cellpadding="0" cellspacing="0" border="0" WIDTH=493 class="shane">
                  <tr>
                    <td valign="top" colspan=2><p class="shane"><strong>Notice</strong>:
                        Please fill in the relevant information and then click
                        submit. </td>
                  </tr>
                  <tr>
                    <td valign="top">Company Name:</td>
                    <td valign="top"><input type="text" name="Company" size="20" maxlength="44"></td>
                  </tr>
                  <tr>
                    <td valign="top" width=30><p class="shane">Name:</P></td>
                    <td valign="top"><input name="name" type="text" id="Name" size="20" maxlength="44"></td>
                  </tr>
                  <tr>
                    <td valign="top" width=30><p class="shane">Email:</P></td>
                    <td valign="top"><input type="text" name="Email" size="20" maxlength="44"></td>
                  </tr>
                  <tr>
                    <td valign="top">Phone:</td>
                    <td valign="top"><input name="phone" type="text" id="Phone" size="20" maxlength="44"></td>
                  </tr>
                  <tr>
                    <td valign="top" width=30><p class="shane">Information:</P></td>
                    <td valign="top"><textarea cols="24" rows="5" name="Information"></textarea></td>
                  </tr>
                  <tr>
                    <td valign="top" width=30>&nbsp;</td>
                    <td valign="top"><input type="image" name="submit" src="images/submit_request_form-button.jpg"></td>
                              
                              
                  </tr>
                </table>

</form>      

Thanks

Brad
bradbrittonAsked:
Who is Participating?
 
samtran0331Connect With a Mentor Commented:
what's thet relative path of this page to the bin directory?

instead of:
 <form action="\Bin\formmail.asp" method="post">

try:
 <form action="Bin/formmail.asp" method="post">

also, I"m assuming this isn't an ASP.Net application?
0
 
Rog DManager Inforamtion SystemsCommented:
Remove the "/" in the beginning of the string for /bin folder.

Rog
0
 
bradbrittonAuthor Commented:
now I get error 403 Forbidden....
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Rog DManager Inforamtion SystemsCommented:
Looks like you don't have permission to this folder or the asp webuser does not.

Check permissions.

Rog
0
 
samtran0331Commented:
That's why I asked whether this was ASP.Net or not...Web servers usually reserve the folder name "bin" or "cgi-bin" etc.  for files that are not served.
changing the permissions probably still wouldn't work...I would create a new folder for these processing pages
0
 
bradbrittonAuthor Commented:
I changed the folder name to Scripts and made the changes to the website. Now I get this error.

The HTTP verb POST used to access path '/WebSite1/Scripts/formmail.asp' is not allowed.
Description: 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.

Exception Details: System.Web.HttpException: The HTTP verb POST used to access path '/WebSite1/Scripts/formmail.asp' is not allowed.

Source Error:

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.  

Stack Trace:


[HttpException (0x80004005): The HTTP verb POST used to access path '/WebSite1/Scripts/formmail.asp' is not allowed.]
   System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext context, AsyncCallback callback, Object state) +3383065
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +3335828
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +161

 
HELP!!! :-)
0
 
lrygielCommented:
Check your IIS Website properties. Make sure you have execute permissions (Virtual Directory Tab) set to either "scripts only" or "Scripts and Executables". In your case I think "Scripts Only" should be sufficient.

0
 
bradbrittonAuthor Commented:
I changed the settings, still get that error.I am running the site in debug mode in VS 2008, if that may also be a cause.

0
 
lrygielConnect With a Mentor Commented:
I don't know anything about VS 2008.  IS THIS A .NET app? The question was asked twice but you didn't respond so I'm working off the assumption it IS NOT .NET, but rather classic ASP (ver 3.0).

I know you stated earlier that you moved from \bin to WebSite1/Scripts/. Get everything back in bin. The way I read this was you had the 403 access error when the script was in /bin but other errors once you moved it. The IIS setting should get rid of the 403.1 error if the scripts are in bin or cgi-bin.

I run all my served scripts from cgi-bin and as long as I had the permissions correct, I never had a problem.

0
 
bradbrittonAuthor Commented:
I did this and I am still getting error 403. I am running an ASP script, but I would assume that it should still work ok. Any other ideas?
0
 
samtran0331Commented:
what OS is this IIS on? Win2k3? XP?

And you're using VS2008?? The code you posted is a Classic ASP page (ends with extension *.asp) right?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.