Monday, March 26, 2012

This is a real getting started question

Brand new at the dynamic pages. I have been working through the Web Matrix ASP.NET tutorial @dotnet.itags.org. http://www.asp.net/webmatrix/guidedtour/getstarted/intro.aspx and I had some trouble connecting to the IIS Server they told me to name MatrixTour. At any rate, I created a login page, and it ran fine through the Web Matrix built in server, however, when I save it in my root directory and attempt to access it via the Web, I get a 404 Error. Page not Found. I have verified that the page is in the root directory, so I'm a bit stuck. I assume this is something simple (and stupid) on my part, but, I could use some help.errr... what OS are you running it on? if this is a windows 2003 server which has certain extensions disabled, you'd get a 404
It is a Windows 2003 server. I am running the Ensim control panel. I have it set to Scripts only. When I remote desktop to the server, and go into IIS Manager, I have the following configuration under Web Extensions:

All Unknown ISAPI Extensions - Prohibited
All Unknown CGI Extensions - Prohibited
Active Server Pages - Allowed
ASP.NET v1.1.4322 - Allowed
Frontpage Server Extensions 2002 - Allowed
Indexing Service - Allowed
Internet Data Connector - Allowed
PERLCGI - Allowed
PERLISAPI - Allowed
PHPCGI - Allowed
Server Side Includes - Allowed
WebDAV - Prohibited

In addition to being new to ASP.NET and ASP pages generally, I recently got this dedicated server, so I am learning about the set-up while I am moving all of the sites I manage over to it. I've bitten off a little bit, I know, but, hey, no better way to learn, than under the gun, right? It forces me to pay attention and learn. I have been wanting to learn more about dynamic pages and database driven sites, and now I am. That said, I'll probably ask a ton of really stupid questions here. Not that I want anyone to build my code for me, just head me in the right direction so I can learn how to do it myself...

Thanks for any help you can give!

Dan
woo. youare jumping in feet first, aren't you? OK. so we've eliminated the extensions issue.

err... doubt you need the IDC or Indexing enabled, btw.

so this is an ASPX file you're atempting to run?
Yes, it is. http://www.pittsburghpipeband.com/800html/MemberLogin.aspx

Incidentally, I found another post on a board that had the same problem. Here's the URL:

http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=424900

I decided to try the suggestion by AccuBubba in the 3rd reply and after running the command, it fixed the 404 error. I assume that there was a config issue either in the order IIS and ASP.NET and the .NET framework was installed, or more likely that the ASP.NET install was corrupt or unfinished. Now, I am getting a runtime error.

I am about to go back over to the server to make certain that I didn't delete that page accidentally, although, I would think that would bring up another 404 error. I assume it is a security issue, but am unsure of everything I need to check.

By the way, I love what I've seen of your site. I was a little intimidated about what your reply might be after having read the RTFM and the "Should you really be trying this?" but, I am going to learn! Just not going to ask how to make a Hotmail Clone... :)
HMMMMMMMMMMMMMMM, Atrax, maybe I shouldn't be doing this after all.

I have been going over this and over this, and looking at the error page I got as well as the steps I took making this page, it seems I forgot to make my web config file. I'm betting this fixes it.

Not sure if I'm stupid or just hurrying too much. I'll post and let you know though.
OK, I know I'm pretty much talking to myself here. I have to assume that this is a config issue with IIS because I have made several changes to the web.config file (starting with building one in the first place, which I forgot to do.) I got rid of the 404 error. Now, I am getting another error:

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off". I did this. So, when I remote Desktop to the server, and run the page in IE, it says this:

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.Web.HttpException: Server cannot access application directory 'c:\Program Files\Ensim\Site Data\pipes\Inetpub\wwwroot\'. The directory does not exist or is not accessible because of security settings.

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:

[HttpException (0x80004005): Server cannot access application directory 'c:\Program Files\Ensim\Site Data\pipes\Inetpub\wwwroot\'. The directory does not exist or is not accessible because of security settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDirectory() +72
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +263

[HttpException (0x80004005): ASP.NET Initialization Error]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +964
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +128

So, that leads me to believe that permissions or security issues are involved. Am I on the right path? Anything I should try? I have to assume that this being the major issue at this point, and not being the ultimate configuration person, I can handle the rest of it...once I get it to run in the browser.

0 comments:

Post a Comment