Link to new ASP page opens dialog box???

  • I have two instances of my website running on server1 and server2.  IIS settings look to be the same.  On one page, I have a report menu which has links to other asp pages that have the content type set to Excel.  On server1, clicking on any link opens up the page in Excel, no problems.  On server2, however, a dialog box pops up and asks to open, save, or cancel.  I have found out that as soon as I remove the line of code for the Excel content(Response.ContentType = "application/vnd.ms-excel"), the ASP page opens without the pop up.  Does anyone know what needs to be changed on server2 to allow this line of code, and thus allow the code to be displayed in Excel without saving the file? 

    Thanks in advance...

    Wayne

  • Are you saying that all clients that access the ASP page from server 2 are exhibiting the same prompting before open behavior or that the prompt is occurring when you access the ASP page from server 2 directly?

    In the latter case we had a similar situation with Excel-based web reports where the behavior when opening Excel-formatted web pages differed between clients.  It is not something you can affect from the server side since the web page is only telling the client that it should open the page with it's own locally registered instance of Excel but cannot control how it opens it.  These settings are located and need to be adjusted on each client, in your case the second server. The way this is corrected is to optimize the default file association handling on the client machines as follow which should work the same on the second server in your case.

    To do this:

    (Note these steps are for an XP machine but should work in a similar way for Win2K server.)

    1) Open up the standard Windows Explorer on the second server

    2) Select the 'Tools' menu option, then select 'Folder Options...'

    3) Select the 'File Type' tab

    4) Scroll to the .XLS file type in the top window and click

       to hightlight it

    5) Click the 'Advanced' button

    6) Check box options:

     a) UN-check 'Confirm open after download' - defeats the prompt

     b) Ignore 'Always show extension

     c) UN-check 'Browse in same window' - works better to have a separate

           browser window pop-up for Excel reports so you can still have the

           original calling web page active, i.e. ASP report menu

    HTH

    Maddog


    maddog

  • The solution above is fine, except that every client machine would have to be touched to make those settings.

    Another option to explore is the Office Web Component (OWC).  Its an ActiveX control that is on the client with the Office installation.  It has parameters you can set, such as which Excel menu options would be available.  If can be pointed at an remote Excel file, or in Excel 2002 and higher, Excel can be streamed down to the client as SpreadsheetML (XML for Excel).

  • Thanks for the help...  I did some further testing and found out that it's only my machine that gets prompted.  Other machines on the network open the new window without the prompt.  The one thing I don't understand however, is why the links on the one server open right up, but not on the second server.  The code is exactly the same for the ASP pages, but my machine works for one and not the other.  I guess it's just one of those wierd things that no one can really explain.

  • Could it be some type of AD/Security setting?  One site is in a Trusted Zone and the other isnt?

    The behaviour you are describing for opening something with the content type set to one of the office products is pretty standard and the first solution giving to you is the standard response to that.  So those client machines that dont pop have probably those settings made for them.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply