?
Solved

SHDocVw.InternetExplorer from asp.net 2.0 or sql server 2005

Posted on 2009-04-27
6
Medium Priority
?
280 Views
Last Modified: 2012-05-06
hi all
i made a Console that is loging in to a website to get information and i am using SHDocVw.InternetExplorer
 and the code in the console is

Dim MyInternet As New SHDocVw.InternetExplorer
MyInternet.Navigate("External_Site.com")

and then on my web site i want a user to press a button that will execute this console
and the code i use is

Dim Proc As New Diagnostics.Process
 Proc.StartInfo.FileName = "C:\MyFiles\MyProgram.exe"
Proc.StartInfo.Arguments = "123"
Proc.Start()

so when i run the site locally on the server it works fine, but when i come to my site from outside it gives an error, i have set the permission from the console to everyone but i the error happens when the console comes to

Dim MyInternet As New SHDocVw.InternetExplorer

looks like i dont have permission to InternetExplorer

i tried

 Proc.StartInfo.UserName = sUser
Proc.StartInfo.Password = sPassword

but no luck

i also tried to run this console from SQL server using exec master..xp_cmdshell
but the same think i get access denied when the console gets to this line

Dim MyInternet As New SHDocVw.InternetExplorer


0
Comment
Question by:mbacs
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:spprivate
ID: 24245879
You need to give admin rights to the user to execute exes in IIS.
But it is pretty risky
0
 
LVL 2

Author Comment

by:mbacs
ID: 24246400
and how do i do that?
0
 
LVL 15

Accepted Solution

by:
spprivate earned 2000 total points
ID: 24250850
Now where does this exe lies.In the IIS right.
So create an user in the web server and give him admin rights.
So something like a service account or app user.Then from your app pass that credentials.

Also you need to take care of few more things

http://dotnetslackers.com/Community/blogs/haissam/archive/2007/02/02/Run-Executable-file-in-ASP.NET.aspx
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
LVL 2

Author Comment

by:mbacs
ID: 24251943
iis dose have permission to run the console, but the problem is that it don't have permission to use the "SHDocVw.InternetExplorer" object, so where can i give  permission for that?

(the console dose start but when it gets to create the InternetExplorer object then it falls)
0
 
LVL 15

Expert Comment

by:spprivate
ID: 24252560
0
 
LVL 2

Author Comment

by:mbacs
ID: 24261045
you helped me a lot thanks
but its still not working, i changed from using SHDocVw.InternetExplorer to HttpWebRequest / HttpWebResponse and i am requesting from asp.net and not calling a console
but i still have almost the same problem so i opened a new question

http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_24365666.html

thanks again
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question