I want to create a directory on my web server from within code. I've tried
using Request.Physica lApplicationPat h() to get the location of the
application, and appended my new directory on the end and used
Directory.Creat eDirectory which fails with:
System.IO.Direc toryNotFoundExc eption: Could not find a part of the path
"d:\". at System.IO.__Err or.WinIOError(I nt32 errorCode, String str) at
System.IO.Direc tory.InternalCr eateDirectory(S tring fullPath, String path) at
System.IO.Direc tory.CreateDire ctory(String path) at ...
BUT if I manually create the directory in an FTP program, and use
Directory.Exist s, it manages to find the directory... the problem just
appears to be creating.
Any clues?
Cheers
Sparky 1 2418
It's probably a security issue. By default ASP.NET runs under the ASPNET
user account. This account does not have a lot of permissions on your
machine. Simply grant it full read, write & create permissions to the path
you're specifying on your server.
--
I hope this helps,
Steve C. Orr, MCSD http://Steve.Orr.net
"Sparky" <ma********@nos pam.farmade.com > wrote in message
news:O0******** ******@tk2msftn gp13.phx.gbl... I want to create a directory on my web server from within code. I've tried using Request.Physica lApplicationPat h() to get the location of the application, and appended my new directory on the end and used Directory.Creat eDirectory which fails with:
System.IO.Direc toryNotFoundExc eption: Could not find a part of the path "d:\". at System.IO.__Err or.WinIOError(I nt32 errorCode, String str) at System.IO.Direc tory.InternalCr eateDirectory(S tring fullPath, String path)
at System.IO.Direc tory.CreateDire ctory(String path) at ...
BUT if I manually create the directory in an FTP program, and use Directory.Exist s, it manages to find the directory... the problem just appears to be creating.
Any clues?
Cheers
Sparky
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tony |
last post by:
I'm porting an old Coldfusion based content and asset management system to
ASP.NET (and oh, how good it feels to write REAL code again - was a C++ hack
for 10 years, started doing coldfusion about 4 years ago - moving to .NET at
the moment - C# rocks a fat one - it's real code :-)).
Anyway, I've hit a bit of a problem which I don't quite know how to solve.
Part of the system I'm porting lets users view/rename/delete/upload
"assets" -...
|
by: Avi Shilon |
last post by:
Hi,
I'm trying to create a Solution that contains several
projects within it, one of which is an ASP.NET web
application and the others are class libraries (Data
and Business tiers, which are seperate projects).
When i created the two class
library projects, the projects were added to the
root directory of the solution, but when i tried to
add the web application project, it wouldn't let
|
by: r_burgess |
last post by:
TheNewUser.Invoke("SetPassword", New Object() {"123"})
Does anyone have any idea why that call wouldn't work, even though I have
supplied credentials which are fully capable of setting and changing a
password manually? (through an administrative acct)
In the program I just get done making a user and modifying its properties
(which works great) and then I commit changes. I then try to set the
password. An exception is thrown, and says the...
|
by: ykgoh |
last post by:
Hi.
I've a problem of being able to create and remove a directory but
unable to write a file inside the created directory for some strange
reason. I suspect that this problem could be vaguely linked to Safe
mode being set to On since my site is using shared server hosting and
probably insufficient/incorrect Unix file permission.
Below is my test script that helps me narrow down the problem....
|
by: Sigmathaar |
last post by:
Hi, while making an XML parser for the creation of an entire directory
list I got this problem and I'm having trouble solving it. The program
(not yet written) goes through an XML Schema Instance to create some
directories (about 5000).
While creating the directories the XML file that I'm parsing is
alphabetically ordered not hierarchically and I can't allow the program
to stock the path names for each brach on the directory tree.
The...
| |
by: Daniel Knöpfel |
last post by:
Hello all
In our project we have been using the samAccount name to authenticate users
against the active directory. As the samAccountName is limited to 20
characters, we are going to use the userPrincipalName. Unfortunately, i
couldtnt make it work until now. I ve got a .Net programm that access the
active directory through the third party dll "Interop.ActiveDs.dll"
(namespace ActiveDs). The code to create the user with using the...
|
by: Steve Moreno |
last post by:
I have an ASP.NET app that writes an Excel file out to a subdirectory within
the root web and then emails it out as an attachment. If I have the
<identity impersonate="true"/string in the web.config file then there is no
error. However because that was interfering with other areas of the app that
used Active Directory I had to take that identity string out of web.config
and instead set impersonation programmactically just before file...
|
by: mrityunjay11 |
last post by:
i need a vba code which reads pathname filename date of creation of all files in the given directory and it stores above attributes in a excel sheet thanks in advance
|
by: ndedhia1 |
last post by:
Hi.
I am writing a java program in which I want to ftp a file to another unix box.
First I have to check if the directory exists in which I am ftping into and if it does not exist, I have to create it:
this is the code that I am using that is not working properly:
System.out.println("YOU ARE IN UPLOAD");
System.out.println("THIS IS THE HOST: " + host);
SshClient ssh = new SshClient();
|
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...
|
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,...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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
| |
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...
| |