Accessing Remote Files From Web Service?

Jul 15, 2010

My web service needs to open some files located on a remote computer.

From Windows I can do the authentication so I can see those files using the File Explorer.

If I try to open the files from my Web Service while it's running using Visual Studio (ASP.NET Development Server) it also works.

However, if I do everything from IIS it doesn't.In order to find out where is the problem what I did was to run a network sniffer and I found out that when using IIS, the system will try to use the account 'ASPNET' to login into those remote computers which will obviously fail.

However this doesn't happen if I run from the IDE (Using the ASP.NET Development Server)I found out that if I use Impersonation for accessing this it will work, the problem is I need to have the same account names on the computer running IIS so I would rather not to do that.

Why is it working from the ASP.NET Development Server and not from IIS? Is there a way to give full access to the ASPNET account?

View 1 Replies


Similar Messages:

Authentication Failed When Accessing Remote Drive From Web Service?

Sep 30, 2010

I have installed a web service in a client machine, its accessing a mapped network drive from a remote machine. But when its trying to read files from that file I'm getting this error

Code:

Message:
Authentication failed
Description:
QBWC1012: Authentication failed due to following error message.
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.IO.IOException: Logon failure: unknown user name or bad password.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption)
at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption)
at System.IO.Directory.GetFiles(String path, String searchPattern)
at WCWebService.WCWebService.authenticate(String strUserName, String strPassword) in C:inetpubwwwrootinvoicecreatews codeinvoicecreatewsWCWebService.asmx.cs:line 463
--- End of inner exception stack trace --- See QWCLog for more details. Remember to turn logging on.

I have supplied user crendentials also, the same web service working in another machine with the same mapped drive with the same user credentials. Manually I can map the drive using the credentials which I'm passing thru the application.

View 3 Replies

Deploy Files Is Connecting With Remote Desktop Client And Send Files

Jun 5, 2010

i have a production server that does not have ftp access. Possible way to deploy files is connecting with remote desktop client and send files.

As you know this approach is highly hard and time inefficient.

View 4 Replies

Architecture :: WCF Service Be Used To Receive Data As Needed From A Remote Sender Or Service?

Feb 25, 2011

I am not sure which approach I should use. I have a web application that needs to get/receive data from a third party application that is in a secure remote network. The data needs to be secure during transport. The data layers cannot be exposed and the databases will not talk to each other. The data will be received from remote application on demand, or will get at scheduled intervals.

I have looked at WCF, but not sure if this will work. Can a WCF service be used to receive data as needed from a remote sender or service? Is this a secure way of doing it? I have also looked at SFTP using some XML/XSLT, but I don't think this is the right way to go. In addition, some data may be transported from my web application to the remote application (mostly reports at first). What protocols are used to transfer data between HIPAA compliant applications?

View 7 Replies

Accessing Remote Machine In C#?

Nov 15, 2010

I want to access some places on a remote machine.The folder i want to access have full control to EVERYONE. The code given below is used to access network path.

[code]...

The application run fine if both the host computer and the remote computer to be accessed having os windows xp .The application also run fine if the application is running inside visual studio .

Then my problems is ,any one of the machine( server and remote machine)having an os newer then windows xp( like windows 7, server 2008) locationInfo.Exists always false.

View 2 Replies

Accessing Remote Servers Details?

Sep 6, 2010

How can I access remote server's details like RAM details, CPU details etc with a ASP.NET application. I used System.Management class and wmi but the application runs too slow. Is there any another way to do this which is fast and efficient.

View 4 Replies

Accessing A Notepad File From A Remote Machine In A Webpage?

Jan 6, 2011

I have log files in different machines. Now i am developing a web page in my development machine (Windows XP, IIS 5.1 installed). In the web page i want to give a link(may be hyperlink or linkbutton). On clicking the link it should access the log file in the particular machine and it should give a popup with open and save option as given in the normal web applications. I am using the following code snippet but its throwing error "Cannnot resolve the URL"

Response.ContentType = "text/txt";
Response.AppendHeader("Content-Disposition", "attachment; filename=log.txt");
string str = ResolveClientUrl("\ip address\FolderName\logs\log.txt");
Response.TransmitFile(str);
Response.End();

Here FolderName is a shared folder in the machine(which ip address is mentioned).

View 3 Replies

Security :: Authentication Fails While Accessing The Application From Remote Server?

Mar 21, 2011

While running an app from the server where it is deployed the website works fine, however when trying to access it from a different machine(placed in same network), using the same credentials, it shows that I am not an authenticated user.

[code]....

View 13 Replies

Incorrect Syntax Error When Accessing Remote Stored Procedure?

Jul 23, 2010

I'm still trying to deploy this site, but with every problem I solve, another arises. Anyways - I've set up the database at my hosting to allow remote connections, and it is running Sql Server 2005. On my development machine, I am working with Sql Server 2008.

I've installed the asp.net schema on my hosted database, and have created several users from the ASP.NET web administration interface, as well as tested that the login works. Running the application locally with the remote connection string nets the same results. However - I'm able to run my scripts and generate my tables and stored procedures without errors - but when the site is run I get the following error on all of my .aspx pages that try to access a stored procedure:

Server Error in '/' Application. Incorrect syntax near 'LoadProfileData'. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near 'LoadProfileData'.

Source Error:

Line 62: adapter.SelectCommand.Parameters.Add("@ProfessionalName", SqlDbType.VarChar).Value = professionalName;
Line 63: DataSet profile = new DataSet();
Line 64: adapter.Fill(profile, "Profile");
Line 65: return profile;
Line 66: }

Is this a possible Sql 2005 vs 2008 issue? I'm hoping someone else has seen this issue in a similar scenario and can point me in the right direction. The server is running asp.net 2.0, 3.0 and 3.5 and IIS 7.0.

Stored Procedure:

Drop procedure CreateDefaultProfile
GO
Create procedure CreateDefaultProfile(@UserName varchar(256))
as
declare @ProfessionalID uniqueidentifier

[Code].....

View 3 Replies

WCF / ASMX :: Access Denied And Null Returned While Accessing Web Services From Remote Server?

Sep 2, 2010

writing a web Service and one of its web method, I want it to download a png file in form

of buffer from remote server. And My consume application will write that buffer retured by Web service in to file on User's Computer.

However, I am able to do this using Local Web Service but when I published that service on my web server, I always get null retuned

And even in one of my test code while copying file from that server , I always get Access Denied.


Following things I have done for above issue.

1] I even tried making the Anonymous user for the web service the system administrator (with the correct password), to no avail.

2] I also tried sharing out the folder I'm pulling files from to allow access from Everyone.

[Previously same service was working fine on another remote server with IIS 7.0, we checked server IIS Settings but in vain.]

if you know where we are mistaken guide me to resolve this issue as its very urgent.

View 2 Replies

Sql Server 2005 - Incorrect Syntax Error When Accessing Remote Stored Procedure?

Jul 23, 2010

I'm still trying to deploy this site, but with every problem I solve, another arises. Anyways - I've set up the database at my hosting to allow remote connections, and it is running Sql Server 2005. On my development machine, I am working with Sql Server 2008.

I've installed the asp.net schema on my hosted database, and have created several users from the ASP.NET web administration interface, as well as tested that the login works. Running the application locally with the remote connection string nets the same results. However - I'm able to run my scripts and generate my tables and stored procedures without errors - but when the site is run I get the following error on all of my .aspx pages that try to access a stored procedure:

Server Error in '/' Application. Incorrect syntax near 'LoadProfileData'. Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near 'LoadProfileData'.

Source Error:

Line 62: adapter.SelectCommand.Parameters.Add("@ProfessionalName", SqlDbType.VarChar).Value = professionalName;
Line 63: DataSet profile = new DataSet();
Line 64: adapter.Fill(profile, "Profile");
Line 65: return profile;
Line 66: }

Is this a possible Sql 2005 vs 2008 issue? I'm hoping someone else has seen this issue in a similar scenario and can point me in the right direction. The server is running asp.net 2.0, 3.0 and 3.5 and IIS 7.0.

View 1 Replies

Getting Files From Remote Machine?

Jan 14, 2011

I am working with SFTP applications also i am having one scenario. I have to search particular format files from remote machine and also need to store or copy the corresponding files into local system.

We are using user credentiaal to connect with remote machine

How could we achieve the scnenario.

View 3 Replies

WCF / ASMX :: How To Debug A Remote Web Service

Jan 20, 2011

How do you guys debug your remote web services?

View 1 Replies

Web Forms :: How To Upload Files To Remote Server

Feb 1, 2011

I am developing a intranet application in C#.

I am developing a application where files can be uploaded to staging area. and after saving to staging area a email confirmation is send.

After browzing for the file from local drive ,user gives a email id and click upload button ,then file should be saved to staging area. and then aconfirmation email should be sent to email id entered. we are using Exchange server to send emails.

View 2 Replies

Architecture :: How To Download Multiple Remote Files

Nov 18, 2010

We need to download multiple files from remote servers. It is a process that would take few hours to complete, since we are talking about images ~50kb each and more than 250.000 in total. Each images will downloaded, resized and then imported to SQL.DB, so we do not need to write files to the disk. Also the applications need to use network credentials, since it is behind ISA.

From your experience, what is the best method to implement this? Should we use WebClient or HttpSockets? Should we use Async methods or Threads ? How can we implement for example 5 simultaneously download to achieve better speed, since we may getting files from many different servers at once?

View 2 Replies

Web Forms :: Move Files To Remote Computer?

Jul 17, 2010

my wish is to move Files from ASP.NET Web Application(VB.NET) to remove Computer.

ive tried using a code behind, with no success..

i got en error which is "Could not find a prat of the path '\ComputerNameFolder' "

i tried instead "Computer Name" use IP address, and the same error.

(I gave All the premmission...)

i tried to create a Batch file, which is working if i run it.

but when i try to Execute it on the VB Code, i got nothing, it doesnt fire.

i tried (System.Diagnostics.Process.Start("C:File.bat"),Shell("C:File.bat") )

View 1 Replies

WCF / ASMX :: How To Call Remote Web Service From Application

Apr 13, 2010

We have two application created one for webservice and other application will call the methoddefined in webservice .The problem is we want to add webservice in our application dynamically

View 4 Replies

WCF / ASMX :: How To Call - Consume Remote Web Service

Nov 13, 2010

I need to call remote web services for example [URL]. So how to do it? I watched all asp.net video about web servies but in all videos they speaking just about local web services,

View 5 Replies

Access Remote Computer Windows Service Using Asp

Dec 20, 2010

how to access remote computer windows service using asp.net

View 2 Replies

Security :: Web Service Execute On Remote Computer?

Jan 18, 2010

I'm using asmx web service to lock a folder on remote computer!

When I run web service on local machine everything working fine, but when I run it on remote computer nothing happen, folder on remote computer stay unlock!

I supose that I need to set security permission for this web service on remote computer, but i don't know where! So, what I need to enable executing this service on remote computer?

View 3 Replies

Web Forms :: How To Upload And Download Files From Remote Servers Without Using FTP

Sep 14, 2010

Can we upload and download files from remote servers through code without using FTP?

View 2 Replies

Web Forms :: What Is The Best Method To Upload Files To A Remote Host

May 18, 2010

i have a website that accepts files from users.

the site currently save all files to a local directory (~/Data/<Date>), which can be accessed via [URL](Public server)

however to increase performance i need to save the file to a remote http host. ex [URL] (different public server)

i have ftp access to all my public server.

i'm just confused as to which is the most secure way to upload the files from codebehind.

FTP or HTTP Post.

the <date> section of the URL is dynamicall generate using Directory.CreateDirectory(Server.MapPath("<year><month><day>");

View 7 Replies

Security :: Saving Files On A Remote Server / Specifying Credential?

Apr 30, 2010

My web application is on a Webserver that is in a DMZ .

the web application must save on the server in LAN some files, but the webserver cannot access the file server because has no right to access. i wouldn't create an account for the web server, but i would that any time the application has to upload a file onto the file server make a connection that encapsulate credentials, then the upload starts ,finally the connection closes.

Is possible with some Objects to do this type of work?

View 1 Replies

Data Controls :: How To Get List Of Files On Remote Server

May 7, 2015

I am having the following code which read all file names from local machine and write them in text file. I need to read File Names from Remote Server.

StreamWriter objsw = new StreamWriter("C:log.txt",true);
public void ReadAllFiles()
{

[Code].....

View 1 Replies

C# - How To Set Up A Windows Service To Listen To Events On A Remote Machine

Aug 29, 2010

I have a asp.net web app and a windows service running on separate machines. How can i enable the windows service subscribe/listen to events raised by the asp.net app on the remote machine? What methods can i use?n example of events that can be raised on the asp.net app is a user uploading a file. Once the upload has completed the windows service should be notified so it can do some work. It seems that there needs to be a layer in between asp.net and windows service, possibly another windows service or WCF app? Or plain old polling through a shared database containing the state?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved