Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 04-02-2009
Member
 
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!
Reply With Quote
  #2  
Old 04-02-2009
Member
 
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.
Reply With Quote
  #3  
Old 04-02-2009
Member
 
Join Date: May 2008
Posts: 115
Re: Error in ASP.NET Application & windows server 2003

You can also try to impersonate the application
See this for more information
http://projectserverblogs.com/?p=241
http://support.microsoft.com/kb/306158
http://msdn.microsoft.com/en-us/library/aa974413.aspx
Reply With Quote
  #4  
Old 04-02-2009
Member
 
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?
Reply With Quote
  #5  
Old 04-02-2009
Member
 
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
Reply With Quote
  #6  
Old 04-02-2009
Member
 
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>
Reply With Quote
  #7  
Old 10-03-2009
Member
 
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
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Error in ASP.NET Application & windows server 2003"
Thread Thread Starter Forum Replies Last Post
Windows Server 2003 Reboot Error KierzoSBC Windows Server Help 2 16-08-2011 08:20 PM
DCDIag error on Windows 2003 Server SP2 rao_jags Operating Systems 1 22-09-2010 08:16 AM
Change remote administration to application server mode in windows 2003 terminal server RockeЯ Operating Systems 3 29-06-2009 06:47 PM
Permissions error - Windows Server 2003 R2 Mike Windows Server Help 3 23-09-2008 10:42 PM
MMC 3.0 user snap-in error (windows server 2003, exchange server 2 RonnyEhv1982 Windows Server Help 1 15-03-2008 12:15 AM


All times are GMT +5.5. The time now is 01:05 PM.