473,499 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

accessing files on intranet

Hi!

How can I access files on intranet. I have mapped a
serverfolder to the drive letter G and try to access a
file from ASP.NET, but File.Exists("G:\filename.ext")
returns false. The same code in Windows Forms returns
true, so I guess it has something to do with the
permissions. I set all rights to the IUSR_machinename.
This is enough to make it work locally on C: but not on G:

any suggestions?

/Miro
Nov 18 '05 #1
3 1399
By default, ASP.NET runs as a user that doesn't have
access to the network. In fact, I believe that the
ASPNET user is a local user. TO test out this theory, go
into the machine.config and change the processModel
attribute for user and password to be a user (domain
qualified) and password that does have access to the
network.

Hope this helps.

Bruce Johnson
http://www.ObjectSharp.com/Bruce
-----Original Message-----
Hi!

How can I access files on intranet. I have mapped a
serverfolder to the drive letter G and try to access a
file from ASP.NET, but File.Exists("G:\filename.ext")
returns false. The same code in Windows Forms returns
true, so I guess it has something to do with the
permissions. I set all rights to the IUSR_machinename.
This is enough to make it work locally on C: but not on G:
any suggestions?

/Miro
.

Nov 18 '05 #2
Thanks Bruce!

I've tried it but got the same error. What solved this
for me was two things. Uncheck the "anonymous access" in
IIS and insert this:

<identity impersonate="true"/>

into web.config. Anyway I still have trouble making it
work on Novell servers. It works WXP->W2000 and W2000-
W2000 but not W2000->Novell. I'm using windows authentication with adm rights. Any suggestions on this
one?

/Miro
-----Original Message-----
By default, ASP.NET runs as a user that doesn't have
access to the network. In fact, I believe that the
ASPNET user is a local user. TO test out this theory, gointo the machine.config and change the processModel
attribute for user and password to be a user (domain
qualified) and password that does have access to the
network.

Hope this helps.

Bruce Johnson
http://www.ObjectSharp.com/Bruce
-----Original Message-----
Hi!

How can I access files on intranet. I have mapped a
serverfolder to the drive letter G and try to access a
file from ASP.NET, but File.Exists("G:\filename.ext")
returns false. The same code in Windows Forms returns
true, so I guess it has something to do with the
permissions. I set all rights to the IUSR_machinename.
This is enough to make it work locally on C: but not on

G:

any suggestions?

/Miro
.

.

Nov 18 '05 #3
Hi Miro,

Firstly I want to thank Bruce for his great help in this issue.

I apologize for it if there is any misunderstanding. Based on my research
and experience, the following article is useful to this issue.

INFO: Implementing Impersonation in an ASP.NET Application
http://support.microsoft.com/default...b;en-us;306158
"...
Impersonate a Specific User for All the Requests of an ASP.NET Application
To impersonate a specific user for all the requests on all pages of an
ASP.NET application, you can specify the userName and password attributes
in the <identity> tag of the Web.config file for that application. For
example:

<identity impersonate="true" userName="accountname" password="password" />
..."

Please make sure that you are using the administrator account to test this
issue. If I have misunderstood your concern, please feel free to let me
know.

On the other hand, I am not familiar with Novell. If the above solution
does not resolve your problem, please try to contact Novell/Netware for the
help. Thank you for your understanding.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 18 '05 #4

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

Similar topics

3
12306
by: Bill | last post by:
I'm creating a company intranet, and every employee has certain program we want them to be able to run from it, meaning we want the link to the program to be on the intranet page. For example,...
2
2565
by: | last post by:
Hi, This does sound like a bit of a weird thing to ask so I will state my question and then further down explain why I am trying to do it. So if you have the answer then reply! Or if you...
5
1685
by: Simon Harvey | last post by:
Hi everyone, I'm hoping for a little bit of advice on the following. I am in the process of making a small application that can send, receive and store email messages. The current area that I am...
36
16313
by: Thomas | last post by:
after spending countless hours trying, i give up and hope to get some help in here. on server1 i got the web myweb.com with my test.asp. in the test.asp, i'm trying to read a file from an UNC...
2
1708
by: Remco Bosman | last post by:
Dear Developers, I am building a little WebPart for the new sharepoint 2003 services. The webspart simply has to show a list of users and their phonenumbers, which come from our main domain....
5
2782
by: Khalique | last post by:
Hi everyone, I Hope that someone will be able to give me a hint to the solution to my problem. I have developed a web service (vb.net) that needs to access the folders / files and copy files to...
0
1090
by: lucian.nn | last post by:
Hello guys! I'm on a pilot project with a .net applet that should be able to upload a local file to a predefined network share. This applet should run inside IE browser and will be used for...
2
2359
by: Gerhard | last post by:
I have a .net application that I want to run in a DMZ, with the SQL Server and file system behind another firewall. Is there a secure way to get to files from my application, or would it be better...
12
3005
by: Doug | last post by:
I'm trying to access a schema file as such: Dim settings As XmlReaderSettings = New XmlReaderSettings() settings.Schemas.Add(webServiceNamespace, schemaFileName) settings.ValidationType =...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7009
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...
0
7178
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,...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4602
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1427
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 ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
302
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...

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.