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

ASP.NET, IIS 6.0 (Windows Server 2003) and Com permissions...

I have an ASP.NET application that instantiantes a Win32 C++ Com
object. This object's methods require specific access permissions to
the underlying registry/file structure in order to function properly.

On windows 2000/xp if we enable impersonation in the ASP.NET app's
Web.Config file then access is granted/denied based-upon the logged-in
user.

However, if the same is done in Windows Server 2003 I MUST still grant
"Network Service" account specific permissions in the file-system,
registry, and DCOM!

I have added a call to "CoImpersonateClient()" in the COM method to
ensure that we are running as the proper user, and it is (I print out
the username found in a "GetUserName()" call). I also output the name
in the ASP.NET app by using the System.Environment.UserName property.

Any ideas to ensure that all these COM calls are being made as the
authenticated user and NOT the ASP.NET user (ASPNET or "NETWORK
SERVICE")?

Please assist, thanks.
Nov 17 '05 #1
2 4887
to guarantee that the com call runs on the same thread as asp.net
autheciated thread set AspComp=true. this will have some minor performance
impact.
-- bruce (sqlwork.com)

"Todd Barlow" <to**@lightspeedsystems.com> wrote in message
news:30**************************@posting.google.c om...
I have an ASP.NET application that instantiantes a Win32 C++ Com
object. This object's methods require specific access permissions to
the underlying registry/file structure in order to function properly.

On windows 2000/xp if we enable impersonation in the ASP.NET app's
Web.Config file then access is granted/denied based-upon the logged-in
user.

However, if the same is done in Windows Server 2003 I MUST still grant
"Network Service" account specific permissions in the file-system,
registry, and DCOM!

I have added a call to "CoImpersonateClient()" in the COM method to
ensure that we are running as the proper user, and it is (I print out
the username found in a "GetUserName()" call). I also output the name
in the ASP.NET app by using the System.Environment.UserName property.

Any ideas to ensure that all these COM calls are being made as the
authenticated user and NOT the ASP.NET user (ASPNET or "NETWORK
SERVICE")?

Please assist, thanks.

Nov 17 '05 #2

Thanks guys, I found the MSDN article after posting the question.
However, this still didn't help.

I think the problem is that the COM object that the ASP.NET application
is instantiating then instantiates another COM object again. I think
something is wrong with the way these types of COM proxying works.

In the end, I just granted access where it was needed to the NETWORK
SERVICE account. It's ugly--but it works.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3

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

Similar topics

11
by: Wolfgang Kaml | last post by:
Hello All, I have been working on this for almost a week now and I haven't anything up my sleeves anymore that I could test in addition or change.... Since I am not sure, if this is a Windows...
2
by: cd | last post by:
Is there a specific process or permissions that must be granted to get a .NET (framework 1.4) Window Service to run properly on a Windows 2003 Server? I built a Windows Service to start two local...
1
by: Simon Chester | last post by:
Hello! Can anyone help me with this problem?... I have developed an ASP.NET (version 1.1) application which I have deployed to a number of webservers. The web application works fine on Windows...
9
by: Kevin Spencer | last post by:
We just moved an ASP.Net app to a Windows 2003 Server, and the SMTPMail fails now with the following message: System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr,...
10
by: Ger | last post by:
I am having problems using VB.Net's Management base object on a machine hosting Windows Server 2003. I am trying to set file permissions from a Windows Service. These files may be loacted on a...
5
by: JR | last post by:
Here's the scenerio: HAD: Entire Windows 2000 domain multiple servers Internal Web Server - Windows 2000 NAS Server - Windows 2000 Internal Web Application (On Web server) utilizing .ASP...
9
by: Brian Delahunty | last post by:
I'm having a bit of a weird problem and I've spent the last few hours scouring the web trying to solve this before coming here. Here is the problem: I get 404 errors for all ASP.NET 2.0 content...
27
by: pisquem | last post by:
I am building an windows service that is to be deployed on a windows server 2003 and I want to have activity written to the event log, I want its own log called ('CustomLog') Below is what I...
2
by: Michael Kintner | last post by:
Strange thing happening with Windows 2000 to Windows 2003 R2 This ASP script below is sitting on a Windows 2000 IIS Server Box and the fldr was pointing to \\Bradford2\temp which was a Windows...
4
by: =?Utf-8?B?ZGlub28=?= | last post by:
We are currently in the process of upgrading our web server from Windows 2000 advanced server to Windows 2003 SP2. We have few ASP.Net applications built with .NET framework 1.1 running on the web...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...

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.