Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starting process by URL

Status
Not open for further replies.

gny

Programmer
Jun 3, 2001
116
SE
In a .NET 2.0 Forms application, I want to open a Reporting Services report using the default viewer application for the report content type, e.g. MSExcel.

I start a process using the System.Diagnostics namespace, specifying the report http address as file name. Internet Explorer starts up and shows an Open/Save dialog. Choosing Open usually works and MS Excel, Acrobat Reader or whatever is started but in one customer environment it does not. Nothing happens. Save works fine though.

However, if there already is an instance of either IE or Excel running, that application instance is used and it works fine. It seems that IE processes started from my .NET code are not allowed to in turn launch the correct application given the content type.

Does anyone have an idea of what might be the issue? .NET runtime configuration? IE setting?

Thanks for any help,

Markus
 
My guess would be that their file associations are messed up.

As an experiment, have them pick a computer with the problem. Get them to find a .xls file (or whatever file causes the problem), right-click on it, and select "Open With..." In the list that appears, select MS-Excel, and check the "Always use this program" checkbox. Then try your app & see if that changes things.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Thanks for your reply chiph.

I do not think the file associations are the problem because if there already is an instance of Excel or IE running (which is not a child process of my application), IE correctly picks Excel to handle the document and it opens just fine.
 
Correction: The app is running under .NET 1.1

I also wrote a little more thorough problem description:

Technical description:

We are running a .NET Framework 1.1 application.

The application opens a URL with the method System.Diagnostics.Process.Run(URLString).

System.Diagnostics.Process.Start will open the default Web browser because the string passed is a URL. The default browser is Internet Explorer. Internet Explorer is started by the application process with the user context of the logged in user.

The URL is a path to a MS SQL Reporting Services report with the render mode “Excel”.

Internet Explorer will show an Open/Save dialog because the mime type is Excel and the filetype is “.xls”.

If the user chooses Open it will open the report in Excel. If the user choose save, the xls file is saved to disk.

Problem:

Internet Explorer does not open Excel if the user chooses Open. The file is saved to temporary internet files, but Excel is not started. No error message is shown. No log message can be found.

Problem description:

It works if the URL is pasted into the address field in Internet Explorer.

It works if Internet Explorer is started before the application opens the URL. The application is using the IE process that’s already started.

It works if Excel is started before the application opens the URL. The application does not have to start Excel. The file is opened in the Excel process that’s already started.

It does not work if the application has to start the IE process and IE has to start Excel.

Probable cause:

The problem appears only when the application is starting the IE process.

If the application is starting the IE process, IE does not have the rights to start Excel.

Probable Solutions:

Change the .NET security settings for the application that is starting IE so IE can start Excel? But where and how?

Change the security settings for IE so IE can start Excel even if IE is started by another process? But where and how?

Change the zone security settings for the web server running MS SQL Reporting Services?


Environment:
OS: Windows 2003 Server
.NET Framework version: 1.1
IE version: 6.0

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top