Ask a Question related to ASP.NET Security, Design and Development.
-
Lachlan James #1
gaining access to a share
Hi,
I want to create a folder on a network share from within
my ASP.NET application. The app uses a custom
authentication mechanism which creates a Principal object
after looking up an external system.
It seems whenever the Directory.CreateDirectory() method
executes I get an UnauthorizedAccessException exception. I
suspect this is because the ASPNET account is a local
account which is unknown to the computer where the share
resides.
How can I progamatically gain access to that share to
create the dir?
I do not want to configure impersonation in the web.config
as I fear this is less secure.
Thanks, Lachlan
Lachlan James Guest
-
Access Windows Share In Ubuntu
I am logged in as root I have a whole partition shared on windows called "MEDIA" the windows box has an ip of 192.168.1.10 Ubuntu Box is ... -
Can I share an Access MDW file for security.
Hi all, I am trying to set up a web application to connect to an old Access 97 database. The database uses a workgroup.mdw workgroup file for its... -
unable to access share
I was called by a client last week, who said he was unable to access the server. The network is mixed apple (osx and os9), windows 2000 and windows... -
folder access in share
In article <un6Zq$9RDHA.3768@tk2msftngp13.phx.gbl>, "WILLIAM WELBORN" <bwelborn707@email.uophx.edu> wrote: That message is very misleading. The... -
XP User not able to access $ share
I would assume that you have correctly configured all the machines. If not, maybe that's where the problem is. Try making a new connection. You can... -
Paul Clement #2
Re: gaining access to a share
On Mon, 14 Feb 2005 08:04:42 -0800, "Lachlan James" <anonymous@discussions.microsoft.com> wrote:
¤ Hi,
¤
¤ I want to create a folder on a network share from within
¤ my ASP.NET application. The app uses a custom
¤ authentication mechanism which creates a Principal object
¤ after looking up an external system.
¤
¤ It seems whenever the Directory.CreateDirectory() method
¤ executes I get an UnauthorizedAccessException exception. I
¤ suspect this is because the ASPNET account is a local
¤ account which is unknown to the computer where the share
¤ resides.
¤
¤ How can I progamatically gain access to that share to
¤ create the dir?
¤
¤ I do not want to configure impersonation in the web.config
¤ as I fear this is less secure.
You need to understand how delegation works so you can choose which authentication method best suits
your configuration:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconaspnetdelegation.asp[/url]
[url]http://support.microsoft.com/default.aspx?scid=kb;en-us;810572[/url]
Paul ~~~ [email]pclement@ameritech.net[/email]
Microsoft MVP (Visual Basic)
Paul Clement Guest
-
Lachlan James #3
Re: gaining access to a share
Hi Paul,
Thanks for your reply. Unfortunately we are using a custom
authentication system for this particular application
because the built in ones don't fulfil our needs. This
means using windows authentication & impersonation is not
possible. Besides that, it is not recommended to do it
that way for security reasons.
However towards the end of the article you posted it
mentioned using COM+ serviced components to achieve this,
so that's what I have done. I have a serviced component
which I call from my asp.net app. The serviced component
runs under a custom account which has access to the
network share. This is the easiest & most secure way to do
this I think.
For anyone else that is interested in doing this, below is
a great article which explains how to do it and why it is
the only viable option.
[url]http://www.15seconds.com/issue/030926.htm[/url]
Lachlan
<anonymous@discussions.microsoft.com> wrote:>-----Original Message-----
>On Mon, 14 Feb 2005 08:04:42 -0800, "Lachlan James"within>
>¤ Hi,
>¤
>¤ I want to create a folder on a network share fromobject>¤ my ASP.NET application. The app uses a custom
>¤ authentication mechanism which creates a Principalmethod>¤ after looking up an external system.
>¤
>¤ It seems whenever the Directory.CreateDirectory()exception. I>¤ executes I get an UnauthorizedAccessExceptionshare>¤ suspect this is because the ASPNET account is a local
>¤ account which is unknown to the computer where theweb.config>¤ resides.
>¤
>¤ How can I progamatically gain access to that share to
>¤ create the dir?
>¤
>¤ I do not want to configure impersonation in thechoose which authentication method best suits>¤ as I fear this is less secure.
>
>You need to understand how delegation works so you canurl=/library/en-us/vsent7/html/vxconaspnetdelegation.asp>your configuration:
>
>[url]http://msdn.microsoft.com/library/default.asp?[/url]us;810572>[url]http://support.microsoft.com/default.aspx?scid=kb;en-[/url]>
>
>Paul ~~~ [email]pclement@ameritech.net[/email]
>Microsoft MVP (Visual Basic)
>.
>Lachlan James Guest
-
Paul Clement #4
Re: gaining access to a share
On Tue, 15 Feb 2005 03:36:08 -0800, "Lachlan James" <anonymous@discussions.microsoft.com> wrote:
¤ Hi Paul,
¤
¤ Thanks for your reply. Unfortunately we are using a custom
¤ authentication system for this particular application
¤ because the built in ones don't fulfil our needs. This
¤ means using windows authentication & impersonation is not
¤ possible. Besides that, it is not recommended to do it
¤ that way for security reasons.
¤
¤ However towards the end of the article you posted it
¤ mentioned using COM+ serviced components to achieve this,
¤ so that's what I have done. I have a serviced component
¤ which I call from my asp.net app. The serviced component
¤ runs under a custom account which has access to the
¤ network share. This is the easiest & most secure way to do
¤ this I think.
¤
¤ For anyone else that is interested in doing this, below is
¤ a great article which explains how to do it and why it is
¤ the only viable option.
¤
¤ [url]http://www.15seconds.com/issue/030926.htm[/url]
¤
¤ Lachlan
Yes I still use this type of mechanism for ASP and Visual Basic 6.0 components, although I kind of
moved away from COM+ since I moved to .NET.
Paul ~~~ [email]pclement@ameritech.net[/email]
Microsoft MVP (Visual Basic)
Paul Clement Guest



Reply With Quote

