ShellExecute command for ASP.NET?

G

Guest

Is there an equivalent ShellExecute() command (like in VB/VC apps) for
opening up Excel files from within ASP.NET web application.

I create an Excel format of a crystal report. I'd like to next open this up
in separate process from ASP.NET web app.
 
G

Girish Bharadwaj

Not really. You can potentially write a client VB script that might be able
to execute some such thing but you will need a *lot* of privileges on that
client box to do that.
More over, having an ASP.NET web app do this is not very good idea. You
might want re-consider what you would like to do.
 
N

nyousfi

Hi,

I hope someone could tell me what permissions I need to give to the
client box so Client Controls can execute the Shell() Command?

Thanks for your help in advance
 
N

nyousfi

Hi,

I hope someone could tell me what permissions I need to give to the
client box so Client Controls can execute the Shell() Command?

Thanks for your help in advance
 
P

Patrice

Do you want to open the Excel file client side or server side ?

Server side you could use the Process class would do it, but this is
generally not recommended.
Client side, just have a link or stream the file to the browser...

Patrice
 
E

Eric

DavidS said:
Is there an equivalent ShellExecute() command (like in VB/VC apps)
for opening up Excel files from within ASP.NET web application.

I create an Excel format of a crystal report. I'd like to next open
this up in separate process from ASP.NET web app.

I'm assuming you want Excel launched on the client computer, right?

Do some web searches for the Office Web Components (OWC).

Eric
 
N

nyousfi

Thanks for your reply

The code I have is a client side. I want a separate window to open a
web link e.g. www.microsoft.com.

For more details see my other post.

Thanks for your help.
 
K

Kevin Spencer

Not sure who you're replying to, and I certainly don't know where to find
your other post. But if all you want is a link to open in a new window on
the client, use the "target" attribute of the hyperlink. Example:

<a href="http://www.microsoft.com" target="_blank">Click to see
Microsoft.com</a>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
N

nyousfi

I'm not after the HTML code as I knew that already. The code I'm
after is deffinately the shell command i.e.
Shell("http://www.yahoo.com") because I'm writing a client control
not a HTML/ASP file.

About my other post, you have already posted a reply to it so you must
have seen it. It goes into a little more detail about my problem but
here's an explanation.

I have a client control that is downloaded to the client when they use
my application, the control is written in VB.NET and it compiles as a
DLL. This control needs certain permissions to execute the Shell
command as it can be quite dangerous and I just need to know how to
set these permissions....

I hope that makes more sense, any help from anyone will be
appreciated.

Thanks
 
K

Kevin Spencer

Ah. Understood.

How do you expect to change permissions on the client machine? I think what
you need, if you want to execute anything on the client, is an ActiveX
Control, Java Applet, or some other type of executable on the client.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
G

Guest

I've done research and use COM Interop to faciliate communication.

Basically - I get a permission issue when I run this on the IIS
server.Error: Exception of type System.Web.HttpUnhandledException was thrown.
Access is denied.

sample code...
Dim ExcelObj As New Excel.ApplicationClass() - get permission problem here!
Dim ExcelDoc As Excel.Workbooks
ExcelDoc = ExcelObj.Workbooks
ExcelDoc.Open( _ExcelFile )
ExcelObj.Visible = True

Again - I don't want to have <identify impersonate="true"> in web config
file. Is there a solution
 
N

nyousfi

Kevin Spencerwrote:
Ah. Understood.
How do you expect to change permissions on the client machine? I think what
you need, if you want to execute anything on the client, is an ActiveX
Control, Java Applet, or some other type of executable on the client.

I have access to all clients i.e. all the machines on the network so
changing permissions isn't an issue. I just don't know how to change
them, right now I'm only interested in my development machine

Thanks
 
K

Kevin Spencer

Hi nyousfi,

I tend to think that you would be better off in that case with an embedded
..Net form, ActiveX control, or similar. Makes extensibility much easier.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top