473,394 Members | 1,812 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,394 software developers and data experts.

Double Hop Network Issue

Still working on trying to solve this issue. I have an ASP.NET aspx
page that needs to copy a file to a fileshare on another server.

As a simple test I have been trying to do the following:
string fullPath = @"\\someserver\someshare\log.txt";
File.WriteAllText(fullPath,"test");

I get an error.
I even get an error if I try to use the code from:
http://www.codeproject.com/useritems...tion_in_Ne.asp
I call the impersonate() method right before my WriteAllText call.
Is there something wrong with the codeproject code?

I have also tried using the impersonate stuff in the web.config with
no luck.

I am using IIS 5 on Windows 2000 as the ASP.NET server.

Thanks,
Kelly Greer
ke*********@nospam.com
change nospam to yahoo
Nov 19 '07 #1
2 1391
LVP
This will not help but read it.

what happens if you open the share folder on someserver\someshare from your
executing code-server, then see what happens.
( yes Start-Run- type \\someserver\someshare\ then authenticate
manually ) this is just a test
after you manually logon on the share folder then run your code and if it
works then you know is is authentication problem still.
some impersonation code worked for me and it did not work for me for some
servers.
I don't know why either. you might have to be on the same domain or
something... I am still trying to figure it out.
"kellygreer1" <ke*********@yahoo.comwrote in message
news:da**********************************@v4g2000h sf.googlegroups.com...
Still working on trying to solve this issue. I have an ASP.NET aspx
page that needs to copy a file to a fileshare on another server.

As a simple test I have been trying to do the following:
string fullPath = @"\\someserver\someshare\log.txt";
File.WriteAllText(fullPath,"test");

I get an error.
I even get an error if I try to use the code from:
http://www.codeproject.com/useritems...tion_in_Ne.asp
I call the impersonate() method right before my WriteAllText call.
Is there something wrong with the codeproject code?

I have also tried using the impersonate stuff in the web.config with
no luck.

I am using IIS 5 on Windows 2000 as the ASP.NET server.

Thanks,
Kelly Greer
ke*********@nospam.com
change nospam to yahoo

Nov 20 '07 #2
Thanks I'll try that.

I guess I'll also try the LogonUser API from a "Thick Client" on my
local machine and see what happens. The LogonUser calls returns
0 ...meaning the logon itself is failing... don't know why. Does an
ASPX page need to being running with some certain set of permissions
to be able to use the LogonUser API?

I will probably move over to Windows 2003 and IIS 6 if I keep having
issues. I'll try changing the security context of the application
pool.
It's a shame this isn't easier to solve. I wasted at least 4 hours on
this today.

Kelly Greer
ke*********@nospam.com
change nospam to yahoo


On Nov 19, 8:55 pm, "LVP" <lvp_agent...@hotmail.comwrote:
This will not help but read it.

what happens if you open the share folder on someserver\someshare from your
executing code-server, then see what happens.
( yes Start-Run- type \\someserver\someshare\ then authenticate
manually ) this is just a test
after you manually logon on the share folder then run your code and if it
works then you know is is authentication problem still.
some impersonation code worked for me and it did not work for me for some
servers.
I don't know why either. you might have to be on the same domain or
something... I am still trying to figure it out.

"kellygreer1" <kellygre...@yahoo.comwrote in message

news:da**********************************@v4g2000h sf.googlegroups.com...
Still working on trying to solve this issue. I have an ASP.NET aspx
page that needs to copy a file to a fileshare on another server.
As a simple test I have been trying to do the following:
string fullPath = @"\\someserver\someshare\log.txt";
File.WriteAllText(fullPath,"test");
I get an error.
I even get an error if I try to use the code from:
http://www.codeproject.com/useritems...tion_in_Ne.asp
I call the impersonate() method right before my WriteAllText call.
Is there something wrong with the codeproject code?
I have also tried using the impersonate stuff in the web.config with
no luck.
I am using IIS 5 on Windows 2000 as the ASP.NET server.
Thanks,
Kelly Greer
kellygre...@nospam.com
change nospam to yahoo


Nov 20 '07 #3

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

Similar topics

15
by: Phillip Rhodes | last post by:
Hi all, I have a question I hope someone can help me with: I'm doing some communication over a socket, and have need to send and receive values of type double. I'm doing everything in terms of...
5
by: Mike McIntyre [MVP] | last post by:
I am working on an issue where and ASP.NET web application on one computer (A) needs to access files on a network mapped drive (B). This application uses as DSN on (A) that maps a proprietory...
7
by: Joe Ross | last post by:
I've been working with Microsoft support for over 3 weeks now on an intermittent General Network Error we're seeing in our production environment between our ASP.NET application and SQL Server...
8
by: Lionel | last post by:
Hi all, I'm facing a strang issue doing calculation on Double values. I read some thread on the newsgroups warning about type translations (eg Single to Double), but here I'm doing no conversion...
2
by: Michael | last post by:
We have an ASP.NET 2.0 web application running on a Windows 2003 domain controller. Part of that application needs to read and write files from and to a network share ( living on a MAC Xserveraid)...
1
by: Jay Hamilton | last post by:
Hello, I am running into an invalid address alignment error on an HPUX box when I attempt to lookup a value in a STL map. The argument being passed in is a double, which is accessed from a...
9
by: =?Utf-8?B?Qnlyb24=?= | last post by:
How do you convert a hex string into a double using C# in framework v2.0? I've seen this question answered before, but apparently something has changed in 2.0 that negates the old solution that...
20
by: hippomedon | last post by:
Hello everyone, I'm looking for some advice on whether I should break the normalization rule. Normally, I would not consider it, but this seems to be a special case. I have created an...
5
by: xzzy | last post by:
I am writing an app that enables a user to reply to a newsgroup. The proper syntax for From: is "screen name" email@address.com and over all, it should look like: --
1
by: Bhrionn | last post by:
Hello World, I am working on implementing a build for my companies application. The scenario implemeted is producing the error: ‘Class does not support automation or does not support expected...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.