473,396 Members | 2,020 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.

Windows authentication with impersonation - network resource access fails

Hi,

I have a question regd. Windows authentication and network file access.
My asp.net application doesn't use any of the .NET's authentication schemes
(Forms, Windows or Passport) yet.
I have a login page where the users would supply their credentials and the
business logic compares these

credentials against SQLServer database and allows/denies access to the
website.
So far so good.

But now, my application needs to access some files located on the Domain
network.
The first thing that came in my mind is Impersonation.

I did change my web.config file to use Windows authentication as follows...

<authentication mode="Windows" />

<authorization>
<allow users="*" />
</authorization>

<identity impersonate="true"
userName="domainName\loginID"
password="password"
/>

This "domainName\loginID" account HAS full rights over the network resource.

Now I have UNCHECKED Allow Anonymous Access in IIS.

But I still cannot access the file on the network.

It errors out at the Response.Redirect
("//networkPath/folder1/subFolder1/fileName");
as Page cannot be displayed.

I have checked the User.Identity.Name and it looks correct (domainName\
loginID)
Even the User.Identity.AuthenticationType is good (NTLM)

I'm surely missing something critical.

Any help in this regards is greatly appreciated.

Thanks in advance,
Srivalli.

--
Message posted via http://www.dotnetmonster.com
Nov 16 '05 #1
1 8021
Hi,

Two things.
1- When you run a process as a service you need to use the UNC , like
\\servername\path to access it
2- BY default (and I dont know if you can change this) you cannot access any
path outside the web tree, this is for security reasons so you could not
traverse the hdd.
Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"srivalli chavali via DotNetMonster.com" <fo***@DotNetMonster.com> wrote in
message news:67******************************@DotNetMonste r.com...
Hi,

I have a question regd. Windows authentication and network file access.
My asp.net application doesn't use any of the .NET's authentication
schemes
(Forms, Windows or Passport) yet.
I have a login page where the users would supply their credentials and the
business logic compares these

credentials against SQLServer database and allows/denies access to the
website.
So far so good.

But now, my application needs to access some files located on the Domain
network.
The first thing that came in my mind is Impersonation.

I did change my web.config file to use Windows authentication as
follows...

<authentication mode="Windows" />

<authorization>
<allow users="*" />
</authorization>

<identity impersonate="true"
userName="domainName\loginID"
password="password"
/>

This "domainName\loginID" account HAS full rights over the network
resource.

Now I have UNCHECKED Allow Anonymous Access in IIS.

But I still cannot access the file on the network.

It errors out at the Response.Redirect
("//networkPath/folder1/subFolder1/fileName");
as Page cannot be displayed.

I have checked the User.Identity.Name and it looks correct (domainName\
loginID)
Even the User.Identity.AuthenticationType is good (NTLM)

I'm surely missing something critical.

Any help in this regards is greatly appreciated.

Thanks in advance,
Srivalli.

--
Message posted via http://www.dotnetmonster.com

Nov 16 '05 #2

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

Similar topics

1
by: Maziar Aflatoun | last post by:
Hi guys, I'm using Windows authentication to connect to SQL Server 2000. On my computer the connection is fine. Now if I move it to a remote server, how to I hard code my Username/Password in...
2
by: Peter O'Reilly | last post by:
I am experiencing difficulty access a mapped network drive in an ASP.NET application. While using the .Net framework v 1.1 implementation of System.IO.Directory.Exists(), it fails to recognize a...
2
by: Joseph Geretz | last post by:
I'm having a credentialing problem in my web application. Actually, I don't think this is an IIS security issue, since I'm able to access the page I'm requesting. However, the executing page itself...
5
by: pberna | last post by:
Dear all, I built a Web Form application to start and stop a Windows Service remotely. I successful tested the application on Windows 2000 server + IIS. I must include the ASPNET user to the...
8
by: Nils Magnus Englund | last post by:
Hello, I am having trouble using Integrated Windows Authentication between our intranet server and our database server, both of which are on our local domain. Windows authentication works for...
26
by: andrew_webby at hotmail | last post by:
Hi Am having a problem with an app I wrote to test patch delivery. I contact a remote PC, and get it to run a patch which is installed on a server. It works fine if I use psexec for example and...
3
by: thomson | last post by:
Hi All, If i log into my windows machine, Iam already authenticated against the AD, Inorder to identify the Groups, Do i need to check the Active Directory once again, or Windows...
5
by: DotNetDanny | last post by:
Hello Machine: Windows Vista Business, standalone machine (no domain). Installed an old classic ASP webapplication in IIS7, running under a new app.pool with 'NETWORK SERVICE' account (using...
1
by: =?Utf-8?B?c3VidGlsZQ==?= | last post by:
Hi :-) I'm having some trouble with LDAP and Active Directory on Win2k3 I use Windows Authentication and the code System.Threading.Thread.CurrentPrincipal.Identity.Name gives me the correct...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.