Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / August 2005

Tip: Looking for answers? Try searching our database.

Access to project directory thwarted when trying to build a Web App in .NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard Lionheart - 28 Aug 2005 05:31 GMT
Hi All,

[I mistakenly posted this to microsoft.public.inetserver.iis first.]

Is there on-line documentation for the permissions available in IIS for a
Virtual Directory's Local Path?  Specifically I want documentation in
relation to developing Web Forms using Visual Studio .Net.

I'm developing my first (small) .Net WebForm app by following Jeff Prosise's
"Programming Microsoft .Net" (2002 edition) guidance on page 220.  I created
a virtual directory without incident. But when I took the next step to
create
a Web App Proj,  I ran into an access problem.  I got a "Web Access Failed"
dialog saying:

=======================
The default Web access mode for this project is set to file share,  but the
project folder at http://localhost/MyVirtualProj cannot be opened with the
path "K:\_Projects\WebForms\MyWebProj".  The error returned was:

Unable to created Web project "MyVirtualProj".  The UNC share
"K:\_Projects\WebForms\MyWebProj" does not exist or you do not have access.
========================

I got around it by accessing my virtual directory's properties in IIS and
gave the Local Path all the permissions I could.  That did the job.  But I'd
like to know what the most appropriate permissions are for various contexts.

Thanks in advance,
Richard
Tim_Mac - 29 Aug 2005 14:18 GMT
hi Richard,
you're ASP.Net web application runs with a limited account, usually
called ASPNET.
this is typically the only account that needs permissions on a virtual
directory folder (along with System and Administrator).  to run ASPX
pages, this account should have Read + Execute permissions.  write
permissions are needed in the case where files are written to, or MS
access databases are used.
there are situations where you can get the account to run with the
local user permissions (called impersonation)

if you want to verify the account used, if you're on windows server
2003, you can check the identity for the DefaultAppPool in IIS manager.

or, you can create a text file called 'identity.aspx' and insert the
following code:
<%@ Page language="c#" %>
<%= System.Security.Principal.WindowsIdentity.GetCurrent().Name %>
then browse to it through your localhost.  it will say something like
YourServer\ASPNET

this article:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/auth
aspdotnet.asp

explains the relationship between IIS and ASP.Net from the
authentication perspective.

more info here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conaspnetplatformrequirements.asp


hope this helps
tim
Richard Lionheart - 29 Aug 2005 23:49 GMT
Hi Tim,

Thank you very much for your response.  I'm running WindowsXP-Pro, SP2 with
.Net 1.1 and miscellaneous patches from WindowsUpdate.  Also, I've got IIS
and FrontPage installed on this machine,  so it serves as both Client and
Server.

In an effort to implement your solution,  I went to Start | Control Panel |
User Accounts.
I saw only three accounts: Mine (System Admin),  SQLDebugger (Limited,
Password protected, [I wonder what the pswd is "-)]) and Guest (off).

I looked at "IIS vs ASP.Net" link,  but wonder if it's relevant to my
situation of developing Web Forms on a workstation.

I looked at the "ASP.NET Platform Requirements" link briefly, but again that
seems more server oriented.  I did notice it said MDAC 2.7 should be
installed,  and I'll do that when I start some database stuff,  but it
doesn't strike me as relevant to my problem.

David in news:uE0onb5qFHA.248@TK2MSFTNGP14.phx.gbl offered some good advice
which I'm going to check out further as soon as I get a chance. (I'm pushing
forward on my webform project because I jury-rigged some permissions to get
around that problem,  but I'll get back to it to solve it correctly.)

Again, thanks for responding,
Richard

> hi Richard,
> you're ASP.Net web application runs with a limited account, usually
[quoted text clipped - 27 lines]
> hope this helps
> tim
Richard Lionheart - 29 Aug 2005 21:47 GMT
This question was answered beautifully in the newsgroup
microsoft.public.inetserver.iis.

> Hi All,
>
[quoted text clipped - 33 lines]
> Thanks in advance,
> Richard

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.