473,507 Members | 2,379 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.WindowsIdentity.GetCurre nt().Name is
"twells/ASPNET" which does not exist on our network. If I set <identity
impersonate="true"/> in web.config the the user ID is "twells_IUSR1" which
also does not exist on our network. If I set <identity impersonate="true"
UserName="twells" Password="MyDevPass5"/> (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 1404
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****************@TK2MSFTNGP10.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.WindowsIdentity.GetCurre nt().Name is
"twells/ASPNET" which does not exist on our network. If I set <identity
impersonate="true"/> in web.config the the user ID is "twells_IUSR1" which
also does not exist on our network. If I set <identity impersonate="true"
UserName="twells" Password="MyDevPass5"/> (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="true" userName="twells" password="MyDevPass5"/>

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="true" userName="domain\twells"
password="MyDevPass5"/>

note: <identity impersonate="true"> 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****************@TK2MSFTNGP10.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.WindowsIdentity.GetCurre nt().Name is
| "twells/ASPNET" which does not exist on our network. If I set <identity
| impersonate="true"/> in web.config the the user ID is "twells_IUSR1" which
| also does not exist on our network. If I set <identity impersonate="true"
| UserName="twells" Password="MyDevPass5"/> (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
2639
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...
12
2542
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...
0
1574
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...
1
1636
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...
27
6680
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...
0
6214
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...
0
1928
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...
0
1066
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...
0
1008
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...
0
7111
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
7319
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,...
0
7376
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...
1
7031
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
7485
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...
0
3191
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
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 ...
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.