-
February 26th, 2013, 10:07 AM
#1
Find and Open a File on Remote Computer
I have a file on one server(Windows 2003) and need to access from another server (IIS server - Windows 2008) , I have written the program for the same which works fine and I can access the file.
But when this comes to the DLL (which registered successfully on Windows 2008), its not able to find the file on Windows 2003.
What could be possible reasons, please help !!!
Thanks in advance!
-
February 26th, 2013, 02:42 PM
#2
Re: Find and Open a File on Remote Computer
For the moment, forget your program. From the Windows 2008 computer can you see/access the file on the Windows 2003 computer using sharing and Windows Explorer? There are various security policy settings re network that can cause this problem, so these need to be checked first.
-
February 27th, 2013, 01:18 AM
#3
Re: Find and Open a File on Remote Computer
Originally Posted by Umesh...
But when this comes to the DLL (which registered successfully on Windows 2008), its not able to find the file on Windows 2003.
Could you elaborate a bit on the DLL being registered somewhere? Do you mean that the DLL is COM server?
Best regards,
Igor
-
February 27th, 2013, 02:19 AM
#4
Re: Find and Open a File on Remote Computer
Yes, I can access the file from Windows 2008 on the Windows 2003. I have written one small seperate program in c++ which runs on Windows 2088 and accesses files from Windows 2003.
-
February 27th, 2013, 02:23 AM
#5
Re: Find and Open a File on Remote Computer
The DLL contains the C++ code which search for a file and try to open it.
The DLL need to be registered on Windows 2008 and the the function to search a file will be called from the ASP code.
-
February 27th, 2013, 02:53 AM
#6
Re: Find and Open a File on Remote Computer
@umesh, can you answer the questions asked in post #3?
-
February 27th, 2013, 05:01 AM
#7
Re: Find and Open a File on Remote Computer
I have saved the DLL in C:\Windows\Syswow64 folder on Windows 2008 and then registered using regsvr32 command.
Yes, the DLL is COM server.
-
February 27th, 2013, 04:33 PM
#8
Re: Find and Open a File on Remote Computer
Is the dll 32 bit or 64 bit? If 64 bit, is the 2003 system 32 or 64?
If you have access to the dll source code, I'd recommend creating a debug build and add some trace statements (or logging) to the dll to see what's going on.
It could be a permissions problem, different path, or a host of other problems. You need to trace/log to find out exactly where things are going wrong.
-
February 28th, 2013, 07:44 AM
#9
Re: Find and Open a File on Remote Computer
Originally Posted by Umesh...
Yes, I can access the file from Windows 2008 on the Windows 2003. I have written one small seperate program in c++ which runs on Windows 2088 and accesses files from Windows 2003.
Okay, how much you know about COM servers? Are you aware you need to register COM server in the system where you are to invoke one? So did you register it? Otherwise, which way you create the class the DLL hosts?
Best regards,
Igor
-
February 28th, 2013, 10:34 AM
#10
Re: Find and Open a File on Remote Computer
@Arjay The DLL is 32 bit and I need to register it on Windows 2008 - 64 bit system.
Do you have any idea, if it makes any difference and if yes then whats that exactlly .... Please help!
-
February 28th, 2013, 08:49 PM
#11
Re: Find and Open a File on Remote Computer
Originally Posted by Umesh...
Do you have any idea, if it makes any difference and if yes then whats that exactlly .... Please help!
I am trying to help, did you see my previous response?
If you have access to the dll source code, I'd recommend creating a debug build and add some trace statements (or logging) to the dll to see what's going on.
It could be a permissions problem, different path, or a host of other problems. You need to trace/log to find out exactly where things are going wrong.
What I mean here is you are going to have to debug the dll. Either step through the code in a debugger, attach a remote debugger to a debug build of the dll, or add some trace statements and logging.
-
March 1st, 2013, 04:47 AM
#12
Re: Find and Open a File on Remote Computer
Okay, I have found that I am getting error code 5 (i.e. Access denied for the user) by using GetLastError() method.
Now, I have tried to resolve this issue by providing all the access rights to the user, but still I am getting same issue(Error code 5)
-
March 1st, 2013, 01:59 PM
#13
Re: Find and Open a File on Remote Computer
Originally Posted by Umesh...
Okay, I have found that I am getting error code 5 (i.e. Access denied for the user) by using GetLastError() method.
Now, I have tried to resolve this issue by providing all the access rights to the user, but still I am getting same issue(Error code 5)
If the dll is running under IIS, you may need to grant the IIS or app-pool account access.
-
March 2nd, 2013, 12:14 PM
#14
Re: Find and Open a File on Remote Computer
Originally Posted by Umesh...
Okay, I have found that I am getting error code 5 (i.e. Access denied for the user) by using GetLastError() method.
Now, I have tried to resolve this issue by providing all the access rights to the user, but still I am getting same issue(Error code 5)
That's amazing. All this long thread, it does not give a single clue, when the problem happens. Is it registration? Or object creation? Else?
Best regards,
Igor
-
March 4th, 2013, 09:31 AM
#15
Re: Find and Open a File on Remote Computer
Originally Posted by Arjay
If the dll is running under IIS, you may need to grant the IIS or app-pool account access.
Thanks for the tip Arjay... I am trying the way you suggested but till now its not been resolved.
Please keep posting if anyone has the clue for it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|