![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I would greatly appreciate help on issue that looks as have been resolved before: I wrote a ServicedComponent that reads and writes files to a folder on a network share. Platform is Windows 2000. It gets called by ASPNET (local account) that do not have access to the folder. But I configured this component to run as Server ([assembly: ApplicationActivation(ActivationOption.Server)]) with following settings: [assembly: ApplicationAccessControl(true,AccessChecksLevel=Ac cessChecksLevelOption.Appl |
|
Authentication=AuthenticationOption.Packet, ImpersonationLevel=ImpersonationLevelOption.Impers onate)] I set Identity to run under my domain account (in development environment). I put this component into GAC and registered with regsvcs.exe component method has line like: FileInfo _file = new FileInfo("\\server01\share$\Data\somefile.pdf"); I am not getting any Exception, but in Wahtch window I see following: ((System.MarshalByRefObject)(((System.IO.FileSyste mInfo)(_file)))) __identity <undefined value> System.Object ERROR_ACCESS_DENIED 5 int ERROR_INVALID_PARAMETER 87 int Length <error: an exception of type: {System.IO.IOException} occurred long That makes me think that I am missing something in configuration of the Component. Again, I would heartly apprecciate any clue on what I am missing with this Component. |
#3
| |||
| |||
|
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Well, ultimately the issue here is the COM+ *security* configuration, not the public interface of your components. If you are getting an access denied exception then there's really not much you can do except ensure that you *are* running the COM+ application under the correct identity (have you verified that you are running in COM+ at all? If it's a server application, can you see it "spinning" when it activates in the COM+ admin?) and that it has the necessary permissions to read/write that share. -- Klaus H. Probst, MVP http://www.vbbox.com/ "VK" <vk (AT) nowhere (DOT) net> wrote in message news sokd.58128$fF6.25364174 (AT) news4 (DOT) srv.hcvlny.cv.net...Like I wrote before, I do have public methods: public class fileMgr { protected FileInfo fl; public fileMgr() {} public static long Copy (string sourceFileName, string targetFileName) { fileMgr mgr = new fileMgr(); mgr.fl = new FileInfo(sourceFileName); if (mgr.fl.Exists) { mgr.fl.Copy(targetFileName) } else { throw new ex("Missing file " + sourceFileName); } } } In the web page I call: fileMgr.Copy("\\server01\share$\Data01\somefile.pd f","\\server02\normalshare \Data02\newname.pdf"); Because of security problem I am always getting that file does not exists. That why I am saying that it looks like I am missing something in configuration of the COM+ component. Tried different things - did not find any thing yet. Any hint would be greatly appreciated Vic |
#6
| |||
| |||
|
|
If you use it as the COM+ identity, does it work? |
|
"VK" <vk (AT) nowhere (DOT) net> wrote in message news:4xTkd.66570$fF6.30308322 (AT) news4 (DOT) srv.hcvlny.cv.net... Yes, I do. I see the icon spinning in Component Services control center when I call the method. OK, just checking. I use my own domain account to make sure it has permissions to read/write on the network share. If you use it as the COM+ identity, does it work? Maybe, I am missing any Service Pack? Well, I'd make sure you have the latest of everything but a simple thing like should work regardless. Does it matter if I try this component on Win2K Workstation, not Server? No, they behave exactly the same. The other thing I could think of is maybe a firewall that's blocking traffic from one server to another? FWIW, I'm running W2KPro here and I just tried a simple COM+ app under a domain account and I can access the c$ share on my Windows 2003 server after making the account an admin on the box. -- Klaus H. Probst, MVP http://www.vbbox.com/ |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |