By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,903 Members | 2,075 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,903 IT Pros & Developers. It's quick & easy.

Impersonation woes

P: n/a
From a webpage, I am calling a com object which needs to read a file. It
keeps throwing access denied errors. I am stumped. I think I have tried
everything I know what to do. The webpage can read the file. Just fine. The
com object can't.

Create user group.
Impersonate user.
User has full rights to directory
added everyone - full rights. no joy
added admin - full rights no joy
message box tells me that the page is executing under that user. no joy
full rights to every user group i can find on the system. no joy
ditch impersonation, admin rights to everybody. no joy
message box tells me that the page is executing under network services
give network services full rights. no joy
share folder no joy
create web sharing apply permissions no joy
the com object can read the system and event logs without problem
the com object can read the log file if fired from a dos prompt on the
server

why me lowd. why me?????

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Alvin,

have you tried upping your asp rights in machine config.

Try setting the process model username to system
userName="SYSTEM"

Sounds to me like your com object is expecting to find a window of some type
to enable it to run, and cant find a window. Out of curiosity - I wonder
what would happen if you use process.start cmd/com thing from asp.net rather
than trying to invoke com from within asp.net

Regards

John Timney
Microsoft Regional Director
Microsoft MVP

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:uL**************@TK2MSFTNGP10.phx.gbl...
From a webpage, I am calling a com object which needs to read a file. It
keeps throwing access denied errors. I am stumped. I think I have tried
everything I know what to do. The webpage can read the file. Just fine. The com object can't.

Create user group.
Impersonate user.
User has full rights to directory
added everyone - full rights. no joy
added admin - full rights no joy
message box tells me that the page is executing under that user. no joy
full rights to every user group i can find on the system. no joy
ditch impersonation, admin rights to everybody. no joy
message box tells me that the page is executing under network services
give network services full rights. no joy
share folder no joy
create web sharing apply permissions no joy
the com object can read the system and event logs without problem
the com object can read the log file if fired from a dos prompt on the
server

why me lowd. why me?????

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok

Nov 18 '05 #2

P: n/a
> have you tried upping your asp rights in machine config.
Yes. No joy.

Out of curiosity - I wonder
what would happen if you use process.start cmd/com thing from asp.net
rather
than trying to invoke com from within asp.net This also fails with an access denied.

Microsoft also doesn't support the com object (logparser) so i won't even be
able to open a support ticket.

This is the call that blows:

MSUtil.LogQueryClassClass log = new LogQueryClassClass();
MSUtil.ILogRecordset records = log.Execute(@"select cs-uri-stem from
C:\WINDOWS\system32\LogFiles\W3SVC230775414\ex0305 15.log group by
cs-uri-stem", null);

The com object is logparser available with win2k and up or at logparser.com.
This call will work without a problem on my machine. But not on the server.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"John Timney (Microsoft MVP)" <ti*****@despammed.com> wrote in message
news:O4**************@tk2msftngp13.phx.gbl... Alvin,

have you tried upping your asp rights in machine config.

Try setting the process model username to system
userName="SYSTEM"

Sounds to me like your com object is expecting to find a window of some
type
to enable it to run, and cant find a window. Out of curiosity - I wonder
what would happen if you use process.start cmd/com thing from asp.net
rather
than trying to invoke com from within asp.net

Regards

John Timney
Microsoft Regional Director
Microsoft MVP

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:uL**************@TK2MSFTNGP10.phx.gbl...
From a webpage, I am calling a com object which needs to read a file. It
keeps throwing access denied errors. I am stumped. I think I have tried
everything I know what to do. The webpage can read the file. Just fine.

The
com object can't.

Create user group.
Impersonate user.
User has full rights to directory
added everyone - full rights. no joy
added admin - full rights no joy
message box tells me that the page is executing under that user. no joy
full rights to every user group i can find on the system. no joy
ditch impersonation, admin rights to everybody. no joy
message box tells me that the page is executing under network services
give network services full rights. no joy
share folder no joy
create web sharing apply permissions no joy
the com object can read the system and event logs without problem
the com object can read the log file if fired from a dos prompt on the
server

why me lowd. why me?????

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok


Nov 18 '05 #3

P: n/a
Sounds like your stuck.

I've worked round this type of impossible thing to do in web srever world
before by having a socket listener running on the desktop and actually
invoking windowed type things via that - implies you have a logged in user
on your server which is kind of hacky but it requires no permissions or
impersonation and bypasses the web restrictions.

You might be able to find out who write it at MS if you drop a line into the
pivate groups.

Regards

John Timney
Microsoft Regional Director
Microsoft MVP

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:er**************@TK2MSFTNGP12.phx.gbl...
have you tried upping your asp rights in machine config. Yes. No joy.

Out of curiosity - I wonder
what would happen if you use process.start cmd/com thing from asp.net
rather
than trying to invoke com from within asp.net

This also fails with an access denied.

Microsoft also doesn't support the com object (logparser) so i won't even

be able to open a support ticket.

This is the call that blows:

MSUtil.LogQueryClassClass log = new LogQueryClassClass();
MSUtil.ILogRecordset records = log.Execute(@"select cs-uri-stem from
C:\WINDOWS\system32\LogFiles\W3SVC230775414\ex0305 15.log group by
cs-uri-stem", null);

The com object is logparser available with win2k and up or at logparser.com. This call will work without a problem on my machine. But not on the server.
--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"John Timney (Microsoft MVP)" <ti*****@despammed.com> wrote in message
news:O4**************@tk2msftngp13.phx.gbl...
Alvin,

have you tried upping your asp rights in machine config.

Try setting the process model username to system
userName="SYSTEM"

Sounds to me like your com object is expecting to find a window of some
type
to enable it to run, and cant find a window. Out of curiosity - I wonder what would happen if you use process.start cmd/com thing from asp.net
rather
than trying to invoke com from within asp.net

Regards

John Timney
Microsoft Regional Director
Microsoft MVP

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:uL**************@TK2MSFTNGP10.phx.gbl...
From a webpage, I am calling a com object which needs to read a file. It keeps throwing access denied errors. I am stumped. I think I have tried
everything I know what to do. The webpage can read the file. Just fine.

The
com object can't.

Create user group.
Impersonate user.
User has full rights to directory
added everyone - full rights. no joy
added admin - full rights no joy
message box tells me that the page is executing under that user. no joy
full rights to every user group i can find on the system. no joy
ditch impersonation, admin rights to everybody. no joy
message box tells me that the page is executing under network services
give network services full rights. no joy
share folder no joy
create web sharing apply permissions no joy
the com object can read the system and event logs without problem
the com object can read the log file if fired from a dos prompt on the
server

why me lowd. why me?????

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok



Nov 18 '05 #4

P: n/a
John,
look at my eyes. can you tell i have been up all night?

your socket idea gave me a clue so i impersonated to an authenticated user
on the machine and boom. candy....

Apparently, asp.net only allows authenticated users to do that kind of
thing - makes sense too.

thanks for everything

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"John Timney (Microsoft MVP)" <ti*****@despammed.com> wrote in message
news:e3**************@TK2MSFTNGP11.phx.gbl...
Sounds like your stuck.

I've worked round this type of impossible thing to do in web srever world
before by having a socket listener running on the desktop and actually
invoking windowed type things via that - implies you have a logged in user
on your server which is kind of hacky but it requires no permissions or
impersonation and bypasses the web restrictions.

You might be able to find out who write it at MS if you drop a line into
the
pivate groups.

Regards

John Timney
Microsoft Regional Director
Microsoft MVP

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:er**************@TK2MSFTNGP12.phx.gbl...
> have you tried upping your asp rights in machine config.

Yes. No joy.

Out of curiosity - I wonder
> what would happen if you use process.start cmd/com thing from asp.net
> rather
> than trying to invoke com from within asp.net

This also fails with an access denied.

Microsoft also doesn't support the com object (logparser) so i won't even

be
able to open a support ticket.

This is the call that blows:

MSUtil.LogQueryClassClass log = new LogQueryClassClass();
MSUtil.ILogRecordset records = log.Execute(@"select cs-uri-stem from
C:\WINDOWS\system32\LogFiles\W3SVC230775414\ex0305 15.log group by
cs-uri-stem", null);

The com object is logparser available with win2k and up or at

logparser.com.
This call will work without a problem on my machine. But not on the

server.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"John Timney (Microsoft MVP)" <ti*****@despammed.com> wrote in message
news:O4**************@tk2msftngp13.phx.gbl...
> Alvin,
>
> have you tried upping your asp rights in machine config.
>
> Try setting the process model username to system
> userName="SYSTEM"
>
> Sounds to me like your com object is expecting to find a window of some
> type
> to enable it to run, and cant find a window. Out of curiosity - I wonder > what would happen if you use process.start cmd/com thing from asp.net
> rather
> than trying to invoke com from within asp.net
>
> Regards
>
> John Timney
> Microsoft Regional Director
> Microsoft MVP
>
> "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
> news:uL**************@TK2MSFTNGP10.phx.gbl...
>> From a webpage, I am calling a com object which needs to read a file. It >> keeps throwing access denied errors. I am stumped. I think I have
>> tried
>> everything I know what to do. The webpage can read the file. Just
>> fine.
> The
>> com object can't.
>>
>> Create user group.
>> Impersonate user.
>> User has full rights to directory
>> added everyone - full rights. no joy
>> added admin - full rights no joy
>> message box tells me that the page is executing under that user. no
>> joy
>> full rights to every user group i can find on the system. no joy
>> ditch impersonation, admin rights to everybody. no joy
>> message box tells me that the page is executing under network services
>> give network services full rights. no joy
>> share folder no joy
>> create web sharing apply permissions no joy
>> the com object can read the system and event logs without problem
>> the com object can read the log file if fired from a dos prompt on the
>> server
>>
>> why me lowd. why me?????
>>
>> --
>> Regards,
>> Alvin Bruney
>> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
>> Got tidbits? Get it here... http://tinyurl.com/27cok
>>
>>
>
>



Nov 18 '05 #5

P: n/a
A result ............... hooray!!!

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:Oi**************@TK2MSFTNGP12.phx.gbl...
John,
look at my eyes. can you tell i have been up all night?

your socket idea gave me a clue so i impersonated to an authenticated user
on the machine and boom. candy....

Apparently, asp.net only allows authenticated users to do that kind of
thing - makes sense too.

thanks for everything

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"John Timney (Microsoft MVP)" <ti*****@despammed.com> wrote in message
news:e3**************@TK2MSFTNGP11.phx.gbl...
Sounds like your stuck.

I've worked round this type of impossible thing to do in web srever world before by having a socket listener running on the desktop and actually
invoking windowed type things via that - implies you have a logged in user on your server which is kind of hacky but it requires no permissions or
impersonation and bypasses the web restrictions.

You might be able to find out who write it at MS if you drop a line into
the
pivate groups.

Regards

John Timney
Microsoft Regional Director
Microsoft MVP

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:er**************@TK2MSFTNGP12.phx.gbl...
> have you tried upping your asp rights in machine config.
Yes. No joy.

Out of curiosity - I wonder
> what would happen if you use process.start cmd/com thing from asp.net
> rather
> than trying to invoke com from within asp.net
This also fails with an access denied.

Microsoft also doesn't support the com object (logparser) so i won't even
be
able to open a support ticket.

This is the call that blows:

MSUtil.LogQueryClassClass log = new LogQueryClassClass();
MSUtil.ILogRecordset records = log.Execute(@"select cs-uri-stem from
C:\WINDOWS\system32\LogFiles\W3SVC230775414\ex0305 15.log group by
cs-uri-stem", null);

The com object is logparser available with win2k and up or at

logparser.com.
This call will work without a problem on my machine. But not on the

server.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"John Timney (Microsoft MVP)" <ti*****@despammed.com> wrote in message
news:O4**************@tk2msftngp13.phx.gbl...
> Alvin,
>
> have you tried upping your asp rights in machine config.
>
> Try setting the process model username to system
> userName="SYSTEM"
>
> Sounds to me like your com object is expecting to find a window of
some > type
> to enable it to run, and cant find a window. Out of curiosity - I

wonder
> what would happen if you use process.start cmd/com thing from asp.net
> rather
> than trying to invoke com from within asp.net
>
> Regards
>
> John Timney
> Microsoft Regional Director
> Microsoft MVP
>
> "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
> news:uL**************@TK2MSFTNGP10.phx.gbl...
>> From a webpage, I am calling a com object which needs to read a file. It
>> keeps throwing access denied errors. I am stumped. I think I have
>> tried
>> everything I know what to do. The webpage can read the file. Just
>> fine.
> The
>> com object can't.
>>
>> Create user group.
>> Impersonate user.
>> User has full rights to directory
>> added everyone - full rights. no joy
>> added admin - full rights no joy
>> message box tells me that the page is executing under that user. no
>> joy
>> full rights to every user group i can find on the system. no joy
>> ditch impersonation, admin rights to everybody. no joy
>> message box tells me that the page is executing under network

services >> give network services full rights. no joy
>> share folder no joy
>> create web sharing apply permissions no joy
>> the com object can read the system and event logs without problem
>> the com object can read the log file if fired from a dos prompt on the >> server
>>
>> why me lowd. why me?????
>>
>> --
>> Regards,
>> Alvin Bruney
>> [ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
>> Got tidbits? Get it here... http://tinyurl.com/27cok
>>
>>
>
>



Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.