473,412 Members | 2,072 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

CreateObject("Excel.Application",MyServer)

KC
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?
Thanks,
CK
Nov 16 '05 #1
5 9326
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*****@hotmail.com> wrote in message
news:OA**************@TK2MSFTNGP15.phx.gbl...
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?
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.com> wrote
in message news:u2**************@TK2MSFTNGP15.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*****@hotmail.com> wrote in message
news:OA**************@TK2MSFTNGP15.phx.gbl...
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?
Thanks,
CK

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

¤ 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?
¤ 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******@ameritech.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("Excel.Application",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.com> wrote
in message news:u2**************@TK2MSFTNGP15.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*****@hotmail.com> wrote in message
news:OA**************@TK2MSFTNGP15.phx.gbl...
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?
Thanks,
CK

Nov 16 '05 #5
KC
Hi,
I finally got the CreateObject("Excel.Application",\\MyServer) working but I
have another serious problem.
I open the Excel.Application 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.Application
Dim objWorkBook As Excel.Workbook
Dim objWorkSheet As Excel.Worksheet
Dim objRange As Excel.Range
objExcelApp = CType(CreateObject("Excel.Application",
ConfigurationSettings.AppSettings("AppServer")), Excel.Application)
objExcelApp.DisplayAlerts = False
objWorkBook = CType(objExcelApp.Workbooks.Add(WorkBookPath), Excel.Workbook)
objWorkSheet =
CType(objWorkBook.Worksheets(ConfigurationSettings .AppSettings("WorkSheetPat
h")), Excel.Worksheet)
''Do the processing......................

ReleaseComObject(objWorkSheet)
ReleaseComObject(objWorkBook)
ReleaseComObject(objExcelApp)

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

If Not IsNothing(objExcelApp) Then
objExcelApp.DisplayAlerts = False
objExcelApp.Quit()
objExcelApp = Nothing
End If

GC.Collect()


"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:u2**************@TK2MSFTNGP15.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*****@hotmail.com> wrote in message
news:OA**************@TK2MSFTNGP15.phx.gbl...
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?
Thanks,
CK

Nov 16 '05 #6

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

Similar topics

5
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 =...
4
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...
2
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 =...
2
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:...
0
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...
5
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...
0
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...
1
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
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 =...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.