473,563 Members | 2,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

External Server pull files from Internal Server

I have an application that needs to pull files from an internal server. This
is the setup. The web server is external facing, meaning exposed to the
internet. I then have a file server that sits inside our domain. I created a
COM object that can impersonate a user to retrieve files from that server.
However, I cannot get the application to pull files from the internal server.
I first tried a domain account that could reach both servers. This did not
work. I then had the network team create the same account on both machines.
This is not working either. I can impersonate the user (I am able to get the
user/users authenticated), but the script keeps coming back with and access
denied.

The application creates a wscript.shell object to zip files from the
internal server and place the actual zip on the external server. Here is an
example of the code:

<%

Set wShell = Server.CreateOb ject("WSCRIPT.S HELL")
strZip = "c:\progra~1\wi nzip\wzzip.exe -ee -ybc E:\\5200044298_ 1_mqh6Kw.zip
\\InternalServe r\SharedDrive\1 125010"

Set objLogon = Server.CreateOb ject("LoginAdmi n.ImpersonateUs er")
objLogon.Logon "localuseraccou nt", "password", "",2,0
Response.write objLogon.getTok en & "<br>"
Response.Write objLogon.getRes ult & "<br>"

set proc = wShell.exec(str Zip)

Response.Write "Return String = " & proc.StdOut.Rea dAll & "<br>"
set wShell = nothing
objLogon.LogOff
Set objLogon = nothing
%>

The com object basically takes a username,passwo rd,domain(if blank defaults
to local box),Logon Type, and Logon Provider. I have tried several
combinations of long on type and provider, but nothing seems to work. I am
thinking that I am really only authentication to the local machine and not to
the internal server. Our network people say they have everything between
servers is setup correctly, but I am not sure. I can, using the
FileSystemObjec t, copy the files from the internal server to the Web Server,
but it is when I try to use the script shell that this does not work. Any
ideas are appreciated.

Daniel C. Di Vita

Aug 29 '06 #1
1 3448
On Tue, 29 Aug 2006 07:01:02 -0700, Daniel Di Vita
<Da**********@d iscussions.micr osoft.comwrote:
>I have an application that needs to pull files from an internal server. This
is the setup. The web server is external facing, meaning exposed to the
internet. I then have a file server that sits inside our domain. I created a
COM object that can impersonate a user to retrieve files from that server.
However, I cannot get the application to pull files from the internal server.
I first tried a domain account that could reach both servers. This did not
work. I then had the network team create the same account on both machines.
This is not working either. I can impersonate the user (I am able to get the
user/users authenticated), but the script keeps coming back with and access
denied.

The application creates a wscript.shell object to zip files from the
internal server and place the actual zip on the external server. Here is an
example of the code:

<%

Set wShell = Server.CreateOb ject("WSCRIPT.S HELL")
strZip = "c:\progra~1\wi nzip\wzzip.exe -ee -ybc E:\\5200044298_ 1_mqh6Kw.zip
\\InternalServ er\SharedDrive\ 1125010"

Set objLogon = Server.CreateOb ject("LoginAdmi n.ImpersonateUs er")
objLogon.Log on "localuseraccou nt", "password", "",2,0
Response.wri te objLogon.getTok en & "<br>"
Response.Wri te objLogon.getRes ult & "<br>"

set proc = wShell.exec(str Zip)

Response.Write "Return String = " & proc.StdOut.Rea dAll & "<br>"
set wShell = nothing
objLogon.LogOf f
Set objLogon = nothing
%>

The com object basically takes a username,passwo rd,domain(if blank defaults
to local box),Logon Type, and Logon Provider. I have tried several
combinations of long on type and provider, but nothing seems to work. I am
thinking that I am really only authentication to the local machine and not to
the internal server. Our network people say they have everything between
servers is setup correctly, but I am not sure. I can, using the
FileSystemObje ct, copy the files from the internal server to the Web Server,
but it is when I try to use the script shell that this does not work. Any
ideas are appreciated.
What account is the script running under? Does that acount have
permissions?

Jeff
Aug 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3412
by: Christopher Benson-Manica | last post by:
Just FMI, if an external stylesheet is linked to a page (with <link>), will subsequent <style> tags override the values in the external stylesheet? -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
3
5746
by: eieiohh | last post by:
MySQL 3.23.49 PHP 4.3.8 Apache 2.0.51 Hi All! Newbie.. I had a CRM Open Source application installed and running. Windows Xp crashed. I was able to copy the contents of the entire hard drive onto a USB External Hard Drive. I have to assume I also copied the data. I
4
10510
by: ϲ | last post by:
'rar' is not recognized as an internal or external command, operable program or batch file. import os import time source = target_dir = r'e:\temp\bak' target = target_dir+time.strftime('%Y%m%d%H%M%S')+'.rar' rar_cmd = "rar a -idcdp %s %s" % (target,' '.join(source))
3
6015
by: al.cpwn | last post by:
do static and inline functions or members have internal linkage? I have been reading this newsgroup on google and found conflicting ideas. Can someone please help me understand why in some places inline may have external linkage while in others it has internal (from what I have read in comments by people). Are there any (other) places where...
2
6937
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
3
3408
by: Big Charles | last post by:
Hi, We have developed an ASP.NET web application and are planning to host it in an external Server, which provides us a good bandwidht. We need to put he web application outside because the bandwidtht that we have in our local office won't be enough for the number of users that access to our web app. But for backup issues, the database...
2
2470
by: Gnus | last post by:
Hi all! I have a little(?) problem with external schema location... I'm using xerces/xalan (C++) for doing some actions with some set of xml-files. Some of these files must validating against schema, which location specify in config file ("external" schema). Other files must be validating against schema, which location specify in parsed...
10
2383
by: Stefan Weber | last post by:
Hi, I'm trying to access the JavaScript code contained in a <scripttag via its "text" attribute. This works well, if the code is embedded in the HTML page. However, when the code is in an external file with the "src" attribute, it does not work anymore. Does anybody have an idea if there is any way (be it clean and simple or as a...
0
7579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7876
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7941
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3628
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3612
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2077
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.