473,789 Members | 2,740 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File folder access exception

I am getting the following error trying to create a folder on the file
system using an intranet internal application.

Exception: System.Unauthor izedAccessExcep tion

Message: Access to the path '\\lifedevsql\s hared\FileDocs\ File093969' is
denied.

When I Googled the exception I found a reference to impersonating a user in
the web.config file. Is there any other way to allow create/modify/delete
of file folders on a separate domain server? I have the folders referenced
as a virtual directory on the web site and have read and write permissions
in IIS. I also have full control permissions for an AD group which will be
using this application? Thanks.

David
Sep 24 '07 #1
1 1629
You must know which user account is used to run your ASP.ENT application,
which runs on a web server. by default, it is the web server's local ASPNET
or Network Service account, which naturally does not have permission to the
resources on the other computer, and enve have very limited access to the
resources on local computer.

As ASP.NET developer, you need to be very clear what resources your
application needs and configure the running user account accordingly. See
more coment inline. MOst likely, if the ASP.NET app has to access resources
on the other computers, you need to impersonate the ASP.NET app to use a
domain user account.
"David C" <dl*****@lifeti meinc.comwrote in message
news:eD******** ******@TK2MSFTN GP03.phx.gbl...
>I am getting the following error trying to create a folder on the file
system using an intranet internal application.

Exception: System.Unauthor izedAccessExcep tion

Message: Access to the path '\\lifedevsql\s hared\FileDocs\ File093969' is
denied.

When I Googled the exception I found a reference to impersonating a user
in the web.config file. Is there any other way to allow
create/modify/delete of file folders on a separate domain server? I have
the folders referenced as a virtual directory on the web site and have
read and write permissions
Which user account (domain or local) has the read/write permission? The
permission is given to certain user account.

in IIS. I also have full control permissions for an AD group which will
be
You having full permission does not mean so does other user account.

using this application? Thanks.
a user using your web application does not necessarily mean the web
application is run under his/her credential. It is depends on how the
ASP.NET application configured.

>
David
Sep 24 '07 #2

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

Similar topics

0
2936
by: Bill Burwell | last post by:
I am converting a VB6 WebClass application to VB.Net. Used the VB upgrade tool to do the conversion - and it left me a lot of little code things to do. Did those code things and got my app to compile. Did a few other code things to take advantage of .Net features not available in VB6. When I start the application on my PC I get the error shown below. It seems to me that the app initiation is failing before any app code is executed. My...
8
17039
by: Ram Baruch | last post by:
Hi, I'm trying to use the File.Copy() function. It works well when the desenation file is local (Like: C:\dest\dest.exe). The problem is that when I'm trying to copy to a destenation that starts with '\\' it doesnt work and exception is thrown (for example: \\MyComputer\DestDirectory). Even if the first and the second directories are actually the same- the File.Copy() doesn't work. Is there any way to copy a file to a different computer?...
11
9603
by: sur | last post by:
Hello, My problem is that File.Exists works fine if my file is on my local drive but returns false if its on any other drive. I think that the issue is probably file permissions and so I have tried the following: FileIOPermision permFileIO = new FileIOPermission(FileIOPermissionAccess.Read, filepath.Value.ToString());
2
2100
by: bala | last post by:
Hi All, Sorry for repost I have a popup for image upload with a upload button,save button and one close button I am uploading images with a file control after browsing when I click on upload button it upload the file to some folder /xyz/temp/ folder with name 101.jpg now i close the popup. now when i again open and try to upload (upload the file to same folder
5
483
by: Joe | last post by:
I'm getting the following error when trying to call a page on a secure server. I'm not doing any impersonations or file access of any kind. The page is using PayPal and I'm wondering if PayPal has something to do with this. We had to register an api certificate on the server using WinHttpCertCfg. Maybe this is doing something? Access denied to 'D:\WWWRoot\sslserver'. Failed to start monitoring file changes. Description: An unhandled...
1
3208
by: joshtichauer | last post by:
So i have an xml file, i'm grabbing it via dataset, then placing the data into a datagrid. everythings all good, but i'd like to edit the data. the coding grabs whats in the edit textboxes, and should throw it back to the xml file, but i get an error "System.UnauthorizedAccessException: Access to the path "c:\inetpub\wwwroot\work\xmlfile1.xml" is denied. ASP.NET is not authorized to access the requested resource. Consider granting...
1
3729
by: lactaseman | last post by:
While I know this is not the correct venue... I realize this is of little to no importance to most out there... however, if I had found this in my initial searches, I would have used this. So, as an alternative to the mentalis.org's IniReader, I submit the following files to the web news group DBs...: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
1
8067
by: =?Utf-8?B?R2FuZXNoIE11dGh1dmVsdQ==?= | last post by:
Hello All, Our application write logs to a file in a folder. Before our application starts writing to that file, I want to check if the current user has write access to that file, for example, "c:\temp\LogFile.txt". I see several articles for setting file access permissions, getting file access permissions for a given user or current user - but the current user could also gain write access to the same file not just by explicit permssion...
4
3274
by: Roopesh | last post by:
Hi, I have a multithreaded application. There are two threads, T1 and T2. Suppose that there are two folders A, B. Thread T1 fetches data from network and creates files in folder A and after creating each file, it moves the file to folder B, using shutil.move(). Thread T2, takes files from folder B and processes it. Note: Only the thread T1 has access to the files in folder A.
2
1595
by: =?Utf-8?B?SmVmZlAtPg==?= | last post by:
I want to retrieve an image file (TIF) convert it to a bmp file and enable sizing. I know how to do the converting & sizing part, and store any atributes to file location in the webconfig, what I don't know is how to get the image file. The only way that I've got it working was to Impersonate a user login at the other server.
0
9666
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10412
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10200
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9986
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4093
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.