tags:

views:

92

answers:

2

Hi there, i have a MVC application that works fine; but now i need to put on one of the views, an IFRAME whose source is an ASPX page (classic aspx page, programmed in c#) the reason of doing that is that the page is located outside of our company, i just need to consume it passing a querystring. I'm doing the following on the iframe:

<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteIC.Master" Inherits="System.Web.Mvc.ViewPage" %>

<table height="20%" cellSpacing="0" cellPadding="0" width="100%" border="0">
    <tr>
        <td height="400" valign="top">
            <iframe name="myiframe" scrolling="no" id="myiframe" width="100%" height="100%" frameborder="0" src="folder/somePage.aspx?id=123"></iframe>
        </td>
    </tr>
</table>

For testing prouposes i'm pointing the iframe to a simple empty apsx page, i put that page on the same folder as the actuall view that contains the iframe.

But when i execute the application, the iframe returns error 404: the resource cannot be found showing me the right path for the dummy aspx page i created. Do i need to grant some permissions over IIS? or what else am i missing.

Thanks.

A: 

You need to enter the full url to the external site in the src parameter. You mentioned it was outside the company so I assume it's at a different host.

Michael Gattuso
A: 

To get your .aspx page to work you need to turn on routing for existing global.asax files. In your global.asax where you register your routes add:

RouteTable.Routes.RouteExistingFiles = true;
jfar