473,663 Members | 2,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Impersonation issues

My server admin and I are trying to figure out how to get impersonation
working to be able to upload a file from the client browser thru the web
server to a network file server. My network ID for testing is twells. Our
domain for testing is dev.com. If I don't have impersonation set in
web.config the user ID shown by
System.Security .Principal.Wind owsIdentity.Get Current().Name is
"twells/ASPNET" which does not exist on our network. If I set <identity
impersonate="tr ue"/> in web.config the the user ID is "twells_IUS R1" which
also does not exist on our network. If I set <identity impersonate="tr ue"
UserName="twell s" Password="MyDev Pass5"/> (MyDevPass5 is my dev password) I
get a web.config syntax error. I've tried several variations on "twells"
such as "twells/dev.com" or "twells\dev.com " or "dev.com/twells" or
"dev.com\twells ", but I get the same error. Om MSDN I can't find anything
useful that explains why this is happening or how to fix it.

Any help is greatly appreciated.
Thanks!
Tom
Nov 19 '05 #1
2 1407
We had the same problem with communication between our file server and
webserver. We didn't want to take the impersonation route as we have a user
pool of 20,000 users and that gets hard to maintain.

On the webserver we have the "aspnet" local account that runs the website.
One the fileserver we created a "aspnet" local account that has permissions
on the file server.

We manually set the passwords for both "webserver/aspnet" and
"fileserver/aspnet" account to the same. We also changed the machine.config
file, manually setting the machine (aspnet) password.

When the webserver tries to make a connection to the fileserver, it passes
his name/pass combination and the file server authenticated successfully and
the webserver can now browse the fileserver.

I am not sure if this is the direction you are looking for, but it will work
for your situation, unless of course you are using Domain accounts for
permissions on the actual directories.

HTH,

bill

"Tom Wells" <tw****@les.com > wrote in message
news:us******** ********@TK2MSF TNGP10.phx.gbl. ..
My server admin and I are trying to figure out how to get impersonation
working to be able to upload a file from the client browser thru the web
server to a network file server. My network ID for testing is twells. Our domain for testing is dev.com. If I don't have impersonation set in
web.config the user ID shown by
System.Security .Principal.Wind owsIdentity.Get Current().Name is
"twells/ASPNET" which does not exist on our network. If I set <identity
impersonate="tr ue"/> in web.config the the user ID is "twells_IUS R1" which
also does not exist on our network. If I set <identity impersonate="tr ue"
UserName="twell s" Password="MyDev Pass5"/> (MyDevPass5 is my dev password) I get a web.config syntax error. I've tried several variations on "twells"
such as "twells/dev.com" or "twells\dev.com " or "dev.com/twells" or
"dev.com\twells ", but I get the same error. Om MSDN I can't find anything
useful that explains why this is happening or how to fix it.

Any help is greatly appreciated.
Thanks!
Tom

Nov 19 '05 #2
you are on the correct track, but have bad syntax (web.config is case
sensitive) try:

<identity impersonate="tr ue" userName="twell s" password="MyDev Pass5"/>

note: as twells is a local account, then you need a matching local account
on the fileserver with the same password. you could switch to a domain
account. also asp.net supports encrypting the password in the registry if
having it in the web.config is an issue. if twells is a domain then use:

<identity impersonate="tr ue" userName="domai n\twells"
password="MyDev Pass5"/>

note: <identity impersonate="tr ue"> causes the identity to be the iis
identity associated with the request. if the site is anonymous it will be
the iusr account. if the site is not anonymous it will the login entered at
the browser. you will not be able to access the fileserver with is login
unless you use basic or kerboeros, as nt creditals can not be forwarded (1
hop rule).

-- bruce (sqlwork.com)
where "domain" is your domain name (
"Tom Wells" <tw****@les.com > wrote in message
news:us******** ********@TK2MSF TNGP10.phx.gbl. ..
| My server admin and I are trying to figure out how to get impersonation
| working to be able to upload a file from the client browser thru the web
| server to a network file server. My network ID for testing is twells.
Our
| domain for testing is dev.com. If I don't have impersonation set in
| web.config the user ID shown by
| System.Security .Principal.Wind owsIdentity.Get Current().Name is
| "twells/ASPNET" which does not exist on our network. If I set <identity
| impersonate="tr ue"/> in web.config the the user ID is "twells_IUS R1" which
| also does not exist on our network. If I set <identity impersonate="tr ue"
| UserName="twell s" Password="MyDev Pass5"/> (MyDevPass5 is my dev password)
I
| get a web.config syntax error. I've tried several variations on "twells"
| such as "twells/dev.com" or "twells\dev.com " or "dev.com/twells" or
| "dev.com\twells ", but I get the same error. Om MSDN I can't find anything
| useful that explains why this is happening or how to fix it.
|
| Any help is greatly appreciated.
| Thanks!
| Tom
|
|
Nov 19 '05 #3

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

Similar topics

1
2647
by: CJ | last post by:
Hi anyone. Does anyone know of issues regarding impersonation in VB .NET with regards to accessing remote WMI information? I have a wrapper class which encapsulates various WMI calls, this appeared fine under .net 1.1, but since sp1 it appears to not work. I have switched on the debug level to 2 (for WMI) on the machines i am querying, and they are showing access denied due to the ASPNET user of the local machine making the query. ...
12
2562
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 problem is that even when it is configured to run under a certain identity through Web.config, the impersonation is not carried through to COM library. Consequently, the code in COM object runs under a local account and any code that needs to access...
0
1580
by: Peter Afonin | last post by:
Hello: When I try to access a SQL server or a network share from an ASP.Net application that I run on my computer, I run into security problems (for instance, I cannot execute DTS package using Trusted connection or get a file information using FileInfo class). This is probably because my application is running under PETER\ASPNET account, where PETER is my computer's name. I can solve this problem by using Impersonation. However, when...
1
1641
by: Rocky | last post by:
I have a problem. I have a webform, which uses impersonation. My iis is set to windows integrated authentication and anonymous is disabled. My webform connects to active directory and retrieves user information. This webform works great on the local machine. But if i run it from a remote machine, it has trouble connecting to AD. I've down some searching and it has to do with the impersonation. I use impersonation to authenticate myself...
27
6699
by: vipleo | last post by:
I am having some issues, when I try to launch another process using Process.Start(ProcessStartInfo psi) on win xp sp2 box (Other versions of xp have no issue). Here is the detail. Main app checks for updates on startup and if updates are available, it launches separate exe to copy files. Before launching new process(exe), I am impersonating admin user as main app is being launched by non-admin user.
0
6229
by: cbtg2006 | last post by:
HI guys, I'm relatively new to the .net development realm. I am creating an application in vb.net to monitor services on remote servers. The application works great when I am logged in and using it - I am a Domain Admin, and as a result a local admin on the remote computers. However when I try to run the application as a standard domain user I receive a priviledges error.
0
1953
by: ChopStickr | last post by:
I have a custom control that is embedded (using the object tag) in an html document. The control takes a path to a local client ini file. Reads the file. Executes the program specified in the ini on the client's PC. After the program has ended the control looks in a client side temp folder (specified by the ini file) for an image created by the executed program. If the image is there, then the control moves the file to a public folder...
0
1081
by: Xexon | last post by:
Hey all, I hope someone out there has got a solution to this rather irritating problem :) Ok here it goes... I have a Web App that does 2 things. It uploads word-document files to a folder on my server, scans them with a virus-scanner and then using the office dll's I extract the contents of the document and put it in my database to be able to search through it. The Virus-Scan part works just great, but the Word thing troubles me a bit. I...
0
1017
by: Brian | last post by:
Greetings! I'm trying to find a good place to call SqlCacheDependency.Start() and I'm running into some issues. I know this isn't a SQL forum, but this seems more like an ASP.NET lifetime problem. I treid Application_Start() but we're running with anon access and impersonation, and impersonation is not 'on' yet. I considered impersonating my user in Application_Start() but I'm not
0
8345
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8768
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8547
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7368
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4181
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2763
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.