Good day,
I am working on mkdir of asp.net but it is not working. I have the folder full permission to everyone already. I also added the [computername]/aspnet for the security but it is still not functioning. Pls help, Thank you.
Here is my code.
PrivateSub Button1_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles Button1.Click
MkDir("\\192.168.2.28\testdir\users")
EndSub
The error I receice is this one:
Server Error in '/testapp' Application.
Could not find a part of the path "\\192.168.2.28\testdir".
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.IO.DirectoryNotFoundException: Could not find a part of the path "\\192.168.2.28\testdir".
Source Error:
Line 33: 'MkDir("\\10.160.10.28\pl\users")Line 34:Line 35: MkDir("\\192.168.2.28\testdir\users")Line 36: Line 37: End SubSource File:C:\Inetpub\wwwroot\testapp\WebForm1.aspx.vb Line:35
Stack Trace:
[DirectoryNotFoundException: Could not find a part of the path "\\192.168.2.28\testdir".] System.IO.__Error.WinIOError(Int32 errorCode, String str) +287 System.IO.Directory.InternalCreateDirectory(String fullPath, String path) +489 System.IO.Directory.CreateDirectory(String path) +195 Microsoft.VisualBasic.FileSystem.MkDir(String Path) testapp.WebForm1.Button1_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\testapp\WebForm1.aspx.vb:35 System.Web.UI.WebControls.Button.OnClick(EventArgs e) System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) System.Web.UI.Page.ProcessRequestMain()
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.1093
do you need to use MkDir? Can you use the System.IO namespace to do this?
Also, you mentioned the FOLDER has permissions, but does the SHARE have these permissions as well?
Yes, SHARE permissions are also set.
How will I make use of System.IO namespace? Can you show some code.
Thanks :)
http://www.extaspx.com/files/create_directory.aspx
There is one example![]()
It still didn't work. Any other codes? Please help.
0 comments:
Post a Comment