473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

connecting to a cifs or windows share on a nas device using a specificusername and password

In ASP.Net, how can we connect to a nas that uses cifs for its file
sharing protocol. Currently we should be able to provide the ip address
or hostname of the nas, the sharename along with any directories to go
directly into that sharename, and the username and password. This
username and password will not be on the server hosting the asp.net
pages from the local usernames and password.

Currently we can only try to impersonate a local username and password
that is already on the local server. What we want to do is normally
when trying to connect to a windows share, it tries your normal username
and password, and if that doesn't work, it asks for a username and
password. Rather we want to be able to access it by telling it what
username and password to use like you can with mounting a drive letter.

The server is windows 2003. The nas might also be part of a domain, but
if it's not and we can only put in just the username instead of the
domainname/username, that's fine too.

It is the dotnet 2.0 framework we are using here. We'd rather not use
3.0 right now.
Dec 27 '07 #1
1 2438
Why post to so many newsgroups? One approach is to create an account that
has the necessary permissions and then impersonate that from your Web page.

--
--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99

"Carl" <ca**@purpleglobe.comwrote in message
news:uH****************@TK2MSFTNGP04.phx.gbl...
In ASP.Net, how can we connect to a nas that uses cifs for its file
sharing protocol. Currently we should be able to provide the ip address
or hostname of the nas, the sharename along with any directories to go
directly into that sharename, and the username and password. This
username and password will not be on the server hosting the asp.net pages
from the local usernames and password.

Currently we can only try to impersonate a local username and password
that is already on the local server. What we want to do is normally when
trying to connect to a windows share, it tries your normal username and
password, and if that doesn't work, it asks for a username and password.
Rather we want to be able to access it by telling it what username and
password to use like you can with mounting a drive letter.

The server is windows 2003. The nas might also be part of a domain, but
if it's not and we can only put in just the username instead of the
domainname/username, that's fine too.

It is the dotnet 2.0 framework we are using here. We'd rather not use 3.0
right now.
Dec 31 '07 #2

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

Similar topics

2
by: Tyler Sample | last post by:
I've got a Samba share set up on a LINUX box. It's set up for user-level access. A Windows user is mapped to a UNIX user. When accessing through file explorer, a username/password box pops up,...
5
by: JohnFol | last post by:
I am using the Win23 API WNetCancelConnection2 and can sucessfully make a connection to a share within my class. The class is called from a Windows Form based test harness. When I instantiate...
3
by: Steven Fox | last post by:
============================================================ About DB2 Administration Tools Environment ============================================================ DB2 administration tools level:...
3
by: Robert W. | last post by:
I'm embarking on a project that will have both a desktop application and a Pocket PC application. It seems logical to have as much code as possible sitting in a shared project, which would be...
4
by: Sacha Korell | last post by:
First of all, sorry for cross-posting, but this newsgroup is much busier than "aspnet.mobile". I'm trying to create a portal page that redirects depending on the device that is connecting. ...
4
by: Matt Dockerty | last post by:
Hi, I'm trying to connect to a network share using a username / password / domain of my choosing. I've tried the WindowsIdentity.Impersonate route but can only impersonate the users on the...
0
by: Rob Oakley | last post by:
I have an embedded system running FreeBSD (5.1) that does not have any local (rotating) storage (i.e disk drives). PostgreSQL also runs on this box and (at this point) has two tables. It is an...
2
by: Victor Alvarez | last post by:
Hi, I'm not sure if anyone can help with this issue I have, but I would appreciate any thoughts. We are running DB2 8.2, fp11 on windows 2003. The goal is to backup to an external EMC SAN...
4
by: duffaz | last post by:
I am trying to I am trying to connect to an SQL Server using a vb.net program. It works if I put it on the SQL Server computer, but will not connect over my local network that is set up as a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.