473,326 Members | 2,013 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,326 software developers and data experts.

how to login intranet by administrator?

Hi,
I want to copy files from my local disk to server or from server to my
local disk.

public struct NETRESOURCE
{
public int dwScope;
public int dwType;
public int dwDisplayType;
public int dwUsage;
public string lpLocalName;
public string lpRemoteName;
public string lpComment;
public string lpProvider;
};
[DllImport("mpr.dll", EntryPoint="WNetAddConnection2")]
public static extern int WNetAddConnection2A(
ref NETRESOURCE lpNetResource,
string lpPassword,
string lpUserName,
int dwFlags);

In codes:
string szPwd = "test";
string szUser = "administrator";
NETRESOURCE netRes = new NETReSOURCE();
netRes.lpRemoteName = "\\server\c$"
....
int errInfo = WNetAddConnection2A(ref netRes,szPwd,szUser,CONNECT_UPDATE_PROFILE);
....
why return errorInfo is not find share resource?
how to connnect the default share resouce ?

thanks!

best wish,

harvie

2006-4-23

Apr 23 '06 #1
0 1023

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

Similar topics

4
by: nicholas | last post by:
Hi, Got an asp.net application and I use the "forms" authentication mode defined in the web.config file. Everything works fine. But now I would like to add a second, different login page for...
2
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public...
0
by: OLAP novice | last post by:
Our administrator wants us to send login/password information to an Internet site that has been created for our company. The same login/password combination is used for a large group and he...
5
by: djhexx | last post by:
Hi. We have an asp.net intranet application written in VB that uses forms authentication for all it's pages. I have a C# asp.net application that I just wrote. The company would like the C#...
2
by: jdstroud | last post by:
I have an asp.net application on our intranet, and I am trying to use windows authentication. My problem is that I would like to get the user's credentials without having the login / password...
6
by: =?Utf-8?B?UGFyYWcgR2Fpa3dhZA==?= | last post by:
Hi All, We have a requirement where we have to develop a custom Login Page which will accept user's NT credentials ( Username , password, domain name). This then needs to be passed to a website...
6
by: Kat | last post by:
Every time I attempt to run a localhost website, it asks me for a login, as if I am not a user on the local machine. I am a user on the local machine, I am an admin on the local machine. I am not...
3
by: =?Utf-8?B?QWx5?= | last post by:
User (Administrator) was some how deleted but still classed as there, though on login it does not exist. On last Microsoft update came unexpectedly just as I was shutting down as power was due to...
10
by: chirag1989 | last post by:
Hi I m makin Intranet based Library Management System On Homepage i have asked user to enter their login id and select from one option button weather he is a administrator or member.So as per...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.