Hello, Im getting the following error when trying to access my webservice locally. I have cassini running on port 8000 http://localhost:8000/MyService/Manager.asmx I do not have admin rights on the machine that I am doing the tests. Is there a way to change
the directory that cassini uses (or is this asp.net issue?). - Thanks, Server Error in '/MyService' Application. -------------------------------------------------------------------------------- Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary
ASP.NET Files\myservice\55c88822\d8c47c8" is denied. 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.UnauthorizedAccessException: Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\myservice\55c88822\d8c47c8" is denied. ASP.NET is not authorized to access the requested resource. Consider granting access
rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via , the
identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate
user or group. Highlight the ASP.NET account, and check the boxes for the desired access. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can
be identified using the exception stack trace below. Stack Trace: [UnauthorizedAccessException: Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\myservice\55c88822\d8c47c8" is denied.] System.IO.__Error.WinIOError(Int32
errorCode, String str) +393 System.IO.Directory.InternalCreateDirectory(String fullPath, String path) +632 System.IO.Directory.CreateDirectory(String path) +195 System.Web.Compilation.PreservedAssemblyEntry.DoFirstTimeInit(HttpContext context) +66 System.Web.Compilation.PreservedAssemblyEntry.EnsureFirstTimeInit(HttpContext
context) +84 System.Web.Compilation.PreservedAssemblyEntry.GetPreservedAssemblyEntry(HttpContext context, String virtualPath, Boolean fApplicationFile) +19 System.Web.UI.TemplateParser.GetParserCacheItemFromPreservedCompilation() +91 System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean
fCreateIfNotFound) +123 System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath() +125 System.Web.UI.TemplateParser.GetParserCacheItem() +72 System.Web.UI.ApplicationFileParser.GetCompiledApplicationType(String inputFile, HttpContext context, ApplicationFileParser&
parser) +171 System.Web.HttpApplicationFactory.CompileApplication(HttpContext context) +43 System.Web.HttpApplicationFactory.Init(HttpContext context) +440 System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +164 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest
wr) +414 -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
I think the system administrator must give ASP.NET rights on the machine. You should still be able to run Cassini as a non-admin. Contact the machine admin and ask him to do what the error message says: To grant ASP.NET write access to a file, right-click the
file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
-Dan
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi, Thanks for the reply. The ASP.NET account has Full Control on this directory: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files The myservice directory that it is looking for does exist. - Thanks,
If the directory does not exist in temp files then the Framework should create a new directory. I would kill all instances of Cassini and try launching the service again. Has this ever worked, or is this the first time you have tried running this service? If
it has never worked you should run Build.bat from a command prompt and make sure you have no errors, and that Cassini.dll is in the GAC. Can you run the service from another port? Can you run a localhost ASP.NET web with Cassini?
-Dan
This posting is provided "AS IS" with no warranties, and confers no rights.
This works if the user is an admin. If there user doesnt have admin priviledges then I get an accessed denied exception. I have tried different ports, and if the user doesnt have admin rights, it will not work on a the localhost either. I was thinking about
changing the asp.net temp directory, but Im not sure on how to do this, since I want to make this programming downloadble and easy to install and use by all users. - Thanks.
I'm having the same problem. It looks like Cassini is running as the logged in user and not the ASPNET account which doesn't have rights to the temp directory. Is there any way to get .Net to create these temp files in an another location which a non admin
user has control over?
No, I don't know of a way to change the Temp directory. It would be a security risk if non-admin users had access to it.
Visual Web Developer Express Beta 2 allows non-admins to create and debug file system webs. It's still in Beta, so it should be installed on a test machine:
http://lab.msdn.microsoft.com/express/vwd/
-Dan
This posting is provided "AS IS" with no warranties, and confers no rights.
aspnetiman2
Member
350 Points
70 Posts
Access Denied
Aug 08, 2004 08:50 AM|LINK
csharpalmanac.NET
danmor
Contributor
4590 Points
910 Posts
Microsoft
Re: Access Denied
Aug 10, 2004 02:04 AM|LINK
This posting is provided "AS IS" with no warranties, and confers no rights.
aspnetiman2
Member
350 Points
70 Posts
Re: Access Denied
Aug 11, 2004 07:35 AM|LINK
csharpalmanac.NET
danmor
Contributor
4590 Points
910 Posts
Microsoft
Re: Access Denied
Aug 11, 2004 05:11 PM|LINK
This posting is provided "AS IS" with no warranties, and confers no rights.
aspnetiman2
Member
350 Points
70 Posts
Re: Access Denied
Aug 15, 2004 10:29 PM|LINK
csharpalmanac.NET
rossco
Member
26 Points
12 Posts
Re: Access Denied
Apr 21, 2005 08:38 AM|LINK
I'm having the same problem. It looks like Cassini is running as the logged in user and not the ASPNET account which doesn't have rights to the temp directory. Is there any way to get .Net to create these temp files in an another location which a non admin user has control over?
danmor
Contributor
4590 Points
910 Posts
Microsoft
Re: Access Denied
Apr 21, 2005 06:07 PM|LINK
No, I don't know of a way to change the Temp directory. It would be a security risk if non-admin users had access to it.
Visual Web Developer Express Beta 2 allows non-admins to create and debug file system webs. It's still in Beta, so it should be installed on a test machine: http://lab.msdn.microsoft.com/express/vwd/
This posting is provided "AS IS" with no warranties, and confers no rights.