CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 1/25/2008 12:39:23 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 14 Views: 31 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
15 Items, 1 Pages 1 |< << Go >> >|
vkv
Asp.Net User
Folder Access for ASP>net Windows authentication.1/25/2008 12:39:23 AM

0/0

Hi,

I am using windows authentication for an intranet web application(ASP>net 2.0).I need to access,save,delete files residing under a folder on different win2003 server from another Application server.

I am getting error Unauthorized Exception.If i give permissions(my login Id permissions) to the folder then also its not working.There are 10 users to this application.All of them needs to access the Folder and how can i do that?

Thanks
vkv

thajeer
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.1/25/2008 6:23:45 AM

0/0

i think it will use httpconext identity, so try granting access to the folder to the id thats running your worker process.


HTH
Thajeer

"Dont forget to click "Mark as Answer" on the post that helped you. This marks your thread as Resolved and the community will know you have been helped."
vkv
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.1/28/2008 8:31:52 PM

0/0

Hi 

I did not get you.What you mean by Httpcontext Identity.I am accessing the folder through my NetworkID.

Thanks

vkv

XiaoYong Dai –
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.1/30/2008 10:32:14 AM

0/0

Hi

Problem occurs when accessing network resources (e.g. database, file share, or Active Directory) using ASP.NET process accounts. If you are using IIS5, then by default it's ASP.Net uses
If you are using IIS6, then by default ASP.Net uses the Network Service, then give this account NTFS Read permissions to the path identified in the error. Also you can impersonation with specific user like this
<identity impersonate="true" userName="domain\user" password="password" />


Best Regards
XiaoYong Dai
Microsoft Online Community Support

Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
vkv
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.2/6/2008 11:34:56 PM

0/0

Hi

I have given folder permissions for my self.Even though i am unable to access it.i saw through page.user.identity.name.tostring() ,in which i am getting my network login ID.

Thanks

vkv

thajeer
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.2/7/2008 10:26:19 PM

0/0

try granting access to the account that is running your worker process.


HTH
Thajeer

"Dont forget to click "Mark as Answer" on the post that helped you. This marks your thread as Resolved and the community will know you have been helped."
dineshsbisht
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.2/7/2008 11:43:59 PM

0/0

you need to imporsonate your credidentials before you do any network resources.


There is a problem because somewhere there is a solution of that problem.

-DB
vkv
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.2/12/2008 1:07:54 AM

0/0

I did impersonate.It worked now from my PC,but its not working when i deployed on Server.Is there any way i can find out by what user it is trying to access the folder.i am thinking it is trying to access by Network login ID.For this Login ID it has all the permissions.

Thanks

vkv

dineshsbisht
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.2/12/2008 1:31:52 AM

0/0

When you imporsonate you should specify which user you are imporsonating to. So which user is being used depends on you completly.


There is a problem because somewhere there is a solution of that problem.

-DB
dineshsbisht
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.2/12/2008 1:35:37 AM

0/0

Visit this link for more on to imporsonation

 

http://support.microsoft.com/kb/306158


There is a problem because somewhere there is a solution of that problem.

-DB
vkv
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.2/12/2008 5:49:55 PM

0/0

Hi,

I can access the folder from the server also but i have to make the folder "Shared".With out sharing the folder i cannot access from the server.I am using this file path when i am not sharing the folder \\ServerName\D$\FolderName\FIleName.

Thanks

 

dineshsbisht
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.2/12/2008 8:05:31 PM

0/0

Yes Sir, you have to make the folder web share. Otherwise how can we access the folder from Web. As per my understanding whatever you want to access from web that has to be web shared.


There is a problem because somewhere there is a solution of that problem.

-DB
vkv
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.2/12/2008 9:20:46 PM

0/0

Does the format of the path changes when i change the folder regular windows share to web sharing.Any how i did that and it stopped working even from my PC.I am accessing in this format with web sharing.\\servername\foldername\filename

Thanks

dineshsbisht
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.2/12/2008 9:31:07 PM

0/0

you will use server.mappath for this. you need to check how that works..


There is a problem because somewhere there is a solution of that problem.

-DB
thajeer
Asp.Net User
Re: Folder Access for ASP>net Windows authentication.2/13/2008 1:58:42 AM

0/0

Here is how you check the user ids that are used within page's execution context. It is thread's current principle ( please verify this) needs access to the file that you are looking to access.

 

<%@ Page Language="C#" AutoEventWireup="true" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

<Script runat="Server">
 private void Page_Load(object sender, System.EventArgs e)
 {
  lblUser.Text = Page.User.Identity.Name;
  lblWindow.Text = System.Security.Principal.WindowsIdentity.GetCurrent().Name;
  lblThread.Text = System.Threading.Thread.CurrentPrincipal.Identity.Name;
 } 
</Script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
<form runat="Server">
 Page Identity : <asp:label id="lblUser"  runat="server" text="RRRR" /><br>
 Windows Identity : <asp:label id="lblWindow" runat="server" text="RRRR" /><br>
 Thread Identity : <asp:label id="lblThread" runat="server" text="RRRR" /><br>

</form>
</body>
</html>


HTH
Thajeer

"Dont forget to click "Mark as Answer" on the post that helped you. This marks your thread as Resolved and the community will know you have been helped."
15 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning Visual Web Programming in VB .NET: From Novice to Professional Authors: Daniel Cazzulino, Craig Bowes, Victor Garcia Aprea, Mike Clark, James Greenwood, Chris Hart, Pages: 648, Published: 2005
Pro ASP.NET 2.0 Website Programming Authors: Damon Armstrong, Pages: 641, Published: 2005
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008
Professional IIS 7 Authors: Ken Schaefer, Jeff Cochran, Scott Forsyth, Rob Baugh, Mike Everest, Dennis Glendenning, Pages: 812, Published: 2008
ASP.NET in a Nutshell: In a Nutshell Authors: G. Andrew Duthie, Matthew MacDonald, Pages: 979, Published: 2003
ASP.NET 2.0 Cookbook Authors: Michael A. Kittel, Geoffrey T. LeBlond, Pages: 989, Published: 2005
C# for Programmers: Updated for C# 2.0 Authors: Paul J. Deitel, Pages: 1317, Published: 2005
Building Secure Microsoft ASP.NET Applications: Authentication, Authorization, and Secure Communication : Patterns & Practices Authors: Microsoft Corporation Staff, Drew Bird, Microsoft Corporation, Microsoft Corporation, Danielle Voeller Bird, Pages: 586, Published: 2003
Beginning C# 2005 Databases Authors: Karli Watson, Pages: 501, Published: 2006
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007

Web:
How To: Use Windows Authentication in ASP.NET 2.0 When you configure ASP.NET for Windows authentication, it can be coupled with ... to control access to requested files and folders based on the request URL. ...
ASP.NET, Integrated Windows Authentication and Anonymous Access ... ASP.NET, Integrated Windows Authentication and Anonymous Access. .... WindowsIdentity and Thread ALL need permission on the website folder. ...
CodeProject: ASP.NET Ver 1.1 Web Application and Windows ... ASP.NET uses Windows authentication in conjunction with Microsoft Internet ... In ‘windows role’ based authorization, access to application folder for ...
Windows authentication - unable to allow access to folder to a ... NET, 2, Windows Authentication. Hi, I have an ASP.NET 2.0 application. ... I need to secure access to a folder so created a web.config folder and placed it ...
Problem with ASP.NET Windows Authentication/Impersonation ? - ASP Free Visit ASP Free to discuss Problem with ASP.NET Windows ... The only users with access to the folder under NTFS security are "NETWORK ...
Wrox Article : ASP.NET 3.5 Windows-Based Authentication - Wrox This article looks at Windows-based ASP.NET authentication, one of several ... The folder contains the machine.config file. This file provides ASP.NET ...
access folder at another computer with automatic Windows ... access folder at another computer with automatic Windows authentication. Get answers to your questions in our .NET VB forum.
.NET Visual Basic access folder at another computer with automatic ... access folder at another computer with automatic Windows authentication - Andrius B. 18-Jan-08 09:27:56. Hi. I am writing an app, ...
windows authentication,40 - ng.asp-net-forum.security - fix error ... How To: Use Windows Authentication in ASP.NET 2.0 You should choose Windows ... Windows NT Authentication mode can be used to manage database access in two ...
Windows Authentication via custom page. - ASP.NET Forums -Main folder (uses Anonymous access). --authResponse folder (uses Integrated Windows authentication). ---returncredentials.asp (uses ...




Search This Site:










how can i create search in my site?

calendar pop-up that selects multiple dates

vs 2005, response.flush pdf file displaying nothing, why???????????

one license, 2 websites.. possible?

begginning asp.net

adding a custom style to the htmlheader

new to asp.net

extremely slow web site build

db_paged_search.aspx

access function in class

maximun number of arguments in vb.net function and procedure

how do i authenticate users in oracle database?

admin ability for user accounts??

user control problem

server.transfer and form variables

performance of dotenetnuke3.1

forms authentication - is the form submission encrypted?

customized create user wizard.

how do you switch to gridlayout in the beta 2 version of visual web developer????

.net framework on linux/unix?

xml/xsl module problems

toolbox options

how do i set integer values to null when updating database?

asp.net 2.0 cookieless sessions and seo googlebot etc

info not deleting...

nested master page web control not declared isses

how to set image height from a field value in webmatrix?

dnn documentation errata

masterpages as best practice

referencing question

 
All Times Are GMT