Access Denied while window service in .net trying to create a file on remote server


             I am facing serious problem while running window service.

             My window service is running on remote machine(in the same private network) and I am trying to create a file using window service on my machine. When I am trying to create the file, the path I am giving is \\MyMachine\MyFolder. But, is giving 'Access Denied' exception. I need this asap. Hope I will get the response soon.


Thanks in advance,




1/15/2006 2:07:31 PM 9281 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 25

This most likely has to do with permissions.  It may be Windows permissions on the share.  Or it might be .NET permissions limiting the code access.

View My Blog Download My URL Rewriter and Reverse Proxy

Only $9.95/month, ASP.NET, 2GB & SQL 2005
1/15/2006 2:59:09 PM
Check the user under which the service is running. You probably need to give this user permissions on the folder in which you are writting the file.
Wessam Zeidan
1/15/2006 4:04:45 PM

MyService is running unding LocalSystem user. I changed it to 'User' account also, but Still I am getting same problem.

Me.ServiceProcessInstaller1.Account = ServiceProcess.ServiceAccount.LocalSystem

I wrote an exe and ran exe using service, then also I am getting access denied error.

Then, I created a Map Drive, pointing to the remote system(N:) and tried to access

N:\MyFolder\MyFile.xml, then also I am getting problem.

Where am I going wrong and what is the possible solution.




1/18/2006 3:52:29 PM

Similar Artilces:

Accessing remote file share from .NET service
Hi, I am developing a Web service with the method GetDocument(url, domain, user, password) that takes "file://remote_machine/File_share/some_path_some_file" as URL and streams back the the byte array with the file content. The remote machine is DIFFERENT from the one that hosts the service. I tried to use a textbook example: WebClient wc = new WebClient(); wc.Credentials = new NetworkCredential(userid, pass, domaiun); Byte[] pageData = wc.DownloadData(url); and so on Since I was getting security exception, I was trying to do impersonation, but it did not work ...

Access denied with non-admin Active Directory account in Windows Server 2003 SP2 accessing .NET 3.5 & AjaxControlToolkit web app
Hi all, This is a little complex problem so please bare with me and please see the attached diagram.Situation: a)Our corporation have 2 networks: 1 with Active Directory and 1 with Private Area Network (PAN).b) I deployed my application to the Application Server running Windows XP Pro SP2, located in PAN. c) In my application, I need to access physical folders and MSMQ service on the File Server (connected both to LAN and PAN with 2 NICs). running Windows Server 2003 SP1 I have shared these folders for everyone in Active Directory and allow everyone to have access to MSMQ on FileServer ...

Creating MS Access reports as PDF's using .Net Windows Services
I have a windows service running on a Windows 2000 server that opens up an instance of Microsoft Access 2000, saves an access report as a pdf file on the server, and then emails the pdf file to a group of users.  Just recently, the section of the code that creates the physical pdf file stopped working.  The service code was written in and opens up an instance of MS Access using impersonation of a user that has appropriate rights on the server.  I have recreated this service code as a console app, and when executing the console .exe, the pdf file is created and ...

is it possible to exporting XML file from a website to windows application through .Net Remoting or web services
Hello everyone ..i have a website through which i want interact with a desktop appplication to send a XML file.With .Net Remoting i think it's possible but abt webservices i m nt sure is it possible with .Net Remoting or Web Services???plz clear me abt it.    Possible with web services. Expose a web method and add a reference to the webservice to your windows application and call the web methodJeev~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~If you get the answer to your question, please mark it as the answer.  Hello Jeev..sorry for replying late.But I think my scenari...

Smart Device Application for file transfer to a remote server in .Net Compact Framework (Using Visual Studio.Net 2003,C# code)
Dear all, We are developing a smart device application (using C# code) for .Net Compact Framework where we need to write a programme in C# code to transfer a file from mobile device to remote server/machine.Can anyony help us regarding this aaplication.If you have already done this or you find any article/link regarding to this application then please let me know about that. My mail id : Looking forward for your reply soon. Regards Anirban   hi hav u got any solution , becoz i too need. plz share with me...

"SQL Server does not exist or access denied" error when trying to connect from a Windows Service
Hi! I understand that this topic is one of the most discussed topics ever. However i could not find the relevant information after going through (almost) all the posts so far. Hence this post. I am getting the 'SQL Server does not exist or access denied' error when I am trying to access SQL Server from a WINDOWS SERVICE. SQL Server and the Windows service are running on two different machines. (When they are on the same machine, it works). All the solutions I found so far are related to web apps. What should I do in the case of a windows service? My connection string uses SQL server au...

SQL Server Reporting Services for SQL SERVER 2000 AND Visual Studio.NET 2005 .NET 2.0
Hi, Which version of SQl Server Reporting Services will work with SQL SERVER 2000 in pararrel with ASP.NET 2.0 (.NET 2.0 framework)?  Thanks, Azam HighOnCodingWanna get high! Hi, Okay I got the answer. Yes, we can use the SQL SERVER 2005 Reporting Services with SQL SERVER 2000. HighOnCodingWanna get high! ...

I develop in .net and need to create a web client to connect to a web service built in Java. Its pretty easy when the web service was also built in .net. You can just create a web reference with the gui and automatically can see its functions and stuff. when i put this url in the box and hit go i dont get to see its functions. maybe this shouldnt be the url of the WSDL?? I Have no idea. Im very new to all of this. If there are any examples of .net clients connecting to non .net web clients it woul...

Best Practice for .Net Web Service access to a Web Service on a Test and Production Servers
Hello All, What is the best way to control a .Net web service to be able to access a remote server for testing and then point to another remote server to access the web service in production? Do I need to generate and maintain 2 different proxy objects? TIA, Bob Bob // first create the proxy if not isvalid( i_service) then i_service = create fundtraderproxy_TradeServicesClient_BasicHttpBinding_ITradeServices end if ///You'll see code something like this in the constructor of your proxy //dynamically set the endpoint url with the user supplied value - //r...

"Access is denied." Server Error occurs when I try to upload anykind of files to the server.
I don't have any problems with another test server that i have setup but this server which has a default IIS setup gives me trouble. Please help. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.UnauthorizedAccessException: Access is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (ty...

VS .Net 2003 remote web project, windows xp & windows server 2003 setup
Hi everyone, I have a windows server 2003 setup as a server with IIS 6 & VS 2003 .Net I created an account programmatically for a user with frontpage extensions 2002. The accont works fine when using VS Studion .Net 2003 on the server machine however when I try to create a web project using a windows xp client machine with VS .Net 2003 it fails with a combination of "this user is not a member of the author group" (the user is setup as an administrator on the server and also has administrator front page author privilege) & the user has correct inheritable privileges on th...

Innovation to ADO.NET
Matisse Software Inc. provides its native ADO.NET Data provider for Matisse 6.0, the Database for .NET. Matisse Software has pushed the envelope of Microsoft ADO.NET architecture and extended it into a powerful Object Access Services component for .NET. Matisse’s extension of ADO.NET demonstrates that ADO.NET can evolve beyond the Microsoft architecture to benefit .NET developers. Unlike the standard ADO.NET data provider, which returns data in a table format to integrate seamlessly with relational products, Matisse has extended the ADO.NET architecture to return data in an object format....

Creating .Net custom server controls and .Net pages programatically
Thanks a lot for reading this and greatly appreciate your inputs I am writing a webinterface that lets users configure options that'll create an interface for them and generete the webpage. So I am having to programattically create custom server controls and .Net page with code behind to support the functionality. Are there APIs in the .NET SDK that let you do this. Any pointers would be greatly helpful Thanks a lot Sathya Controls on the fly? Or Create code on the fly? I think it is the latter so here we go - look at the following namespaces: * System.Reflection.Emit - gen...

create csv file on remote windows server
i need to create a csv file on a remote 2003 server how do you do this i use delphi 7 thanks On 2010-04-12 6:49 AM, chris gilbert wrote: > i need to create a csv file on a remote 2003 server how do you do this > i use delphi 7 You need to write a file to a disk on the server. How is that a programming question? W "chris gilbert" wrote in message >i need to create a csv file on a remote 2003 server how do you do this > i use delphi 7 If there's a network connection and the desired locaiton (disk/folder) ...

Web resources about - Access Denied while window service in .net trying to create a file on remote server -

Public Broadcasting Service - Wikipedia, the free encyclopedia
... such as PBS NewsHour , Masterpiece , and Frontline . Since the mid-2000s, Roper polls commissioned by PBS have consistently placed the service ...

Pinery Fire: Country Fire Service declares fire is contained as residents confront widespread devastation ...
THE deadly Pinery fire — which has been fully contained — destroyed or severely damaged 87 homes that are now considered uninhabitable, Premier ...

State shuts down Aboriginal children's ear screening service
The state government has cut off funding for a Perth Aboriginal children's ear clinic, despite its rating of 'outstanding' in an independent ...

The capex data has a services blind spot
The latest investment figures overstate the importance of the mining industry and exclude several services sectors that account for half of all ...

Soaring consultant costs cancel out public service salary savings
EXCLUSIVE: The money federal government departments are saving through job cuts is being cancelled out by a massive increase in expenditure on ...

Survivors of Paris terror attacks attend memorial service
PARIS ended a period of mourning for the victims of last fortnight’s terror attacks with a solemn memorial service attended by 1000 survivors ...

Malcolm Turnbull calls a ceasefire in the war on the public service
Malcolm Turnbull is already taking a very different approach than Tony Abbott to the public service.

Disney launches DisneyLife, a UK-exclusive online streaming service
Disney has entered the online streaming market with DisneyLife, a brand new service that launched in the United Kingdom on Tuesday (with a global ...

Volvo launches in-car package delivery service in Gothenburg
Filed under: Volvo , Europe , Technology This Christmas, Santa's reindeer will deliver presents to Volvo owners in Gothenburg, Sweden, as part ...

Amazon Reports of Air Freight Service Just the Start, Says Baird
... at $674.43, following an article this morning on Motherboard by Kari Paul stating the company has developed its own trial air cargo service, ...

Resources last updated: 11/29/2015 4:04:16 PM