Results 1 to 7 of 7

Thread: Error in ASP.NET Application & windows server 2003

  1. #1
    Join Date
    May 2008
    Posts
    27

    Error in ASP.NET Application & windows server 2003

    Hi,
    I am having this problem with ASP.NET application i have developed with Visual Studio, Windows Server 2003, VB.NET, Framework 2

    The error i am getting is while i am trying to access the files(binary files stored in C:\ in win 2003) through the network drive map.

    Code:
    System.IO.DirectoryNotFoundException: Could not find a part of the path
    'Z:\filename.ext'.
    at System.IO.__Error.WinIOError(Int32 errorCode, String
    maybeFullPath)
    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
    access, Int32 rights, Boolean useRights, FileShare share, Int32
    bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String
    msgPath, Boolean bFromProxy)
    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
    access, FileShare share)
    at Service.GetPersonObject(Int32 IdPerso) in
    C:\Inetpub\wwwroot\WebServicePerson\WebServicePerson\App_Code\Service.vb:line
    1152
    Please guide me!

  2. #2
    Join Date
    Jan 2009
    Posts
    44

    Re: Error in ASP.NET Application & windows server 2003

    Please try to give the rights to ASP user.

    http://www.bigresource.com/ASP-user-...-yOaOH8pv.html

    Hope this solves the problem.

  3. #3
    Join Date
    May 2008
    Posts
    115

    Re: Error in ASP.NET Application & windows server 2003


  4. #4
    Join Date
    May 2008
    Posts
    27

    Re: Error in ASP.NET Application & windows server 2003

    Well thanks for the reply!
    I tried both the suggestions but the problem still persists.

    Code:
    <identity impersonate="true" userName="user" password="pwd"/>
    i'm trying to access these files through a map drive to test
    access with Webservices through the network layer. If we make it only
    with a shared folder, does windows use the same implementation of
    network layer?

  5. #5
    Join Date
    Jun 2008
    Posts
    97

    Re: Error in ASP.NET Application & windows server 2003

    Hey

    This is the account where ASP.NET runs in windows server 2003.

    Code:
    YourMachineName\Network Service
    Give the necessary file access permissions to that account, that it can access your network drive

  6. #6
    Join Date
    May 2008
    Posts
    72

    Re: Error in ASP.NET Application & windows server 2003

    if you are impersonating, it's the account which
    ASP.NET is impersonating which needs the access permissions.

    The problem is only about giving the permission to the correct account for ASP.NET application

    Run this code to find out the identity!

    Code:
    Identity.aspx
    
    <%@ Page Language="VB" %>
    <%@ Import NameSpace = System.Security.Principal %>
    <script runat="server">
    Sub Page_Load()
    Dim tmp As String = WindowsIdentity.GetCurrent.Name()
    Label1.Text = tmp
    End Sub
    </script>
    <html>
    <head>
    <title>WindowsIdentity.GetCurrent.Name()</title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div>
    <asp:Label ID="Label1" Runat="server" Text="Label"></asp:Label>
    </div>
    </form>
    </body>
    </html>

  7. #7
    Join Date
    Mar 2009
    Posts
    1

    Re: Error in ASP.NET Application & windows server 2003

    Hi ubiema,

    Even iam getting the same error in my aspnet application which uses IIS 6.0 window 2003 as server.

    Were you able to resolve this issue if so please let me know

Similar Threads

  1. Windows Server 2003 Reboot Error
    By KierzoSBC in forum Windows Server Help
    Replies: 2
    Last Post: 16-08-2011, 08:20 PM
  2. DCDIag error on Windows 2003 Server SP2
    By rao_jags in forum Operating Systems
    Replies: 1
    Last Post: 22-09-2010, 08:16 AM
  3. Replies: 3
    Last Post: 29-06-2009, 06:47 PM
  4. Permissions error - Windows Server 2003 R2
    By Mike in forum Windows Server Help
    Replies: 3
    Last Post: 23-09-2008, 10:42 PM
  5. MMC 3.0 user snap-in error (windows server 2003, exchange server 2
    By RonnyEhv1982 in forum Windows Server Help
    Replies: 1
    Last Post: 15-03-2008, 12:15 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,258,448.83029 seconds with 17 queries