eramgarden Posted September 17, 2004 Posted September 17, 2004 I found an example : http://www.ondotnet.com/pub/a/dotnet/2002/04/01/asp.html Anyway, in one line of code, Dim filename As String = "\\<ip address>\reports" How can I reference a path that is in ANOTHER server?? With that line of code, path is not found. How can I do this?? Quote
Administrators PlausiblyDamp Posted September 18, 2004 Administrators Posted September 18, 2004 Have you tried using the \\server\reports as a path? If so does it generate any errors? Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
eramgarden Posted September 18, 2004 Author Posted September 18, 2004 I did try that, it still fails at "if file.exists" line. This is what an ex-coworker said but not sure if this is correct and if so how can I give it access When you run ASP.NET applications it runs in a different security context to you as a user. Therefore the resources that you have access to are not necessarily the same as the resources as the ASP.NET application. You will have to grant access to the account ASP.NET is using to the share. You can find out the name of the account from IIS - In the properties for the virtual directory, select the Directory Security tab, press the Edit button in the Anonymous Access and Authentication Control group. The dialog will be displaying the account ASP.NET is using for anonymous access. Quote
Administrators PlausiblyDamp Posted September 18, 2004 Administrators Posted September 18, 2004 ASP.Net applications run as the \ASPNET account - this account only exists on the local machine and as such cannot be given permissions to network resources. Impersonation is probably the way to go - search these forums and you should get a few hits on the subject, failing that reply here and I'll see what I can dig up. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
eramgarden Posted September 18, 2004 Author Posted September 18, 2004 Thanks so much. I will do that. Quote
eramgarden Posted September 19, 2004 Author Posted September 19, 2004 Thanks SO MUCH I found this link: http://www.internet.com/icom_cgi/print/print.cgi?url=http%3A//www.15seconds.com/issue/020312.htm Did the Impersonation, works great! THANK YOU SO MUCH. Quote
eramgarden Posted September 19, 2004 Author Posted September 19, 2004 well, dang it. This works great on my laptop. I setup the app on the production machine. I moved the code. I have : <identity impersonate="true" /> and Anonomous Authentication unchecked Just like my laptop. When I go to the production URL, I get a "enter network password" box.!!! WHY??? Then I enter my windows userid/password/domain but it doesnt take it. I also went to Tools/ Options/advanced/ and checked "Enable windows intergrated authentication, closed browser, reopened it But still got the box. Why??? Any ideas on what to do?? Quote
bri189a Posted September 20, 2004 Posted September 20, 2004 You could have your network administrator make an account for asp that is domain level then give that level the appropriate permissions and then set your aspnet to run as that domain user rather than the local ASPNET account. Not sure how that portion is done, maybe PD can help with that part. Quote
eramgarden Posted September 20, 2004 Author Posted September 20, 2004 I found out that the production machine is in "DMZ" zone and file sharing is blocked, we can only FTP files from that machine to other machines we have on the network... Now, if the Network admin creates " domain level then give that level the appropriate permissions "... Can I access the files?? or do I still need to somehow code FTP in my app?? Quote
eramgarden Posted September 20, 2004 Author Posted September 20, 2004 Resolved We're gonna use a server that's not in DMZ. Quote
bri189a Posted September 20, 2004 Posted September 20, 2004 Just make sure you Domain Admin does it right and doesn't do something generic and end up giving Domain Administrative permissions to the ASP net account - believe me I work in that field and not all of them are that bright. Ideally it should be a User account that does not have the ability to log on to any local machines, connect to any servers, etc... it only has permission to access the file groups you are trying to access.... otherwise you could be exposing your entire network to hackers. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.