Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 20th, 2004, 11:05 AM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTTP 405 error

hi i'm trying to call a html page from an asp page which
prints its contents, but i keep getting this error,
The page cannot be displayed:
HTTP 405 Resource not allowed


any ideas anyone?
Thanks
Treasa


Reply With Quote
  #2 (permalink)  
Old October 20th, 2004, 11:29 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Can you post some code that is involved in this?

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #3 (permalink)  
Old October 20th, 2004, 11:54 AM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sure, the .asp code thats calling the page is:
<form method = post action="printpage.html" target="_blank">
<input type="submit" value="Print Page" name="PrintPage" style="float: left"></td>
</form>

The other page is just a page i got from the internet and it is as follows... the only problem is that if i just type in the address of this page it works no problem, it just can't be called from the asp page for some reason.

<HTML>
<BODY onload="doPrint()">
<object id="WBControl" width="0" height="0" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>

<script language="VBScript"><!--
Sub VBPrint() On Error Resume Next
  WBControl.ExecWB 6,1
End Sub
//--></script>

<script language=JavaScript><!--


function doPrint()
{
    if(self.print)
    {
        self.print();
        self.close();
        return false;

    }
    else if (navigator.appName.indexOf('Microsoft') != -1)
    {
        VBPrint();
        self.close();
    }
    else
    {
    alert("To print this document, you will need to\nclick the Right Mouse Button and select\n'Print'");
    }
}
//-->
</script>

<P>
Me<br>
<IMG src="http://www.aspalliance.com/chrisg/tools/image2.aspx#63;src=/chrisg/tools/test.gif&amp;width=200&amp;height=200"><p>

<p>
Tigger<br>
<IMG src="http://www.aspalliance.com/chrisg/tools/image2.aspx#63;src=/chrisg/tools/tigger.jpg&amp;width=250&amp;height=200">

<h1>This page will now show the print dialog</h1>
... please wait
</BODY>
</HTML>

thanks!

Reply With Quote
  #4 (permalink)  
Old October 20th, 2004, 12:19 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Treasa,

Not sure why it doesn't work when you do a FORM POST. It works fine with GET method and when used with <a href...>
Code:
<form method="get" action="printpage.html" target="_blank"> 
<input type="submit" value="Print Page" name="PrintPage" style="float: left"></td>
</form>

<a href="Printpage.html">Print Page</a>
Both these codes are working fine.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
Reply With Quote
  #5 (permalink)  
Old October 21st, 2004, 03:04 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , United Kingdom.
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Treasa,

Is it an IIS web server? If so, posts to .htm & .html pages will return a 405 unless you map the file extensions to a script engine. The page should work fine if you change it's extension to .asp

The following article may be of use http://www.somacon.com/docs/iis_http...wed_error.html

HTH,

Chris

Reply With Quote
  #6 (permalink)  
Old October 21st, 2004, 03:43 AM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks guys! its working fine now!

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is HTTP 403 error exstream ASP.NET 2.0 Professional 1 April 28th, 2006 09:19 PM
Error HTTP 405 - Resource not allowed shefali Classic ASP Basics 2 February 20th, 2006 06:47 PM
error HTTP 405 - Resource not allowed hastikeyvan Dreamweaver (all versions) 1 January 12th, 2006 12:11 PM
status 405: Method not found viges VB.NET 2002/2003 Basics 1 May 18th, 2004 12:53 PM
HTTP Status 405 - HTTP method GET .... nsakic Servlets 1 January 25th, 2004 04:50 PM



All times are GMT -4. The time now is 02:12 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.