Ask a Question related to ASP.NET Security, Design and Development.
-
Stu #1
File copy via ASP.NET access errors?
Using IIs 6.0 on a Server 2003 box, and using ASP.NET I'm trying to do the
following code snippit...
Dim NewName As String = "\\network_share_path\edit_me.ppt"
Dim PubName As String = "\\network_share_path\show_me.ppt"
Dim PubFile As System.IO.File
If PubFile.Exists(PubName) Then
PubFile.Move(PubName, PubName + "BAK" + Format(Now, "hhmmss-MMddyyyy"))
End If
PubFile.Copy(NewName, PubName)
to replace one file that is displayed on a monitor with another that has
been edited. I get System.UnauthorizedAccessException errors. the
\\network_share_path\ is on a different server on the same domain.
Impsonate = true is set in the web.config file. I've also tried
\\IIsserver\shared_path\show_me.ppt , since I don't have admin on the
\\network_share_path\ machine but I do on the IIs server. I've tried using
absolute paths and relative paths on the server. I've checked the
permissons both on the share side and the file path side (on the IIS
machine) and even tried tossing the EVERYONE account with full control. I
tried adding the share as a virtual directory and assigning write
permissions to the ASP.NET page.
Got me stumped, about out of ideas of what else to try.
Thanks in Advance!
Stu
Stu Guest
-
Access undefined errors
Hi everyone, I am new to Flex and I was trying to do a simple for loop and I keep getting this error: Error Access of undefined property. Here... -
Copy a table in Access structure only with CF query
Hello, I need to know how to create a new table by copying an existing table with the table structure only in a query Don't know the Syntax but... -
Adding Access DB Errors
trying to add an access db, but it only offers me Microsoft SQL Server, SQL 3.x and "other" as options for db types to add - i'm not used to this... -
Access denied errors
I have been getting some rather confusing access errors when trying to use an asp page to access my Access database. I have all the security... -
db errors in access
Good Morning, I have created a database and the forms to run it solely in access and it has been stored on my office's networked drive. I also... -
Scott Allen #2
Re: File copy via ASP.NET access errors?
Hi Stu:
Standard windows authentication doesn't make more than one hop across
the network - when you impersonate the user on the web server that
context won't flow to the machine with the network share unless you
enable delegation.
There are some more details here:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmod/html/secmod05.asp[/url]
Another option is to run your application under a domain account with
access to the network share.
HTH,
--
Scott
[url]http://www.OdeToCode.com[/url]
On Sat, 31 Jul 2004 21:57:18 -0600, "Stu" <Stu@thynk.us> wrote:
>Using IIs 6.0 on a Server 2003 box, and using ASP.NET I'm trying to do the
>following code snippit...
>Dim NewName As String = "\\network_share_path\edit_me.ppt"
>
>Dim PubName As String = "\\network_share_path\show_me.ppt"
>
>Dim PubFile As System.IO.File
>
>If PubFile.Exists(PubName) Then
>
> PubFile.Move(PubName, PubName + "BAK" + Format(Now, "hhmmss-MMddyyyy"))
>
>End If
>
>PubFile.Copy(NewName, PubName)
>
>
>
>to replace one file that is displayed on a monitor with another that has
>been edited. I get System.UnauthorizedAccessException errors. the
>\\network_share_path\ is on a different server on the same domain.
>Impsonate = true is set in the web.config file. I've also tried
>\\IIsserver\shared_path\show_me.ppt , since I don't have admin on the
>\\network_share_path\ machine but I do on the IIs server. I've tried using
>absolute paths and relative paths on the server. I've checked the
>permissons both on the share side and the file path side (on the IIS
>machine) and even tried tossing the EVERYONE account with full control. I
>tried adding the share as a virtual directory and assigning write
>permissions to the ASP.NET page.
>
>Got me stumped, about out of ideas of what else to try.
>
>Thanks in Advance!
>
>Stu
>
>Scott Allen Guest
-
Ken Schaefer #3
Re: File copy via ASP.NET access errors?
Hi,
Where are the user credentials coming from? If you have hard coded them into
the <impersonate> web.config setting, then are you using a domain account?
On the other hand, if you are getting the user to supply the credentials,
then you will need to use Basic Authentication if you do not want to enable
Delegation. Basic Authentication means that IIS has the user's
username/password in clear text, and can directly impersonate the user to
get access to remote resources.
Any other auth type (Digest, Integrated etc) means that IIS merely has an
access token that doesn't have permissions (by default) to logon to remote
resources. If you ensure that the client is authenticating using Kerberos,
you can enable delegation, and thus allow IIS to get a service ticket on
behalf of the user to access the remote resource. If you want to go down
this path, please let us know, and I'll post some instructions.
Cheers
Ken
"Stu" <Stu@thynk.us> wrote in message
news:OpGYNv3dEHA.1644@tk2msftngp13.phx.gbl..."hhmmss-MMddyyyy"))> Using IIs 6.0 on a Server 2003 box, and using ASP.NET I'm trying to do the
> following code snippit...
> Dim NewName As String = "\\network_share_path\edit_me.ppt"
>
> Dim PubName As String = "\\network_share_path\show_me.ppt"
>
> Dim PubFile As System.IO.File
>
> If PubFile.Exists(PubName) Then
>
> PubFile.Move(PubName, PubName + "BAK" + Format(Now,using>
> End If
>
> PubFile.Copy(NewName, PubName)
>
>
>
> to replace one file that is displayed on a monitor with another that has
> been edited. I get System.UnauthorizedAccessException errors. the
> \\network_share_path\ is on a different server on the same domain.
> Impsonate = true is set in the web.config file. I've also tried
> \\IIsserver\shared_path\show_me.ppt , since I don't have admin on the
> \\network_share_path\ machine but I do on the IIs server. I've tried> absolute paths and relative paths on the server. I've checked the
> permissons both on the share side and the file path side (on the IIS
> machine) and even tried tossing the EVERYONE account with full control. I
> tried adding the share as a virtual directory and assigning write
> permissions to the ASP.NET page.
>
> Got me stumped, about out of ideas of what else to try.
>
> Thanks in Advance!
>
> Stu
>
>
>
Ken Schaefer Guest



Reply With Quote

