-
Access denied error HELP!!!
I created this COM component that works beautifully so long as it is all on
the same computer.
Basically what I have is a activeX exe that runs a bunch of batch files on
a server(starting services and
submitting requests to various services) and then a front end that calls
this COM object.
When the front end is on the server with the COM object, it all runs beautifully.
However, when I put it on a different machine, it errors out and says memory
cannot be read and when I open
it in the VisC++ debugger I see the error as Access Denied. I did a step
through on a remote machine
and see that it is in fact creating the object however, when it invokes a
method this error happens.
I've tried everything I can think of to get this work. The tbl and vbr file
for the COM object that is on
the remote machine is from the same build as the COM object.
Any suggestions on how to fix this are GREATLY appreciated.
-
Re: Access denied error HELP!!!
Ryan,
You cna either set up the server(ActiveX Exe) on MTS or DCOM, or you can
try using CreatObject(ProgID, RemoteMachineName) in the client code to create
the object remotely.
HTH
Michael
"Ryan" <ryjaz@yahoo.com> wrote:
>
>I created this COM component that works beautifully so long as it is all
on
>the same computer.
>Basically what I have is a activeX exe that runs a bunch of batch files
on
>a server(starting services and
>submitting requests to various services) and then a front end that calls
>this COM object.
>When the front end is on the server with the COM object, it all runs beautifully.
>
>However, when I put it on a different machine, it errors out and says memory
>cannot be read and when I open
>it in the VisC++ debugger I see the error as Access Denied. I did a step
>through on a remote machine
>and see that it is in fact creating the object however, when it invokes
a
>method this error happens.
>I've tried everything I can think of to get this work. The tbl and vbr
file
>for the COM object that is on
>the remote machine is from the same build as the COM object.
>
>Any suggestions on how to fix this are GREATLY appreciated.
-
Re: Access denied error HELP!!!
I have set up the server to use dcom using dcomcfg on the server setting all
permissions(edit, launch and
configure) to everyone and the identity to be a superuser account that has
full administrative powers. On
the client workstation I have also installed the vbr and tlb file for the
ActiveX and registered the vbr file
via clireg utility.
on the client side the snippet it goes through is this
Dim objServer As clsSSFunctions
On Error Resume Next
Set objServer = CreateObject("SSServer.clsSSFunctions", SNASERVER)
If Err.Number <> 0 Then
MsgBox Err.Number & ": " & Err.Description, , "Server Error"
Exit Sub
End If
objServer.StartSNAServer
The program doesn't crash until until the StartSNAServer method is invoked.
This same code works
perfectly when it is installed on the server itself (SNASERVER) so I know
it is not the method itself that
is causing the crash (the method in fact is only a shell command to start
a service on the server).
Is there some step I am missing somewhere? Thank in advance...
"Michael Egbert" <egbertmr@msn.com> wrote:
>
>Ryan,
>You cna either set up the server(ActiveX Exe) on MTS or DCOM, or you can
>try using CreatObject(ProgID, RemoteMachineName) in the client code to create
>the object remotely.
>
>HTH
>Michael
>
>
>
>"Ryan" <ryjaz@yahoo.com> wrote:
>>
>>I created this COM component that works beautifully so long as it is all
>on
>>the same computer.
>>Basically what I have is a activeX exe that runs a bunch of batch files
>on
>>a server(starting services and
>>submitting requests to various services) and then a front end that calls
>>this COM object.
>>When the front end is on the server with the COM object, it all runs beautifully.
>>
>>However, when I put it on a different machine, it errors out and says memory
>>cannot be read and when I open
>>it in the VisC++ debugger I see the error as Access Denied. I did a step
>>through on a remote machine
>>and see that it is in fact creating the object however, when it invokes
>a
>>method this error happens.
>>I've tried everything I can think of to get this work. The tbl and vbr
>file
>>for the COM object that is on
>>the remote machine is from the same build as the COM object.
>>
>>Any suggestions on how to fix this are GREATLY appreciated.
>
-
Re: Access denied error HELP!!!
Ryan,
Is the StartSNAServer method fireing on the server or the client? Just an
idea that it may be trying to fire on the client machine when it needs to
fire on the remote machine. But still the Access denied error probably has
someting to do with security on the server object.
Michael
"Ryan" <ryjaz@yahoo.com> wrote:
>
>I have set up the server to use dcom using dcomcfg on the server setting
all
>permissions(edit, launch and
>configure) to everyone and the identity to be a superuser account that has
>full administrative powers. On
>the client workstation I have also installed the vbr and tlb file for the
>ActiveX and registered the vbr file
>via clireg utility.
>on the client side the snippet it goes through is this
>
> Dim objServer As clsSSFunctions
>
> On Error Resume Next
> Set objServer = CreateObject("SSServer.clsSSFunctions", SNASERVER)
> If Err.Number <> 0 Then
> MsgBox Err.Number & ": " & Err.Description, , "Server Error"
> Exit Sub
> End If
>
> objServer.StartSNAServer
>
> The program doesn't crash until until the StartSNAServer method is invoked.
> This same code works
>perfectly when it is installed on the server itself (SNASERVER) so I know
>it is not the method itself that
>is causing the crash (the method in fact is only a shell command to start
>a service on the server).
>
>Is there some step I am missing somewhere? Thank in advance...
>
>"Michael Egbert" <egbertmr@msn.com> wrote:
>>
>>Ryan,
>>You cna either set up the server(ActiveX Exe) on MTS or DCOM, or you can
>>try using CreatObject(ProgID, RemoteMachineName) in the client code to
create
>>the object remotely.
>>
>>HTH
>>Michael
>>
>>
>>
>>"Ryan" <ryjaz@yahoo.com> wrote:
>>>
>>>I created this COM component that works beautifully so long as it is all
>>on
>>>the same computer.
>>>Basically what I have is a activeX exe that runs a bunch of batch files
>>on
>>>a server(starting services and
>>>submitting requests to various services) and then a front end that calls
>>>this COM object.
>>>When the front end is on the server with the COM object, it all runs beautifully.
>>>
>>>However, when I put it on a different machine, it errors out and says
memory
>>>cannot be read and when I open
>>>it in the VisC++ debugger I see the error as Access Denied. I did a step
>>>through on a remote machine
>>>and see that it is in fact creating the object however, when it invokes
>>a
>>>method this error happens.
>>>I've tried everything I can think of to get this work. The tbl and vbr
>>file
>>>for the COM object that is on
>>>the remote machine is from the same build as the COM object.
>>>
>>>Any suggestions on how to fix this are GREATLY appreciated.
>>
>
-
Re: Access denied error HELP!!!
Ryan,
This memory problem will come due to version compatibility of the server
component.
Bad things usually happen when a client and Server component disagree on
how to pass a parameter during the invocation of a method call. Your client
can easily crash with unsightly system-generated error messages like "memory
could not read".
When system generated error message like "memory could not be read" pops
up, the best thing to do is modify your source code for server to make it
compatible with earlier versions of the server. Else recompile the client
source code with refering latest server component and then run as usual.
May be this will solve your problem.
Version compatibility issue comes when the IIDs and Type library version
of Server components changed. That means if Server code is compiled with
different version option after using it in a client. If you need any more
explanation then send me mail with your bunch of questions to this mail a/c
bhamireddy@yahoo.com.
Let us know your feedback.
Best wishes,
Bhami.
"Ryan" <ryjaz@yahoo.com> wrote:
>
>I created this COM component that works beautifully so long as it is all
on
>the same computer.
>Basically what I have is a activeX exe that runs a bunch of batch files
on
>a server(starting services and
>submitting requests to various services) and then a front end that calls
>this COM object.
>When the front end is on the server with the COM object, it all runs beautifully.
>
>However, when I put it on a different machine, it errors out and says memory
>cannot be read and when I open
>it in the VisC++ debugger I see the error as Access Denied. I did a step
>through on a remote machine
>and see that it is in fact creating the object however, when it invokes
a
>method this error happens.
>I've tried everything I can think of to get this work. The tbl and vbr
file
>for the COM object that is on
>the remote machine is from the same build as the COM object.
>
>Any suggestions on how to fix this are GREATLY appreciated.
-
Re: Access denied error HELP!!!
Thanx alot for the help on here and via email. The app is now working though
I must admit I am
slightly puzzled by why it works now. To get it working, I removed the reference
to the activex object
on the client program and then declared the object as an object as opposed
to using declaring it as
specificallly as the activex object. As a clarifier the old way that caused
the error:
Dim objServer As SSServer.clsServerFuncs
Set objServer = CreateObject("SSServer.clsServerFuncs", SNASERVER)
The new error free and totally works way:
Dim objServer As Object
Set objServer = CreateObject("SSServer.clsServerFuncs", SNASERVER)
The first way required that the client reference the tbl file directly whereas
the new way just requires that
the tbl file be on the machine. Again, I am kinda clueless as to why this
is so but happy that it works
now. If anyone can clarify why it works now I would be appreciative.
"Bhami Reddy" <bhamireddy@yahoo.com> wrote:
>
>Ryan,
>
>This memory problem will come due to version compatibility of the server
>component.
>
>Bad things usually happen when a client and Server component disagree on
>how to pass a parameter during the invocation of a method call. Your client
>can easily crash with unsightly system-generated error messages like "memory
>could not read".
>
>When system generated error message like "memory could not be read" pops
>up, the best thing to do is modify your source code for server to make it
>compatible with earlier versions of the server. Else recompile the client
>source code with refering latest server component and then run as usual.
>May be this will solve your problem.
>
>Version compatibility issue comes when the IIDs and Type library version
>of Server components changed. That means if Server code is compiled with
>different version option after using it in a client. If you need any more
>explanation then send me mail with your bunch of questions to this mail
a/c
>bhamireddy@yahoo.com.
>
>Let us know your feedback.
>
>Best wishes,
>Bhami.
>
>
>"Ryan" <ryjaz@yahoo.com> wrote:
>>
>>I created this COM component that works beautifully so long as it is all
>on
>>the same computer.
>>Basically what I have is a activeX exe that runs a bunch of batch files
>on
>>a server(starting services and
>>submitting requests to various services) and then a front end that calls
>>this COM object.
>>When the front end is on the server with the COM object, it all runs beautifully.
>>
>>However, when I put it on a different machine, it errors out and says memory
>>cannot be read and when I open
>>it in the VisC++ debugger I see the error as Access Denied. I did a step
>>through on a remote machine
>>and see that it is in fact creating the object however, when it invokes
>a
>>method this error happens.
>>I've tried everything I can think of to get this work. The tbl and vbr
>file
>>for the COM object that is on
>>the remote machine is from the same build as the COM object.
>>
>>Any suggestions on how to fix this are GREATLY appreciated.
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks