View Full Version : It's installed now what?

02-15-2007, 09:25 PM
I just installed the .Net software and I went to my IIS snap-in and chose the ASP.NET version on the ASP.NET tab. It did some stuff and I clicked Apply and then OK and then placed a test aspx page in my root directory and tried to view it. Here's the code... I got it from W3Schools so that I can test the workings of the site.


<form runat="server">
<table bgcolor="#b0c4de" cellspacing="10">
<td align="right">Name:</td>
<td><asp:TextBox id="txt_name" runat="server"/></td>
<td align="right">Card Type:</td>
<asp:RadioButtonList id="rlist_type"
ErrorMessage="Card Type"
<td><asp:Button id="b1" Text="Submit" runat="server"/></td>
HeaderText="You must enter a value in the following fields:"


I get this page error...

Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.

Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

What does this mean and how can I make it to where I can use aspx pages?

Thanks Soo Much In Advance,
Fred H. :confused:

02-15-2007, 09:35 PM
If you install IIS before the .NET framework, IIS is not aware of the framework, even if you install it afterwards. You have to remove IIS and then reinstall it to make it serve aspx pages.

I had to do this a while ago

02-15-2007, 09:59 PM
Or you can just re-register.
It's a lot faster.

02-15-2007, 10:27 PM
OK, The first one didn't fix it but the suggestion from nikkiH did do something, however, now I'm being prompted for a login and password. I tried my machine login and password but that didn't fly. Any Ideas?

Thanks Again.
Fred H.

02-15-2007, 11:42 PM
Here's the full content of the error I'm getting.

Server Error in '/' Application.

Access to the path 'c:\inetpub\wwwroot\test.aspx' 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:\inetpub\wwwroot\test.aspx' 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 <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET 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:\inetpub\wwwroot\test.aspx' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2014691
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) +998
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +114
System.Web.Hosting.MapPathBasedVirtualFile.Open() +71
System.Web.UI.TemplateParser.ParseFile(String physicalPath, VirtualPath virtualPath) +205
System.Web.UI.TemplateParser.ParseInternal() +125
System.Web.UI.TemplateParser.Parse() +155
System.Web.Compilation.BaseTemplateBuildProvider.get_CodeCompilerType() +105
System.Web.Compilation.BuildProvider.GetCompilerTypeFromBuildProvider(BuildProvider buildProvider) +54
System.Web.Compilation.BuildProvidersCompiler.ProcessBuildProviders() +256
System.Web.Compilation.BuildProvidersCompiler.PerformBuild() +29
System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) +279
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +580
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +93
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +111
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +54
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +139
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +120
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

02-16-2007, 12:01 AM
OK, I now have some of it working but for some reason I have to go and set permissions on all my files within my webroot inorder to get them to work. I set permissions on the Inetpub folder to allow access as needed but for some reason it's not inhearting permissions to all the subfolders and files. Am I doing something terribly wrong??

Thanks Much,
Fred H.

02-16-2007, 07:44 PM
Fred, a few things you have to do to get asp.net working correctly.

1. Make sure your asp.net state server is running. Go to Control Panel > Administrative Tools > Services. Your gong to see asp.net in the list of services. Start or Restart the service, then right click on the listing, click properties, and change the startup from Manual to Auto

2. Your permissions are wrong. Use Explorer to do this. Navigate to your wwwroot folder, don't open it. Right click and click on the Security Tab. You need to add a few users to the permissions so follow very closely.
- Click on "Add"
- Then click on "Advanced"
- Click "Find Now"
- In the resulting set of users and system users, you will find the machine accounts that you need to add to the security
- Control click on ASP.NET, Network Service, and all the OWS services you see.
- They will be added to the groups of users you will see in the Security Tab
- Grant asp.net and network service "administrative" rights, and the ows users modify
- close everything down and run your script again.

Have fun with asp.net!