Solved

IIS 7 asp connection

Posted on 2011-09-27
32
1,603 Views
Last Modified: 2012-05-12
I am trying to get the IIS 7 asp portion functioning.  I keep getting the "HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map"

I have included screen shots of the error and the IIS7 configurations.  It happens only when a asp page has a db connection.  A regular asp page does come up.

Thanks
John IIS config error
0
Comment
Question by:JohnMac328
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 19
  • 11
  • +1
32 Comments
 
LVL 15

Expert Comment

by:pateljitu
ID: 36712812
0
 

Author Comment

by:JohnMac328
ID: 36712996
That did get me closer - I get this message and I changed the verbs around but I still get the error.  It is an asp page that simply inserts records from a form.  My verbs are GET, POST

The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.


0
 
LVL 15

Accepted Solution

by:
pateljitu earned 500 total points
ID: 36713234
Please follow these steps:

In IIS Manager, click on the website you getting 404.3 error:
1. Under Feature View double click Handler Mappings
2. Click Add Script Map and enter these values:
    a. Request Path: *.asp
    b. Executable: %windir%\system32\inetsrv\asp.dll
    c. Name: ASPClassic

   Click Request Restrictions
    Mapping --> Check "Invoke handler only if request is mapped to: --> File
    Verbs --> select All Verbs
    Access --> select Script

Click OK twice, you will receive pop-up :
---------------------------
Add Script Map
---------------------------
Do you want to allow this ISAPI extension? Click "Yes" to add the extension with an "Allowed" entry to the ISAPI and CGI Restrictions list or to update an existing extension entry to "Allowed" in the ISAPI and CGI Restrictions list.
---------------------------
Yes   No   Cancel  
---------------------------

select YES


Also look at this article:
http://support.microsoft.com/kb/942032
0
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 

Author Comment

by:JohnMac328
ID: 36713274
Same error - I restarted IIS and the server - I guess I will see what a reboot does
0
 
LVL 31

Expert Comment

by:Wayne Barron
ID: 36713866
Have a look at this Article and see if it will help you
http://www.experts-exchange.com/A_3730.html
It looks like you have everything done, but maybe there is something in this
Article that you might have missed.

Good Luck
Carrzkiss
0
 
LVL 15

Expert Comment

by:pateljitu
ID: 36714219
Could you please provide with code that connect to database, also to debug code please remove all other part of code and only keep code that connects to DB and see if that does run into error.

Thanks.

@Carrzkiss - Good article.
0
 

Author Comment

by:JohnMac328
ID: 36716340
carrzkiss - I tried all the steps in your link with no change - goo info though

pate - here is just the connection code - I removed everything else so it is something with the connection to the db


Dim conn, ConnectString

ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & "C:\Inetpub\wwwroot\Eric_Golf_Form\dbreg.mdb" & ";Persist Security Info=False"
Set conn = Server.CreateObject("ADODB.Connection")
conn.open ConnectString
0
 
LVL 15

Expert Comment

by:pateljitu
ID: 36719366
This is strange, 404.3 error is related to MIME type restriction. It is a bit strange that ASP page works fine and when trying to connect to DB you get this error.

Have you tried just keeping DB connection code and test accessing page, see if you still receive error.
Also in you page is there any other files that is included other than .asp extension.

Please see this article it provide with all error description:
http://support.microsoft.com/kb/943891
0
 

Author Comment

by:JohnMac328
ID: 36719401
This is odd - if I just run the page I get
Provider cannot be found. It may not be properly installed.

/Eric_Golf_Form/InsertReg.asp, line 16

Here is the form that I submit that throws the mime error - I don't see anything wrong with it.
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>I want to know more...</title>
<link href="sitestyles.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style8 {font-size: 16px}
.style9 {font-size: 18px}
-->
</style>

<script language="javascript">
function fix_chars(textBox)
{
    textBox.value = textBox.value.replace(/['&_,%`"~#<>;]/g, "");
}
</script>
</head>
<body>


<p>&nbsp;</p>
<p align="center"><span class="style2 style8">Register for our Softball Match... Registration </span><br />
</p>
<form name="Form" method="post" action="InsertReg.asp">
<table width="400" border="0" align="center" cellspacing="1" bgcolor="lightsteelblue">
  <tr valign="middle" class="style4">
    <td height="21" align="left" bgcolor="#FFFFFF" colspan="2">&nbsp;Register Your Interest Here... </td>
  </tr>
  <tr valign="middle" class="DataGridHeader">
    <td width="200" background="Images/bgtr.gif" bgcolor="#FFFFFF" height="21" align="left">&nbsp;Field</td>
    <td background="Images/bgtr.gif" bgcolor="#FFFFFF" height="21" align="left">&nbsp;Texts</td>
  </tr>
   <tr valign="middle" class="tablerowdata" bgcolor="#FAFAFA">
    <td height="21" align="left">&nbsp;&nbsp;Name:</td>
    <td height="21" align="left">&nbsp;&nbsp; <input name="txtName" type="Text" class="tablerowdata" id="txtName" size="23" onKeyUp="fix_chars(this);">
    </td>
  </tr>
  <tr valign="middle" class="tablerowdata" bgcolor="#FAFAFA">
    <td height="21" align="left">&nbsp;&nbsp;Entry Type :</td>
    <td height="21" align="left">&nbsp;&nbsp;
      <select name="txtTyp1" class="tablerowdata" id="txtTyp1" onchange="txtDepartment.focus()">
        <option value="PLAYER" selected="selected">PLAYER</option>
        <option value="OFFICIAL">OFFICIAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>
      </select>
      </td>
  </tr>
  <tr valign="middle" class="tablerowdata" bgcolor="#FAFAFA">
    <td height="21" align="left">&nbsp;&nbsp;Department:</td>
    <td height="21" align="left">&nbsp;&nbsp;
      <input name="txtDepartment" type="text" class="tablerowdata" id="txtDepartment" size="23" onKeyUp="fix_chars(this);"/></td>
  </tr>
    <tr valign="middle" class="tablerowdata" bgcolor="#FAFAFA">
    <td height="21" align="left">&nbsp;&nbsp;Contact Number: (E.g, 2000)</td>
    <td height="21" align="left">&nbsp;&nbsp;
      <input name="txtNumber" type="text" class="tablerowdata" id="txtNumber" size="23" onKeyUp="fix_chars(this);"/>
    </td>
  </tr>
      <tr valign="middle" class="tablerowdata" bgcolor="#FAFAFA">
    <td height="21" align="left">&nbsp;&nbsp;Email Address:</td>
    <td height="21" align="left">&nbsp;&nbsp;
      <input name="txtEmail" type="text" class="tablerowdata" id="txtEmail" size="23" onKeyUp="fix_chars(this);"/>
    </td>
  </tr>
  <tr valign="middle" class="tablerowdata" bgcolor="#FAFAFA">
    <td height="21" align="left">&nbsp;&nbsp;Register:</td>
    <td height="21" align="left">&nbsp;&nbsp;
      <input name="Submit" type="submit" value="Submit" />
    </td>
  </tr>
</table>
</form>
<div align="center" class="style2 style8">enter your details for more information </div>
</body>
</html>

Open in new window

0
 

Author Comment

by:JohnMac328
ID: 36719465
Here is the last three lines with the 405 error details from the log
2011-09-28 19:17:37 ::1 POST /Eric_Golf_Form/InsertReg.asp - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 405 0 1 1
2011-09-28 19:19:06 ::1 POST /Eric_Golf_Form/InsertReg.asp - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 405 0 1 1
2011-09-28 19:19:14 ::1 POST /Eric_Golf_Form/InsertReg.asp - 80 - ::1 Mozilla/5.0+(compatible;+MSIE+9.0;+Windows+NT+6.1;+WOW64;+Trident/5.0) 405 0 1 1

Open in new window

0
 

Author Comment

by:JohnMac328
ID: 36719486
I found this file in the Golf Form folder called web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <handlers>
            <remove name="ASPClassic" />
            <add name="ASPClassic" path="*.asp" verb="GET, POST" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="File" requireAccess="Script" preCondition="bitness64" />
        </handlers>
    </system.webServer>
</configuration>

Open in new window

0
 
LVL 15

Expert Comment

by:pateljitu
ID: 36719500
Page looks normal, is this more to code for e.g. i dont see ASP code for connecting with database.
0
 

Author Comment

by:JohnMac328
ID: 36719518
The insertreg.asp has the connection along with the insert statement.  It never gets to that point though because of the 405 error
0
 

Author Comment

by:JohnMac328
ID: 36719546
Ok - I deleted the web.config file I found in the folder.  The page now runs but has the connection error.  This has to do with connecting to an Access database with 64bit - is there a different string to connect in 64bit?

ADODB.Connection error '800a0e7a'

Provider cannot be found. It may not be properly installed.

/Eric_Golf_Form/InsertReg.asp, line 16
0
 

Author Comment

by:JohnMac328
ID: 36719636
I tried this

ConnectString = "Provider =Microsoft.ACE.OLEDB.12.0; Data Source =" & "C:\Inetpub\wwwroot\Eric_Golf_Form\dbreg.mdb" & ";Persist Security Info=False"

and it gets me the connection.

I now get
Microsoft Access Database Engine error '80004005'

Operation must use an updateable query.

/Eric_Golf_Form/InsertReg.asp, line 16

is that programming error or another connection error?  

It is bombing on this line
conn.Execute SQLInsertNew                  'Tell the database to perform the action of the SQL string
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#Include File="connection.asp"-->
<%
'############################################
'This is the script to take the values from the registration form and enter them 
'into the database
'############################################


'Declare the variables
Dim SQLInsertNew, txtName, txtDepartment, txtNumber, txtTyp1

'Create the SQL String
SQLInsertNew = "INSERT INTO tblNames (Nam1, Dep1, Num1, Typ1, Ema1) VALUES ('" & Request.Form("txtName") & "', '" & Request.Form("txtDepartment") & "', '" & Request.Form("txtNumber") & "', '" & Request.Form("txtTyp1") & "', '" & Request.Form("txtEmail") & "')"

conn.Execute SQLInsertNew			'Tell the database to perform the action of the SQL string
conn.close							'Close the connection to the database
set conn = nothing					'Release the connection object from memory
Response.Redirect("Display.asp")	'Point the user back to the main display page
%>

Open in new window

0
 
LVL 15

Expert Comment

by:pateljitu
ID: 36719657
1. Please enable 32-bit application = true in your IIS application pool which is used by your website:
http://blogs.netconnex.com/2009/08/configuring-iis-on-64bit-windows-7-to.html

2. Also confirm if JET is installed on your machine:

http://tutorials.aspfaq.com/8000xxxxx-errors/why-do-i-get-80040200/80040514/800a0e7a-errors.html
http://support.microsoft.com/kb/239114

IMP:
Note On 64-bit versions of Windows operating systems, the Msjet40.dll file is in the Windows\SysWOW64 folder.
0
 
LVL 15

Expert Comment

by:pateljitu
ID: 36719669
0
 

Author Comment

by:JohnMac328
ID: 36719707
Where do I change the IUSER settings in IIS 7?
0
 
LVL 15

Assisted Solution

by:pateljitu
pateljitu earned 500 total points
ID: 36719782
Goto folder where MDB file resides:

C:\Inetpub\wwwroot\Eric_Golf_Form, right-click
1. select Properties
2. select Security tab (see id IUSR_machinename exists in the list and has read / write access)
3. If not in the list, select Edit >> Add >> Advanced >> and click Find now
4. Select IUSR from the list click OK twice
5. IUSR should appear in the list now and make sure user had write access
0
 

Author Comment

by:JohnMac328
ID: 36719805
I found it and changed the permissions but the same result - I restarted IIS - does this require a reboot?
0
 
LVL 15

Expert Comment

by:pateljitu
ID: 36719822
Just to be sure have you closed that Access file when making the update. If MDB file is open close the file before testing the asp update statement.
0
 

Author Comment

by:JohnMac328
ID: 36719831
I did check that - I will reboot for the heck of it.
0
 

Author Comment

by:JohnMac328
ID: 36719880
I even changed the permissions on the temp folder per Microsoft instructions.
0
 

Author Comment

by:JohnMac328
ID: 36719994
I tried a different folder with a different asp program.  Connects to the db and works fine until it needs to do a insert statement and I get the error again.  Has to be some setting somewhere.
0
 
LVL 21

Expert Comment

by:Hendrik Wiese
ID: 36813530
Have a look at the following solution from Microsoft:

1. Configure a handler mapping for the requested file name extension. To do this, follow these steps:
1. Click Start, type inetmgr in the Start Search box, and then click Inetmgr in the Programs list.
2. If you are prompted for an administrator password or for a confirmation, type the password, or click Continue.
3. In IIS Manager, expand the server, expand Web sites, and then click the Web site that you want to modify.
4. In Features View, double-click Handler Mappings.
5. Configure an appropriate handler mapping for the type of the requested file name extension.

2. Configure an appropriate MIME type for the Web site. To do this, follow these steps:
1. Click Start, type inetmgr in the Start Search box, and then click Inetmgr in the Programs list.
2. If you are prompted for an administrator password or for a confirmation, type the password, or click Continue.
3. In IIS Manager, expand the server, expand Web sites, and then click the Web site that you want to modify.
4. In Features View, double-click MIME Types.
5. In the Action pane, click Add.
6. Add the extension of the required file and the MIME type in the Add MIME Type box, and then click OK.

Reference: http://support.microsoft.com/kb/942032

Hope this helps!!!
0
 

Author Comment

by:JohnMac328
ID: 36814318
Thanks HendrikWiese but I did that in answer ID: 36713234
0
 
LVL 15

Expert Comment

by:pateljitu
ID: 36816253
Did you try giving READ / WRITE access to folder where access .MDB file reside using windows explorer also to IUSR_<MACHINENAME>

Also try connection string for access using this URL:
http://www.connectionstrings.com/access
0
 

Author Comment

by:JohnMac328
ID: 36816286
I got the connection string to work in comment ID: 36719636 and I opened up Read/Write everywhere you can think of and under every profile there is
0
 

Author Comment

by:JohnMac328
ID: 36891267
Found it - Someone from the microsoft forum said

Try the Users group instead of the IUSR account, security changes in Win 7.
It worked
0
 

Author Comment

by:JohnMac328
ID: 36891312
You got me darn close and still want to award the points - how do we do that since I don't know which question to accept?
0
 
LVL 15

Expert Comment

by:pateljitu
ID: 36893457
Thank you.

Please mark the answers that helped you to resolve the issue and distribute the points accordingly.

Say for e.g. # 36713234 (Accepted solution) and # 36713866 (Assisted Solution) helped you resolve the issue you can select both solutions and distribute points. Hope this helps.
0
 

Author Closing Comment

by:JohnMac328
ID: 36893746
Thanks for all the help
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question