I use an asp-page to start a scripted application on my webserver. I access this page through http. At the moment I read commands for this script from the same server and write logfiles also to this server. My aim is to make it possible to put commands on some network drives so my script can use them and write the logfiles there, too.
Try this... I don't know if this will work or not. You'll need to enable the Internet Guest account or the "Guest" account access to the share of your network server.
<%
Dim objFSO, objFile, strFileName
strFileName = "\\someserver\sharename\filename.txt"
Set objFSO = Server.CreateObject("Scripting.FileSystemObject"
Set objFile = objFSO.OpenTextFile(strFileName, 1, True)
Response.Write objFile.ReadAll
objFile.Close
Set objFile = Nothing
Set objFSO = Nothing
%>
Thanks baddos! You helped me pin my problem. I cannot use any guest account cause there is none on the servers I need. I would like to use the account of the user that opens the asp page and without any further authentication if possible. Something like a "net use" within asp where the windows authentication is used.
You can through this script into a virtual directory on your website. Disable anonymous access to that directory, and only allow the Integrated Windows authentication. This will force a Windows login dialog box and will log in that person w/ their NT credentials.
The asp-page is in a virtual directory and I use win2000 authentication to allow users to get there in the first place. But how do I authentify my script/my webserver on the other server?
Is the webserver and the file server in the same domain? If not, make a user w/ the same name and password that is on both boxes and NT will handle the rest.
Unfortunately I only have administrative rights on my webserver and not within the company network or any other servers.
I asked the admins to create a service user that has rights on the server I need to write to. But I don´t know how to use "Mr Service" or how to get along without him.
Thanks for your patience!
Just have them create a user that can read and write on the shares you need. Then create that username and password on your webserver and setup your website's anonymous access to use that username/password.
I don't think you can mix your Authentications. If your using NT Authentication to logon to the website then those peopl ethat logon will need to have access to the network. If your using anonymous access (possibly with a db driven login) than you can set the default user for the site to your "Mr Service" user that has access (you should be able to set this user as default in the permissions section of your default web properties instead of the standard internet user they use).
-Tarwn ________________________________________________
Get better results for your questions: faq333-2924
Frequently Asked ASP Questions: faq333-3048
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.