473,769 Members | 6,926 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CreateObject("E xcel.Applicatio n",MyServer)

KC
Hi,
I have code similar to this..
Dim xlApp As Object
xlApp = CreateObject("E xcel.Applicatio n", "\\MyServer ")

The call is from a asp.net (Intranet) application. \\Myserver is a network
computer in the same domain as web server. The only way I can get this call
worked is when I add the user who logs on to the web site as Administrators.
I need to get this working without having to make the user administrator.
Any suggestion?
Thanks,
CK
Nov 16 '05 #1
5 9372
Hi KC,

You can grant permissions to the user your ASP .NET app runs under to access
the Excel COM server by running dcomcnfg on the "MyServer" machine. For
this, the aforementioned user should be a domain user. You could possibly
also impersonate a domain user with enough permissions before instantiating
and using the Excel object.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"KC" <ch*****@hotmai l.com> wrote in message
news:OA******** ******@TK2MSFTN GP15.phx.gbl...
Hi,
I have code similar to this..
Dim xlApp As Object
xlApp = CreateObject("E xcel.Applicatio n", "\\MyServer ")

The call is from a asp.net (Intranet) application. \\Myserver is a network
computer in the same domain as web server. The only way I can get this
call
worked is when I add the user who logs on to the web site as
Administrators.
I need to get this working without having to make the user administrator.
Any suggestion?
Thanks,
CK


Nov 16 '05 #2
Please do not include VB "classic" newsgroups for a VB.Net question. They're
not the same

Tony Proctor

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.c om> wrote
in message news:u2******** ******@TK2MSFTN GP15.phx.gbl...
Hi KC,

You can grant permissions to the user your ASP .NET app runs under to access the Excel COM server by running dcomcnfg on the "MyServer" machine. For
this, the aforementioned user should be a domain user. You could possibly
also impersonate a domain user with enough permissions before instantiating and using the Excel object.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"KC" <ch*****@hotmai l.com> wrote in message
news:OA******** ******@TK2MSFTN GP15.phx.gbl...
Hi,
I have code similar to this..
Dim xlApp As Object
xlApp = CreateObject("E xcel.Applicatio n", "\\MyServer ")

The call is from a asp.net (Intranet) application. \\Myserver is a network computer in the same domain as web server. The only way I can get this
call
worked is when I add the user who logs on to the web site as
Administrators.
I need to get this working without having to make the user administrator. Any suggestion?
Thanks,
CK

Nov 16 '05 #3
On Tue, 28 Sep 2004 13:24:56 -0700, "KC" <ch*****@hotmai l.com> wrote:

¤ Hi,
¤ I have code similar to this..
¤ Dim xlApp As Object
¤ xlApp = CreateObject("E xcel.Applicatio n", "\\MyServer ")
¤
¤ The call is from a asp.net (Intranet) application. \\Myserver is a network
¤ computer in the same domain as web server. The only way I can get this call
¤ worked is when I add the user who logs on to the web site as Administrators.
¤ I need to get this working without having to make the user administrator.
¤ Any suggestion?
¤ Thanks,
¤ CK

I would recommend checking out the following article:

INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/default...b;en-us;257757
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)
Nov 16 '05 #4
KC
Yes, I added the domain user under dcomcnfg on MyServer and I am able to
pass CreateObject("E xcel.Applicatio n",MyServer) . But once I do
xlApp.Workbooks .Add(Path), this is where it is choking. The user has access
to "Path" and the excel file..

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.c om> wrote
in message news:u2******** ******@TK2MSFTN GP15.phx.gbl...
Hi KC,

You can grant permissions to the user your ASP .NET app runs under to access the Excel COM server by running dcomcnfg on the "MyServer" machine. For
this, the aforementioned user should be a domain user. You could possibly
also impersonate a domain user with enough permissions before instantiating and using the Excel object.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"KC" <ch*****@hotmai l.com> wrote in message
news:OA******** ******@TK2MSFTN GP15.phx.gbl...
Hi,
I have code similar to this..
Dim xlApp As Object
xlApp = CreateObject("E xcel.Applicatio n", "\\MyServer ")

The call is from a asp.net (Intranet) application. \\Myserver is a network computer in the same domain as web server. The only way I can get this
call
worked is when I add the user who logs on to the web site as
Administrators.
I need to get this working without having to make the user administrator. Any suggestion?
Thanks,
CK

Nov 16 '05 #5
KC
Hi,
I finally got the CreateObject("E xcel.Applicatio n",\\MyServe r) working but I
have another serious problem.
I open the Excel.Applicati on in remoter server and open the workbook and
read and process the data. But the process is done, the Excel instance
doesn't close and it creates a new instance every time. Here is my code.

Please help..

Dim objExcelApp As Excel.Applicati on
Dim objWorkBook As Excel.Workbook
Dim objWorkSheet As Excel.Worksheet
Dim objRange As Excel.Range
objExcelApp = CType(CreateObj ect("Excel.Appl ication",
ConfigurationSe ttings.AppSetti ngs("AppServer" )), Excel.Applicati on)
objExcelApp.Dis playAlerts = False
objWorkBook = CType(objExcelA pp.Workbooks.Ad d(WorkBookPath) , Excel.Workbook)
objWorkSheet =
CType(objWorkBo ok.Worksheets(C onfigurationSet tings.AppSettin gs("WorkSheetPa t
h")), Excel.Worksheet )
''Do the processing..... ............... ..

ReleaseComObjec t(objWorkSheet)
ReleaseComObjec t(objWorkBook)
ReleaseComObjec t(objExcelApp)

objRange = Nothing
objWorkBook = Nothing
objWorkSheet = Nothing
objExcelApp = nothing

If Not IsNothing(objEx celApp) Then
objExcelApp.Dis playAlerts = False
objExcelApp.Qui t()
objExcelApp = Nothing
End If

GC.Collect()


"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.c om> wrote
in message news:u2******** ******@TK2MSFTN GP15.phx.gbl...
Hi KC,

You can grant permissions to the user your ASP .NET app runs under to access the Excel COM server by running dcomcnfg on the "MyServer" machine. For
this, the aforementioned user should be a domain user. You could possibly
also impersonate a domain user with enough permissions before instantiating and using the Excel object.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"KC" <ch*****@hotmai l.com> wrote in message
news:OA******** ******@TK2MSFTN GP15.phx.gbl...
Hi,
I have code similar to this..
Dim xlApp As Object
xlApp = CreateObject("E xcel.Applicatio n", "\\MyServer ")

The call is from a asp.net (Intranet) application. \\Myserver is a network computer in the same domain as web server. The only way I can get this
call
worked is when I add the user who logs on to the web site as
Administrators.
I need to get this working without having to make the user administrator. Any suggestion?
Thanks,
CK

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
13573
by: The Roys | last post by:
Hi Im doing something wrong in quitting the Word.Application in my VB program. I have General Declarations Dim AppWord As Word.Application Form_Load() Set AppWord = CreateObject("Word.Application")
4
16188
by: Microsoft | last post by:
I'm trying to display a word document inside a web page, but everytime I do I get this error: Error Type: Microsoft VBScript runtime (0x800A0046) Permission denied: 'CreateObject' Does anybody know the correct way to do this? I don't want to link to a document, but rather display a word file inside the asp page.
2
10245
by: MaxiWheat | last post by:
Hi, I am using a software that uses MS Word to create PDF files. When I try to run the sample code (ASP 3.0), I get an error on this statement : Set oWord = Server.CreateObject("Word.Application") That error says : The call to Server.CreateObject failed while checking permissions. Access is denied to this object.
2
5511
by: POLILOP | last post by:
When i try to do this Dim ExcelFace Set ExcelFace = CreateObject("Excel.Sheet") ......... the browser says this Error Type: Microsoft VBScript runtime (0x800A0046) Permission denied: 'CreateObject'
0
1541
by: Svet | last post by:
CreateObject("Excel.Application") on NT 4.0 hangs and I have to kill the Access 97 app that it is running on. The same code works fine as a stand alone code. This occurs on users' machines thatt have weird builds and I was wondering if anyone has seen this and can shed some light what I can look into. Thanks.
5
4747
by: KC | last post by:
Hi, I have code similar to this.. Dim xlApp As Object xlApp = CreateObject("Excel.Application", "\\MyServer") The call is from a asp.net (Intranet) application. \\Myserver is a network computer in the same domain as web server. The only way I can get this call worked is when I add the user who logs on to the web site as Administrators. I need to get this working without having to make the user administrator. Any suggestion?
0
10168
by: mammucion | last post by:
Trying to automate processing 80,000 data sets through 15 web pages. Application URL creates a new IE instance in which runs first a login form and then runs the rest of the pages in the new window. I can connect to a running Excel instance and obtain information from the Excel DOM. I cannot do the same with Internet Explorer. However, I can successfully create an new IE instance and manipulate it. Using an application that has its own...
1
4868
by: David Di Donato | last post by:
hi i have a big problem. i have an asp file with the following source code.... ****** Set r_ = Server.CreateObject ("Access.Application.10") s1 = "DoAnything()" with r_
1
2262
by: Ultima | last post by:
I'm trying to create an Excel file using a VB program. I have added the reference to Excel Object Library yet when I try to compile it, I get an error at the line exc_app = CreateObject("Excel.Application") System.Exception was unhandled Message="The remote server machine does not exist or is unavailable." Source="Microsoft.VisualBasic" StackTrace: Do I need to turn on some kind of service in order to get this working?
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5309
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3565
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.