Link to home
Start Free TrialLog in
Avatar of Andy Howard
Andy HowardFlag for United Kingdom of Great Britain and Northern Ireland

asked on

IIS POST request being ignored

We have just moved a site to an IIS 7.5 Server, this has code that has been working but since the move it no longer accepts data received as a POST Command.

The ASP code at the receiver ASP is

<%@ LANGUAGE="VBSCRIPT" %>
<%  Option Explicit  %>
<!-- #include file="incl/globals.asp" -->
<%
on error goto 0
'set return page
returnPage = lookupPageName()

'set variables for HTTP POST
dim jTitle, 
        JReference, JDesc, JClient, JSal, ExpDt, Ctype, Shs, Loc, Keyw, sect, JID, jCID, jComm, chk


jComm = request.Form("Action")

JTitle = request.Form("JTitle")
JReference = request.Form("JReference")
JDesc = request.Form("JobDesc")
JClient = request.Form("JClient")
JSal = request.Form("JSal")
ExpDt = request.Form("ExpDt")
Ctype = request.Form("Ctype")
Shs = request.Form("Shs")
Loc = request.Form("Loc")
Keyw = request.Form("Keyw")
sect = request.Form("sect")

if jCommand = "Add" then
	addJ()
elseif 
   jcommand = "Delete" then
	deleteJ()
end if

'======================================================================================
sub addJ()

..  SQL insert/ update code in here

'======================================================================================
sub delJ()

..  SQL delete code in here


etc ....... 

Open in new window



The data is being received as i have monitored the HTTP Stream, the Server returns a 302 Redirect and no insert occurs.

I have extracted the asp code for the Add/Update and Delete and manually assigned the variables and the records get inserted and deleted correctly into the database, it is purely the actions of sending the data via POST that fails.

The Web.config is :

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <handlers>
            <clear />
            <add name="php-5.6.6" path="*.php" verb="GET,HEAD,POST" modules="FastCgiModule" scriptProcessor="C:\Program Files (x86)\PHP\v5.6\php-cgi.exe" resourceType="Either" requireAccess="Script" />
            <add name="ASPClassic" path="*.asp" verb="GET,HEAD,POST" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="File" />
            <add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
        </handlers>
        <defaultDocument>
            <files>
                <clear />
                <add value="Default.asp" />
                <add value="index.php" />
            </files>
        </defaultDocument>
        <httpErrors errorMode="Detailed" />
    </system.webServer>
</configuration>

Open in new window


I have been scratching my head over this one for a few days so woudl appreciate a new set of eyes to see what I am obviously missing !!

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Mlanda T
Mlanda T
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andy Howard

ASKER

It is being redirected to the home page of the site with a 302 response seen in the TCP Stream.

I have checked the application pool and it has access to the files ..

All ideas appreciated on this one ! :-)
I have now created a new page that does a simple POST to the IIS ASP Page and it appears that the problem is actually with the sending data and not with the recipient pages or IIS.

It appears that I have been looking at the wrong end of the process..
The problem although not directly fixed by the user , it did prompt me to look at other options which eventually led to a resolution