473,396 Members | 1,683 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,396 software developers and data experts.

Impersonation woes

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
5 1228
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
> 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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chris | last post by:
Hello all, Here is my problem. I have a windows service (C#) that is supposed to move files from/to the local drive to/from a UNC share (\\domainserver\share). The service is running on a Win3k...
1
by: Ripa Horatiu | last post by:
Does anyone knows how can I impersonate to another user (basically Administrator) for a piece of my code? I've tried the samples provided by MS but they didn't worked. -- Horatiu Ripa
12
by: Anil Krishnamurthy | last post by:
We have an ASP.NET application that uses COM objects through Interop. The web application requires access to network and database resources and hence, needs to impersonate a domain account. The...
1
by: techfuzz | last post by:
I'm posting my problem experience and solution I found here for other ASP.NET developers. I have a web application that uses Forms Authentication with Active Directory to control access. In...
11
by: Phil | last post by:
Hi, I've currently setup a local user as described in: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnne...
1
by: Patrick | last post by:
I have an ASP.NET web service whose Web.Config is set to use impersonation <authentication mode="Windows" /> <identity impersonate="true" /> Within a Web Method, I want to use...
0
by: velvet.graham | last post by:
I'm having a difficult time with impersonation. I've created an impersonation class. Here is the code below: ******Impersonation Class Code********* Imports System Imports System.Web.Security...
1
by: zhuang | last post by:
Dear all, I found a very interesting thing about viewing crystal report (located on network drive) with asp.net application. To do the impersonation, modify web.config does not work, you have...
5
by: =?Utf-8?B?S2l0dHlIYXdr?= | last post by:
I am in the process of migrating an II6 environment from a single server to a network load balanced system. Thus, I am using a virtual directory on a UNC share to house the dynamic data that the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.